📄 trainmodify_deal.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK" import="imis.*,javax.naming.*,javax.rmi.PortableRemoteObject,java.util.*,java.text.*"%><% request.setCharacterEncoding("GBK"); session=request.getSession(); userStruct user=(userStruct)session.getAttribute("user"); if(user==null){ response.sendRedirect("../../login.html"); } else{ if(user.userAccess.equals(new Integer(9))||user.userAccess.equals(new Integer(0))||user.userAccess.equals(new Integer(1))||user.userAccess.equals(new Integer(2))||user.userAccess.equals(new Integer(8))) { response.sendRedirect("../../error/access.html") ; } else { try{ trainStruct trst = new trainStruct(); Context trainctx = new InitialContext(); Object trainref = trainctx.lookup("TrainController"); TrainControllerHome trainControllerHome = (TrainControllerHome) PortableRemoteObject.narrow(trainref, TrainControllerHome.class); TrainController traincontroller = trainControllerHome.create(); //trainStruct peixun = new trainStruct() ; //peixun = (trainStruct)session.getAttribute("modifystr") ; String tttt = request.getParameter("trainid"); Integer ttttid = new Integer(tttt); trst.trainid = ttttid ; trst.traincontent = request.getParameter("traincontent") ; trst.trainname = request.getParameter("trainname") ; String temnum = request.getParameter("trainnum") ; if (!temnum.equals("")){ trst.trainnum = new Integer(temnum) ; } trst.trainperson = request.getParameter("trainedperson") ; trst.person = request.getParameter("trainperson") ; String tempersist = request.getParameter("trainpersist") ; if (!tempersist.equals("")) { trst.persist = new Integer(tempersist) ; } trst.unitid = user.unitid ; //train time... Integer year = new Integer(request.getParameter("year")) ; Integer month = new Integer(request.getParameter("month")) ; Integer day = new Integer(request.getParameter("day")) ; trst.time = new java.sql.Date (year.intValue()-1900,month.intValue()-1,day.intValue()); boolean ok = false; ok = traincontroller.editTrain(trst.trainid,trst) ; response.sendRedirect("trainlist.jsp") ; } catch(Exception e){ response.sendRedirect("../../error/adderror.html") ; } } }%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -