public void CST_NO_onblur( DataDom dataDom, SessionInfo sessionInfo, ServiceRequest serviceRequest) { Database db = null; Rowset rs = null; String sql = ""; String cstNo = ""; String cstId = ""; String cstNam = ""; try { db = Tools.getDatabase(true); cstId = Charset.nullToEmpty(serviceRequest.getParameter("value")); if (!cstId.equals("")) { sql = "select cst_no,cst_nam from ogcstmst where cst_id='" + cstId + "'"; rs = db.getRS(sql); if (rs.getRowCount() <= 0) { serviceRequest.addServiceReturnParameter("CSTFLG", "FALSE"); return; } else { if (rs.next()) { cstNo = Charset.nullToEmpty(rs.getString("cst_no")); cstNam = Charset.nullToEmpty(rs.getString("cst_nam")); } } } serviceRequest.addServiceReturnParameter("CSTFLG", "TRUE"); serviceRequest.addServiceReturnParameter("CST_NO", cstNo); serviceRequest.addServiceReturnParameter("CST_NAM", cstNam); } catch (Exception e) { Log.error(e); } finally { if (db != null) db.cleanup(); } }
public String ShowListView( DataDom dataDom, SessionInfo sessionInfo, ServiceRequest serviceRequest) { super.ShowListView2(dataDom, sessionInfo, serviceRequest); try { // 添加重定向地址 net.luculent.liems.jsdom.element.ProgramInfo pi = dataDom.getProgramInfo(); pi.setProgramNo("B1BXS00013"); setForwardURL(Tools.getProgramURL(dataDom, pi.getProgramNo(), "jsp")); // 添加传递的参数 this.addForwardParameter(Constant.REQUEST_DATADOM, dataDom); } catch (Exception e) { serviceRequest.getMessage().addError(e.getMessage()); } return "true"; }