protected void Page_Load(object sender, EventArgs e)
        {
            string SysType = Request.Params["systype"].ToString();

            if (SysType == "e")//修改,不能修改用户的类型及学校参数
            {
                btname = "修改";
                id     = Request.Params["autoid"].ToString();
                //先得到操作类型
                SchSystem.BLL.ServSysNape   bll   = new SchSystem.BLL.ServSysNape();
                SchSystem.Model.ServSysNape model = bll.GetModel(int.Parse(id));
                if (model != null && model.AutoId > 0)
                {
                    code = model.NapeCode;
                    name = model.NapeName;
                    stat = model.Stat.ToString();
                }
                else
                {
                    Response.Write("无该名称!");
                    Response.End();
                }
            }
            else//不在添加及修改之内,则返回
            {
            }
        }
        public static Com.DataPack.DataRsp <string> page(string PageIndex, string PageSize)
        {
            Com.DataPack.DataRsp <string> rsp = new Com.DataPack.DataRsp <string>();
            if (Com.Session.userid == null)
            {
                rsp.code = "expire";
                rsp.msg  = "页面已经过期,请重新登录";
            }
            else
            {
                try
                {
                    SchSystem.BLL.ServSysNape servsysnape = new SchSystem.BLL.ServSysNape();
                    string strwhere = "Stat<2 ";
                    Com.Public.PageModelResp pages = new Com.Public.PageModelResp();
                    pages.PageIndex = int.Parse(PageIndex);
                    pages.PageSize  = int.Parse(PageSize);
                    int rowc = 0;
                    int pc   = 0;

                    DataTable dt = servsysnape.GetListCols("AutoId,NapeName,NapeCode,Stat", strwhere, "NapeCode", "ASC", pages.PageIndex, pages.PageSize, ref rowc, ref pc).Tables[0];
                    pages.PageCount = pc;
                    pages.RowCount  = rowc;
                    if (dt.Rows.Count > 0)
                    {
                        //dt.Columns.Add("Ustat");
                        //dt.Columns.Add("Ucity");
                        //for (int i = 0; i < dt.Rows.Count; i++)
                        //{
                        //    dt.Rows[i]["Ustat"] = dt.Rows[i]["Stat"].ToString() == "1" ? "正常" : "停用";
                        //    dt.Rows[i]["Ucity"] = dt.Rows[i]["iscity"].ToString() == "1" ? "城区" : "非城区";
                        //}
                        pages.list = dt;
                    }
                    rsp.data = Newtonsoft.Json.JsonConvert.SerializeObject(pages);
                }
                catch (Exception ex)
                {
                    rsp.code = "error";
                    rsp.msg  = ex.Message;
                }
            }
            return(rsp);
        }
 public static Com.DataPack.DataRsp <string> save(string Name, string stat, string AutoId, string Code)
 {
     Com.DataPack.DataRsp <string> rsp = new Com.DataPack.DataRsp <string>();
     if (Com.Session.userid == null)
     {
         rsp.code = "expire";
         rsp.msg  = "页面已经过期,请重新登录";
     }
     else
     {
         try
         {
             SchSystem.BLL.ServSysNape   ServSysNape_bll   = new SchSystem.BLL.ServSysNape();
             SchSystem.Model.ServSysNape ServSysNape_model = new SchSystem.Model.ServSysNape();
             ServSysNape_model.NapeName = Com.Public.SqlEncStr(Name.Trim()).ToString();
             ServSysNape_model.Stat     = Convert.ToInt32(Com.Public.SqlEncStr(stat));
             ServSysNape_model.NapeCode = Com.Public.SqlEncStr(Code.Trim()).ToString();
             if (AutoId != "")
             {
                 ServSysNape_model.AutoId = Convert.ToInt32(AutoId);
                 if (ServSysNape_bll.Update(ServSysNape_model))
                 {
                     rsp.code = "success";
                     rsp.msg  = "修改成功";
                 }
             }
             else
             {
                 if (ServSysNape_bll.Add(ServSysNape_model) != 0)
                 {
                     rsp.code = "success";
                     rsp.msg  = "添加成功";
                 }
             }
         }
         catch (Exception ex)
         {
             rsp.code = "error";
             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);
        }
        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);
        }