📄 useraccoresult.jsp
字号:
<%@page contentType="text/html;charset=gb2312" pageEncoding="GBK"%>
<%@page import="java.util.*"%>
<%@page import="com.doone.fj1w.fjmgr.useroperinfo.Operuseraccount"%>
<%@page import="com.doone.data.DacClient"%>
<%@page import="com.doone.data.DataTable" %>
<%@page import="com.doone.util.FileLogger" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户帐目处理</title>
</head>
<%
//type的值用来判断调转到哪个页面
String strtype=request.getParameter("TYPE");
if(strtype==null || strtype.equals("")){
response.sendRedirect("Useraccountframe.jsp");
}
//获取billid
Operuseraccount cuseracco=new Operuseraccount();
String strbillid=request.getParameter("BILLID");;
if(strbillid!=null && !strbillid.equals("")){
cuseracco.setbillid(strbillid);
}
//信息名称
String straccountcode=request.getParameter("ACCOUNTCODE");;
if(straccountcode!=null && !straccountcode.equals("")){
cuseracco.setaccountcode(straccountcode);
}
//信息内容
String strmoney=request.getParameter("MONEY");;
if(strmoney!=null && !strmoney.equals("")){
cuseracco.setmoney(strmoney);
}
int itype=Integer.parseInt(strtype);
int iinsert=0;
int iupdate=0;
int idelete=0;
int iexist=0;
switch(itype){
case 1:
String sqrynum=cuseracco.qryexistuseraccount("Tf_UserAccount","BILLID","ACCOUNTCODE");
int iqrynum=Integer.parseInt(sqrynum);
if(iqrynum<1){
iinsert=cuseracco.insertuseraccount();
}else{
iexist=1;
}
if(iinsert>0){
String strinfo="您的当前的操作已经成功!";
session.setAttribute("OPERRESULT",strinfo);
response.sendRedirect("resultinter.jsp");
}else{
if(iexist==1){
String strinfo="您的当前信息已经存在!";
session.setAttribute("OPERRESULT",strinfo);
response.sendRedirect("resultinter.jsp");
}else{
String strinfo="您的当前的操作失败,可能没有正确提交信息!";
session.setAttribute("OPERRESULT",strinfo);
response.sendRedirect("resultinter.jsp");
}
}
break;
case 2:
String suseraccountid=(String)session.getAttribute("USERACCOUNTID");
if(suseraccountid==null || suseraccountid.equals("")){
String strinfo="资源忙,请稍等!";
session.setAttribute("OPERRESULT",strinfo);
response.sendRedirect("resultinter.jsp");
}else{
cuseracco.setuseraccountid(suseraccountid);
}
iupdate=cuseracco.updateuseraccount();
if(iupdate<1){
String strinfo="您的当前的操作失败,可能没有正确提交信息!";
session.setAttribute("OPERRESULT",strinfo);
response.sendRedirect("resultinter.jsp");
}else{
String strinfo="您的当前的操作已经成功!";
session.setAttribute("OPERRESULT",strinfo);
response.sendRedirect("resultinter.jsp");
}
break;
case 3:
String struseraccountid=request.getParameter("USERACCOUNTID");
if(struseraccountid==null || struseraccountid.equals("")){
String strinfo="资源忙,请稍等!";
session.setAttribute("OPERRESULT",strinfo);
response.sendRedirect("resultinter.jsp");
}
cuseracco.setuseraccountid(struseraccountid);
idelete=cuseracco.deleteuseraccount("Tf_UserAccount","USERACCOUNTID");
if(idelete>0){
//触发更新的操作
String strinfo="您的当前的操作已经成功!";
session.setAttribute("OPERRESULT",strinfo);
response.sendRedirect("resultinter.jsp");
}else{
String strinfo="您的当前的操作失败,可能没有正确提交信息!";
session.setAttribute("OPERRESULT",strinfo);
response.sendRedirect("resultinter.jsp");
}
// String[] arrayshowinfo=request.getParameterValues("SHOWINFOIDFORM");
//
// int delresut=0;
// if(arrayshowinfo.length>0){
// for(int t=0;t<arrayshowinfo.length;t++){
// String strid=arrayshowinfo[t];
// cshowinfo.setshowinfoid(strid);
// delresut=cshowinfo.deleteshowinfo("td_showinfo",strid);
// if(delresut>0){
// idelete+=1;
// }
// }
// }
// if(idelete>1){
// //触发更新的操作
// String strinfo="您的当前的操作已经成功!";
// session.setAttribute("OPERRESULT",strinfo);
// response.sendRedirect("resultinter.jsp");
// }else{
// String strinfo="您的当前的操作失败,可能没有正确提交信息!";
// session.setAttribute("OPERRESULT",strinfo);
// response.sendRedirect("resultinter.jsp");
// }
break;
}
//FileLogger.getLogger().info(insresut+":000insresut");
%>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -