/** * 新增,修改业务区参数 * * @param cycle * @throws Exception * @author:chenzg * @date:2010-5-17 */ public void saveAreas(IRequestCycle cycle) throws Exception { PageData pd = this.getPageData(); IData conditions = new DataMap(); String msg = ""; String operType = pd.getParameter("operType", ""); // 修改 if ("edit".equals(operType)) { IData params = pd.getData("edit", true); params.put("UPDATE_STAFF_ID", pd.getContext().getStaffId()); params.put("UPDATE_TIME", DualMgr.getSysDate(pd)); this.paramsBean.updateAreas(pd, params); msg = "修改业务区参数成功!"; } // 新增 else if ("add".equals(operType)) { IData params = pd.getData("add", true); params.put("UPDATE_STAFF_ID", pd.getContext().getStaffId()); params.put("UPDATE_TIME", DualMgr.getSysDate(pd)); params.put("AREA_CODE", "BAR_" + DualMgr.getSeqId(pd, "seq_area_id")); IDataset dataset = new DatasetList(); dataset.add(params); this.paramsBean.addAreas(pd, dataset); msg = "新增业务区参数成功!"; } // 返回项目参数查询界面 StringBuilder strScript = new StringBuilder(""); strScript.append("parent.document.getElementById('bquery').click();"); redirectToMsgByScript(msg, strScript.toString()); }
/** * 页面初始化参数 * * @param cycle * @throws Exception * @author:chenzg * @date:2010-5-12 */ public void init(IRequestCycle cycle) throws Exception { PageData pd = this.getPageData(); IData conditions = new DataMap(); String operType = pd.getParameter("operType", ""); if ("edit".equals(operType)) { this.queryAreas(cycle); conditions.put("DISABLED", "true"); } else if ("add".equals(operType)) { conditions.put("DISABLED", "false"); } this.setConditions(conditions); pd.setTransferData(pd.getData()); }
/** * 查询产品大类信息 * * @param cycle * @throws Exception * @author:wull */ public void queryProductTypeList(IRequestCycle cycle) throws Exception { PageData pd = this.getPageData(); IData params = pd.getData("cond", true); params.put("ITEM_FLAG", "1"); IDataset productTypeList = productBean.queryProductTypeLists(pd, params, pd.getPagination()); this.setInfos(productTypeList); this.init(cycle); }
/** * 页面初始化参数 * * @param cycle * @throws Exception * @author:wull */ public void init(IRequestCycle cycle) throws Exception { PageData pd = getPageData(); IData conditions = pd.getData("cond", true); IData data = new DataMap(); // // if(null!=pd.getParameter("PRODUCT_CLASS")&&!"".equals(pd.getParameter("PRODUCT_CLASS","").trim())) // { // conditions.put("PRODUCT_CLASS", pd.getParameter("PRODUCT_CLASS","")); // data.put("ITEM_FLAG", "1"); // IDataset productclass = productBean.queryProductClassLists(pd, data, null); // conditions.put("PRODUCTCLASS", productclass); // } this.setConditions(conditions); if (null != pd.getParameter("ID") && !"".equals(pd.getParameter("ID", "").trim())) { data.put("PRODUCT_CLASS", pd.getParameter("ID", "")); IDataset productTypeList = productBean.queryProductTypeLists(pd, data, pd.getPagination()); this.setInfos(productTypeList); conditions.put("PRODUCT_CLASS", pd.getParameter("ID", "")); this.setConditions(conditions); } }