⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 operresult.jsp

📁 电信的网厅的整站代码
💻 JSP
字号:
<%@page contentType="text/html;charset=gb2312" pageEncoding="GBK"%>
<%@page import="java.util.*"%>
<%@page import="com.doone.fj1w.fjmgr.useroperinfo.Opershowinfo"%>
<%@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("Showinfoframe.jsp");
   }

  //获取地市编号
  Opershowinfo cshowinfo=new Opershowinfo();
  String strcitycode = request.getParameter("citycode");
  if ( strcitycode == null || strcitycode.length() == 0 ) strcitycode = "0590";

  cshowinfo.setcitycode(strcitycode);

  //信息名称
  String strinfocode=request.getParameter("INFOCODE");;
  if(strinfocode!=null && !strinfocode.equals("")){
    cshowinfo.setsinfocode(strinfocode);
  }
     //信息内容
  String strinfocomm=request.getParameter("INFOCONTENT");;
  if(strinfocomm!=null && !strinfocomm.equals("")){
    cshowinfo.setsinfocontent(strinfocomm);
  }

  int itype=Integer.parseInt(strtype);
  int iinsert=0;
  int iupdate=0;
  int idelete=0;
  int iexist=0;

  switch(itype){
    case 1:
      String sqrynum=cshowinfo.qryexistshowinfo("td_showinfo","CITYCODE","INFOCODE");
      int iqrynum=Integer.parseInt(sqrynum);
      if(iqrynum<1){
        iinsert=cshowinfo.insertshowinfo();
      }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 sshowinfoid=(String)session.getAttribute("SHOWINFOID");
      if(sshowinfoid==null || sshowinfoid.equals("")){
       String strinfo="资源忙,请稍等!";
       session.setAttribute("OPERRESULT",strinfo);
       response.sendRedirect("resultinter.jsp");
      }else{
       cshowinfo.setshowinfoid(sshowinfoid);
      }

      iupdate=cshowinfo.updateshowinfo();
      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[] arrayshowinfo=request.getParameterValues("SHOWINFOID");

    	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","SHOWINFOID");

      }
   }
      //String sdelinfoid=request.getParameter("SHOWINFOID");
        //if(sdelinfoid==null || sdelinfoid.equals("")){
        // String strinfo="资源忙,请稍等!";
        // session.setAttribute("OPERRESULT",strinfo);
         //response.sendRedirect("resultinter.jsp");
       // }

      //cshowinfo.setshowinfoid(sdelinfoid);
      //idelete=cshowinfo.deleteshowinfo("td_showinfo","SHOWINFOID");
    if(delresut>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 + -