src/com/servlet/xiaoshouServlet.java
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.bean.xiaoshou;
import com.dao.xiaoshouDao;
import com.util.DBO;
import java.util.List;
import java.sql.ResultSet;
public class xiaoshouServlet extends HttpServlet {
public void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("gb2312");
System.out.println("method"+request.getParameter("method"));
String method=(String)request.getParameter("method");
if(method.equals("insert")){//销售添加
insertM(request, response);
}else if(method.equals("list")){//销售列表
ListM(request, response);
}else if(method.equals("delete")){//销售删除
deleteM(request, response);
}else if(method.equals("modifyindex")){//销售修改页面
modifyIndex(request, response);
}
else if(method.equals("modify")){//销售修改
modifyM(request, response);
}else if(method.equals("detail")){//销售详细信息
detailM(request, response);
}else if(method.equals("Plist")){//销售列表信息
PListM(request, response);
}
}
private void insertM(HttpServletRequest request, HttpServletResponse response){//销售添加
xiaoshouDao dao=new xiaoshouDao();
xiaoshou xiaoshou=new xiaoshou();
xiaoshou.setXsid((String)request.getParameter("keyid"));
xiaoshou.setSp((String)request.getParameter("sp"));
xiaoshou.setSl((String)request.getParameter("sl"));
xiaoshou.setYh((String)request.getParameter("yh"));
xiaoshou.setGk((String)request.getParameter("gk"));
xiaoshou.setBz((String)request.getParameter("bz"));
xiaoshou.setSj((String)request.getParameter("sj"));
String sp=(String)request.getParameter("sp");
String sl=(String)request.getParameter("sl");
String sj=(String)request.getParameter("sj");
response.setCharacterEncoding("gb2312");
try {
dao.insert(xiaoshou);
request.setAttribute("flag", "操作成功");
后面还有 161 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。