UserPopeModAction.java~6~
上传用户:dlqqsh
上传日期:2021-11-13
资源大小:7840k
文件大小:1k
源码类别:

OA系统

开发平台:

Java

  1. package officeol.mc.actions;
  2. import org.apache.struts.action.ActionMapping;
  3. import org.apache.struts.action.ActionForm;
  4. import javax.servlet.http.HttpServletRequest;
  5. import javax.servlet.http.HttpServletResponse;
  6. import org.apache.struts.action.ActionForward;
  7. import org.apache.struts.action.Action;
  8. import officeol.mc.tools.*;
  9. public class UserPopeModAction extends Action {
  10.     public ActionForward execute(ActionMapping mapping, ActionForm form,
  11.                                  HttpServletRequest request,
  12.                                  HttpServletResponse response) {
  13.         try{
  14.             request.setCharacterEncoding("GBK");
  15.             String ug = request.getParameter("ug");
  16.             String pg = request.getParameter("pg");
  17.             String sm = request.getParameter("sm");
  18.             DBConn dbc = new DBConn();
  19.             String msql = "update groupmanage set popegroup ='"+
  20.                           pg+"' , shuoming ='"+
  21.                           sm+"' where usergroup ='"+ug+"'";
  22.             dbc.executeUpdate(msql);
  23.             request.setAttribute("msg","修改成功!");
  24.         }catch(Exception ex){
  25.             ex.printStackTrace();
  26.             request.setAttribute("msg","修改出现异常,请重试!");
  27.         }
  28.         return mapping.findForward("succ");
  29.     }
  30. }