if("add".equals(method)){
String userActionName=request.getParameter("userActionName");
String userActionMemo=request.getParameter("userActionMemo");
String createTime=request.getParameter("createTime");
if(new TbUserActionsDAO().add(new TbUserActions(userActionName,userActionMemo))){
request.getSession().setAttribute("result", "添加成功");
}else{
request.getSession().setAttribute("result", "添加失败");
}
request.getSession(true).setAttribute("tbUserActionsList",new TbUserActionsDAO().getTbUserActionsAll());
response.sendRedirect("UseractionsModule/TbUserActionsList.jsp");
}
if("del".equals(method)){
if(UtilDAO.delin("Tb_UserActions", "UserAction", request.getParameter("delIds"))){
request.getSession().setAttribute("result", "删除成功");
}else{
request.getSession().setAttribute("result", "删除失败");
}
request.getSession(true).setAttribute("tbUserActionsList",new TbUserActionsDAO().getTbUserActionsAll());
response.sendRedirect("UseractionsModule/TbUserActionsList.jsp");
}
if("edit".equals(method)){
int userAction=Integer.parseInt(request.getParameter("userAction"));
String userActionName=request.getParameter("userActionName");
String userActionMemo=request.getParameter("userActionMemo");
String createTime=request.getParameter("createTime");
if(new TbUserActionsDAO().add(new TbUserActions(userAction,userActionName,userActionMemo))){
request.getSession().setAttribute("result", "修改成功");
}else{
request.getSession().setAttribute("result", "修改失败");
}
request.getSession(true).setAttribute("tbUserActionsList",new TbUserActionsDAO().getTbUserActionsAll());