如图 4-4
代码:
private void doLnquiresZD(HttpServletRequest request,
HttpServletResponse response)throws ServletException,IOException { HttpSession session=request.getSession(); List
request.setAttribute(\, list);
session.setAttribute(\, gysName);
request.getRequestDispatcher(\).forward(request,
response);
private void doZDChaXun(HttpServletRequest request,
HttpServletResponse response)throws ServletException,IOException {
}
return;
}else { }
response.sendRedirect(\);
String zd_spmingcheng=request.getParameter(\); String zd_sfzhifu=request.getParameter(\); System.out.println(zd_spmingcheng); System.out.println(zd_sfzhifu);
List
if(list!=null){
request.setAttribute(\, list);
request.getRequestDispatcher(\).forward(request,
response);
16
}
return;
}else { }
response.sendRedirect(\);
代码:
private void doZDAdd(HttpServletRequest request,
String zd_id=request.getParameter(\).trim();
String zd_spmingcheng=request.getParameter(\).trim(); String zd_spshuliang=request.getParameter(\).trim(); String zd_jymoney=request.getParameter(\).trim(); String zd_sfzhifu=request.getParameter(\).trim();
String zd_gysname=request.getParameter(\).trim(); String zd_spmiaoshu=request.getParameter(\).trim(); HttpServletResponse response)throws ServletException,IOException {
17
String zd_danwei=request.getParameter(\).trim(); String zd_data=new SimpleDateFormat(\).format(new
Date().getTime());
List params = new ArrayList(); params.add(zd_id); params.add(zd_spmingcheng); params.add(zd_spshuliang); params.add(zd_jymoney); params.add(zd_sfzhifu); params.add(zd_gysname); params.add(zd_spmiaoshu); params.add(zd_data); params.add(zd_danwei);
Information info=oper.ZDAdd(params); request.setAttribute(\, info);
request.getRequestDispatcher(\).forward(request,
response);
}
18
代码:
private void doZDXinXi(HttpServletRequest request,
HttpServletResponse response) throws ServletException,IOException{ String zd_id =request.getParameter(\); ZDBean zdbean = new ZDBean(); zdbean=oper.ZDXinXi(zd_id); if(zdbean!=null){
request.setAttribute(\, zdbean);
request.getRequestDispatcher(\).forward(request,
response);
}
}
如图 4-5
代码:
private void doZDXiuGai(HttpServletRequest request,
HttpServletResponse response)throws ServletException,IOException{
String zd_id=request.getParameter(\).trim();
19