if("add".equals(method)){
String creditRatingTypeName=request.getParameter("creditRatingTypeName");
String creditRatingTypeMemo=request.getParameter("creditRatingTypeMemo");
if(new TbCreditRatingTypeDAO().add(new TbCreditRatingType(creditRatingTypeName,creditRatingTypeMemo,new UtilDAO().decodeDate()))){
request.getSession().setAttribute("result", "添加成功");
}else{
request.getSession().setAttribute("result", "添加失败");
}
request.getSession(true).setAttribute("tbCreditRatingTypeList",new TbCreditRatingTypeDAO().getTbCreditRatingTypeAll());
response.sendRedirect("CreditratingtypeModule/TbCreditRatingTypeList.jsp");
}
if("del".equals(method)){
if(UtilDAO.delin("Tb_CreditRatingType", "CreditRatingTypeId", request.getParameter("delIds"))){
request.getSession().setAttribute("result", "删除成功");
}else{
request.getSession().setAttribute("result", "删除失败");
}
request.getSession(true).setAttribute("tbCreditRatingTypeList",new TbCreditRatingTypeDAO().getTbCreditRatingTypeAll());
response.sendRedirect("CreditratingtypeModule/TbCreditRatingTypeList.jsp");
}
if("edit".equals(method)){
int creditRatingTypeId=Integer.parseInt(request.getParameter("creditRatingTypeId"));
String creditRatingTypeName=request.getParameter("creditRatingTypeName");
String creditRatingTypeMemo=request.getParameter("creditRatingTypeMemo");
String createTime=request.getParameter("createTime");
if(new TbCreditRatingTypeDAO().edit(new TbCreditRatingType(creditRatingTypeId,creditRatingTypeName,creditRatingTypeMemo,new UtilDAO().decodeDate()))){
request.getSession().setAttribute("result", "修改成功");
}else{
request.getSession().setAttribute("result", "修改失败");
}
request.getSession(true).setAttribute("tbCreditRatingTypeList",new TbCreditRatingTypeDAO().getTbCreditRatingTypeAll());