protected void tuihuiliulan(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException { req.setCharacterEncoding("utf-8"); int status=StringUtil.StringToInt(req.getParameter("status")); int userid=StringUtil.StringToInt(req.getParameter("userid")); List<Zhengjibean>zhengjibeanlist=new Xuqiuservice().tiaojianneedlsit(status,userid); req.setAttribute("zhengjibeanlist", zhengjibeanlist); req.getRequestDispatcher("/index/tuihuiliulan.jsp").forward(req, resp); }
public List<Zhengjibean> tiaojianneedlsit(int status,int userid) { Session session = HibernateUtils.getCurrentSession(); Transaction tr = session.beginTransaction(); List<Zhengjibean> list=null; try { list=new Xuqiudao().tiaojianneedlsit(status, userid); tr.commit(); } catch (Exception e) { e.printStackTrace(); tr.rollback(); } return list; }
protected void tuihuineeddelete(HttpServletRequest req,HttpServletResponse resp)throws ServletException,IOException { req.setCharacterEncoding("utf-8"); Xuqiuservice xuqiuservice=new Xuqiuservice(); int id=StringUtil.StringToInt(req.getParameter("id")); int userid=StringUtil.StringToInt(req.getParameter("userid")); int status=3; xuqiuservice.needdeleta(id); List<Zhengjibean>zhengjibeanlist=xuqiuservice.tiaojianneedlsit(status,userid); req.setAttribute("zhengjibeanlist", zhengjibeanlist); req.getRequestDispatcher("/index/tuihuiliulan.jsp?status=1").forward(req, resp); }