protected void Page_Load(object sender, EventArgs e) { schid = Com.Session.schid; //业务类型 SchSystem.BLL.ServType stBll = new SchSystem.BLL.ServType(); DataTable stdt = stBll.GetList("TypeName,TypeCode", "").Tables[0]; businessType = Newtonsoft.Json.JsonConvert.SerializeObject(stdt); //业务平台 SchSystem.BLL.ServSys ssBll = new SchSystem.BLL.ServSys(); DataTable ssdt = ssBll.GetList("'0' pId,SysName name,SysCode id,SysUrl,'false' checked", "").Tables[0]; businessPlatfrom = Newtonsoft.Json.JsonConvert.SerializeObject(ssdt); //附加設置信息 SchSystem.BLL.ServSysNape ssnBll = new SchSystem.BLL.ServSysNape(); DataTable ssndt = ssnBll.GetList("Stat=1").Tables[0]; addinfo = Newtonsoft.Json.JsonConvert.SerializeObject(ssndt); //附加設置信息之附加信息聯動內容默認下拉列表 SchSystem.BLL.SysPer spBll = new SchSystem.BLL.SysPer(); DataTable dtsp = spBll.GetList("'0' pId,PerName name,PerCode id", "Stat=1 order by convert(int,PerCode)").Tables[0]; selectprdcontent = Newtonsoft.Json.JsonConvert.SerializeObject(dtsp); }
protected void Page_Load(object sender, EventArgs e) { dotype = Request.Params["dotype"].ToString(); string AutoId = Request.Params["id"].ToString(); funcid = AutoId; schid = Com.Session.schid; SchSystem.BLL.ServFunc sfcBll = new SchSystem.BLL.ServFunc(); SchSystem.Model.ServFunc sfcModel = new SchSystem.Model.ServFunc(); string FuncSyss = ""; if (!string.IsNullOrEmpty(AutoId)) { sfcModel = sfcBll.GetServFuncModel(AutoId); FuncSyss = sfcModel.FuncSyss; servfuncModel = Newtonsoft.Json.JsonConvert.SerializeObject(sfcModel); } //业务类型 SchSystem.BLL.ServType stBll = new SchSystem.BLL.ServType(); DataTable stdt = stBll.GetList("TypeName,TypeCode", "").Tables[0]; businessType = Newtonsoft.Json.JsonConvert.SerializeObject(stdt); //业务平台 SchSystem.BLL.ServSys ssBll = new SchSystem.BLL.ServSys(); DataTable ssdt = ssBll.GetList("'0' pId,SysName name,SysCode id,SysUrl,'false' checked", "").Tables[0]; if (ssdt.Rows.Count > 0) { if (FuncSyss != "") { string[] FuncSyssArr = FuncSyss.Split(','); foreach (string s in FuncSyssArr) { for (int i = 0; i < ssdt.Rows.Count; i++) { if (ssdt.Rows[i]["id"].ToString() == s) { ssdt.Rows[i]["checked"] = "true"; } } } } } businessPlatfrom = Newtonsoft.Json.JsonConvert.SerializeObject(ssdt); //附加設置信息 SchSystem.BLL.ServSysNape ssnBll = new SchSystem.BLL.ServSysNape(); DataTable ssndt = ssnBll.GetList("Stat=1").Tables[0]; editServSysNape = Newtonsoft.Json.JsonConvert.SerializeObject(ssndt); //获取ServFuncExt表中相应FunId的数据记录 SchSystem.BLL.ServFuncExt sfeBll = new SchSystem.BLL.ServFuncExt(); DataTable dtServFuncExt = sfeBll.GetList("FuncId,NapeCode,NapeCodes,NapeC", "FuncId='" + AutoId + "'").Tables[0]; servfuncextjson = Newtonsoft.Json.JsonConvert.SerializeObject(dtServFuncExt); //附加設置信息之附加信息聯動內容默認下拉列表 SchSystem.BLL.SysPer spBll = new SchSystem.BLL.SysPer(); DataTable dtsp = spBll.GetList("'0' pId,PerName name,PerCode id,'false' checked", "Stat=1 order by convert(int,PerCode)").Tables[0]; if (dtsp.Rows.Count > 0) { for (int i = 0; i < dtsp.Rows.Count; i++) { if (dtServFuncExt.Rows.Count > 0) { if (dtServFuncExt.Rows[0]["NapeCodes"].ToString() != "") { string[] NapeCodesArr = dtServFuncExt.Rows[0]["NapeCodes"].ToString().Split(','); for (int j = 0; j < NapeCodesArr.Length; j++) { if (dtsp.Rows[i]["id"].ToString() == NapeCodesArr[j].ToString()) { dtsp.Rows[i]["checked"] = "true"; } } } } } } selectprdcontent = Newtonsoft.Json.JsonConvert.SerializeObject(dtsp); }