public static Com.DataPack.DataRsp <string> page(string PageIndex, string PageSize, string txtname, string ustat, string schid)
        {
            Com.DataPack.DataRsp <string> rsp = new Com.DataPack.DataRsp <string>();
            if (Com.Session.userid == null)
            {
                rsp.code = "expire";
                rsp.msg  = "你现在登录已过期,请重新登录!";
            }
            else
            {
                try
                {
                    SchSystem.BLL.ServSys ssBll = new SchSystem.BLL.ServSys();

                    string strwhere = "";

                    //if (schid != "")
                    //{
                    //    strwhere += " and SchId = '" + Com.Public.SqlEncStr(schid) + "'";
                    //}

                    Com.Public.PageModelResp pages = new Com.Public.PageModelResp();
                    pages.PageIndex = int.Parse(PageIndex);
                    pages.PageSize  = int.Parse(PageSize);
                    int       rowc   = 0;
                    int       pc     = 0;
                    string    dbcols = "SysName,SysCode,SysUrl";
                    DataTable dt     = ssBll.GetListCols(dbcols, strwhere, "AutoId", "DESC", pages.PageIndex, pages.PageSize, ref rowc, ref pc).Tables[0];
                    pages.PageCount = pc;
                    pages.RowCount  = rowc;
                    if (dt.Rows.Count > 0)
                    {
                        pages.list = dt;
                    }
                    rsp.RspData = Newtonsoft.Json.JsonConvert.SerializeObject(pages);
                }
                catch (Exception ex)
                {
                    rsp.code = "excepError";
                    rsp.msg  = ex.Message;
                }
            }
            return(rsp);
        }
        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);
        }
 public static Com.DataPack.DataRsp <string> ServSysAddSave(List <string> arr)
 {
     Com.DataPack.DataRsp <string> rsp = new Com.DataPack.DataRsp <string>();
     if (Com.Session.userid == null)
     {
         rsp.code = "expire";
         rsp.msg  = "你现在登录已过期,请重新登录!";
     }
     else
     {
         try
         {
             SchSystem.BLL.ServSys   ssBll   = new SchSystem.BLL.ServSys();
             SchSystem.Model.ServSys ssModel = new SchSystem.Model.ServSys();
             foreach (string str in arr)
             {
                 string[] strarr = str.Split('#');
                 //if (strarr[0] == "schid") { schid = int.Parse(strarr[1]); }
                 if (strarr[0] == "code")
                 {
                     ssModel.SysCode = strarr[1].Trim();
                 }
                 if (strarr[0] == "type")
                 {
                     ssModel.SysName = strarr[1].Trim();
                 }
                 if (strarr[0] == "url")
                 {
                     ssModel.SysUrl = strarr[1].Trim();
                 }
             }
             if (ssModel.SysCode == "" || ssModel.SysName == "" || ssModel.SysUrl == "")
             {
                 rsp.code = "error";
                 rsp.msg  = "操作失败!不允许输入空格";
             }
             else
             {
                 if (getStringLength(ssModel.SysUrl) > 300)
                 {
                     rsp.code = "error";
                     rsp.msg  = "平台域名不允许超过30个字符";
                 }
                 else
                 {
                     bool resbool = ssBll.Exists(ssModel.SysCode);
                     if (!resbool)
                     {
                         int result = ssBll.Add(ssModel);
                         if (result > 0)
                         {
                             rsp.code = "success";
                             rsp.msg  = "操作成功";
                         }
                         else
                         {
                             rsp.code = "error";
                             rsp.msg  = "操作失败";
                         }
                     }
                     else
                     {
                         rsp.code = "PlatCodeRepeat";
                         rsp.msg  = "平台代码不允许重复";
                     }
                 }
             }
         }
         catch (Exception ex)
         {
             rsp.code = "ExcepError";
             rsp.msg  = ex.Message;
         }
     }
     return(rsp);
 }
        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);
        }