📄 accountadded.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(12))||user.userAccess.equals(new Integer(9))){ try{ Context ctx = new InitialContext(); Object ref = ctx.lookup("OtherController"); OtherControllerHome otherControllerHome = (OtherControllerHome) PortableRemoteObject.narrow(ref, OtherControllerHome.class); OtherController othercontroller = otherControllerHome.create(); InaccountJBean inaccount = new InaccountJBean(); String device_id = request.getParameter("deviceid"); String account_id = request.getParameter("accountid"); Double price = new Double(request.getParameter("price")); Double price_in = new Double(request.getParameter("price_in")); Integer year = new Integer(request.getParameter("year")) ; Integer month = new Integer(request.getParameter("month")) ; Integer day = new Integer(request.getParameter("day")) ; inaccount.time = new java.sql.Date (year.intValue()-1900,month.intValue()-1,day.intValue()); inaccount.device_id = device_id; inaccount.price = price; inaccount.price_in = price_in; inaccount.person = user.userName; inaccount.unitid = user.unitid; inaccount.account_id = account_id; boolean ok=false; ok = othercontroller.addInaccount(inaccount); if(ok){ response.sendRedirect("accountlist.jsp"); }else{ response.sendRedirect("../../error/adderror.html"); }%><% } catch(Exception e){ e.printStackTrace(); response.sendRedirect("../../error/adderror.html"); } }else{ response.sendRedirect("../../error/access.html"); }%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -