protected void Page_Load(object sender, EventArgs e)
        {
            //对应套餐
            SchSystem.BLL.ServBus stBll = new SchSystem.BLL.ServBus();
            DataTable             stdt  = stBll.GetList("BusId,CnName", "").Tables[0];

            servbus = Newtonsoft.Json.JsonConvert.SerializeObject(stdt);

            //获取下拉列表
            StringBuilder sbarea = new StringBuilder();

            //获取省份
            sbarea.Append(" <div class=\"row\">");
            sbarea.Append("<div class=\"col-xs-3 text-right\">默认归属地(省):</div>");
            sbarea.Append("<div class=\"col-xs-2 text-left\">");
            sbarea.Append("<select id=\"aprov\">");
            string sareacode = "";

            sbarea.Append(Com.Public.GetDrpArea("0", "", ref sareacode, false, "0"));
            sbarea.Append("</select> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;");
            sbarea.Append(" </div>");
            //获取城市
            sbarea.Append("<div class=\"col-xs-3 text-right\">默认归属地(市):</div>");
            sbarea.Append("<div class=\"col-xs-3 text-left\">");
            sbarea.Append("<select id=\"acity\">");
            string sareacitycode = "";

            sbarea.Append(Com.Public.GetDrpArea("1", sareacode, ref sareacitycode, false, "0"));
            sbarea.Append("</select> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;");
            sbarea.Append(" </div>");
            sbarea.Append(" </div>");
            areastr = sbarea.ToString();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Com.Session.userid == null)
     {
         Response.Redirect("../../Login.aspx");
         Response.End();
     }
     else
     {
         #region 获取套餐名称和代码
         SchSystem.BLL.ServBus sbBll     = new SchSystem.BLL.ServBus();
         DataTable             dtServBus = sbBll.GetList("ServiceId,CnName", "").Tables[0];
         ServBusJson = Newtonsoft.Json.JsonConvert.SerializeObject(dtServBus);
         #endregion
         #region 獲取省市區
         //获取省份
         StringBuilder areaProvince = new StringBuilder();
         string        sareacode    = "";
         areaProvince.Append(Com.Public.GetDrpArea("0", "", ref sareacode, true, "1"));
         province = areaProvince.ToString();
         //获取城市
         StringBuilder areaCity      = new StringBuilder();
         string        sareacitycode = "";
         areaCity.Append(Com.Public.GetDrpArea("1", sareacode, ref sareacitycode, true, "1"));
         city = areaCity.ToString();
         #endregion
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            //獲取登錄者的真實姓名
            uname = Com.Session.uname;

            #region 獲取資費套餐下拉列表
            SchSystem.BLL.ServBus sbBll = new SchSystem.BLL.ServBus();
            //需求 用户订购信息中,手动添加用户订购信息时,套餐不可以是第三方系统套餐
            DataTable servbusdt = sbBll.GetList("'0' pId,ServiceId id,FeeCode,CnName name,'false' checked,BusMonth", "FrmType=0").Tables[0];
            servbustree = Newtonsoft.Json.JsonConvert.SerializeObject(servbusdt);
            #endregion

            #region 獲取省市區
            //获取省份
            StringBuilder areaProvince = new StringBuilder();
            string        sareacode    = "";
            areaProvince.Append(Com.Public.GetDrpArea("0", "", ref sareacode, false, "0"));
            areaProvince.Append("<option value=\"\" selected=\"selected\"></option>");
            province = areaProvince.ToString();

            //获取城市
            StringBuilder areaCity      = new StringBuilder();
            string        sareacitycode = "";
            areaCity.Append(Com.Public.GetDrpArea("1", sareacode, ref sareacitycode, false, "0"));
            areaCity.Append("<option value=\"\" selected=\"selected\"></option>");
            city = areaCity.ToString();
            #endregion
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SchSystem.BLL.ServBus   servbusbll   = new SchSystem.BLL.ServBus();
            SchSystem.Model.ServBus servbusmodel = new SchSystem.Model.ServBus();
            BusId        = Request.Params["BusId"].ToString();
            servbusmodel = servbusbll.GetModel(int.Parse(BusId));
            string FuncStr = ""; string sareacode = ""; string sareacitycode = "";

            if (servbusmodel != null && servbusmodel.BusId > 0)
            {
                FuncStr = servbusmodel.FuncStr;
                if (!string.IsNullOrEmpty(servbusmodel.BusArea))
                {
                    sareacode     = servbusmodel.BusArea.Substring(0, 2) + "0000";
                    sareacitycode = servbusmodel.BusArea;
                }
                umodelstr = Newtonsoft.Json.JsonConvert.SerializeObject(servbusmodel);
            }
            else
            {
                Response.Write("无该套餐!");
                Response.End();
            }
            //业务功能
            SchSystem.BLL.ServFunc servfuncBll = new SchSystem.BLL.ServFunc();
            DataTable servfuncdt = servfuncBll.GetList("'0' pId,FuncName name,FuncCode id,TypeCode,'false' checked", "").Tables[0];

            if (servfuncdt.Rows.Count > 0)
            {
                if (FuncStr != "")
                {
                    string[] ServFuncArr = FuncStr.Split(',');
                    foreach (string s in ServFuncArr)
                    {
                        for (int i = 0; i < servfuncdt.Rows.Count; i++)
                        {
                            if (servfuncdt.Rows[i]["id"].ToString() == s)
                            {
                                servfuncdt.Rows[i]["checked"] = "true";
                            }
                        }
                    }
                }
            }
            businessPlatfrom = Newtonsoft.Json.JsonConvert.SerializeObject(servfuncdt);
            #region 獲取省市區
            //获取省份
            StringBuilder areaProvince = new StringBuilder();

            areaProvince.Append(Com.Public.GetDrpArea("0", "", ref sareacode, true, "0"));
            province = areaProvince.ToString();
            //获取城市
            StringBuilder areaCity = new StringBuilder();

            areaCity.Append(Com.Public.GetDrpArea("1", sareacode, ref sareacitycode, true, "0"));
            city = areaCity.ToString();
            #endregion
        }
예제 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Com.Session.userid == null)
     {
         Response.Redirect("../../Login.aspx");
         Response.End();
     }
     else
     {
         SchSystem.BLL.ServBusThd   servbusbll   = new SchSystem.BLL.ServBusThd();
         SchSystem.Model.ServBusThd servbusmodel = new SchSystem.Model.ServBusThd();
         BusId        = Request.Params["BusId"].ToString();
         servbusmodel = servbusbll.GetModel(int.Parse(BusId));
         string FuncStr = "";
         if (servbusmodel != null && servbusmodel.BusId > 0)
         {
             umodelstr = Newtonsoft.Json.JsonConvert.SerializeObject(servbusmodel);
         }
         else
         {
             Response.Write("无该套餐!");
             Response.End();
         }
         //获取下拉列表
         StringBuilder sbarea = new StringBuilder();
         //获取省份
         sbarea.Append(" <div class=\"row\">");
         sbarea.Append("<div class=\"col-xs-3 text-right\">默认归属地(省):</div>");
         sbarea.Append("<div class=\"col-xs-2 text-left\">");
         sbarea.Append("<select id=\"aprov\">");
         string sareacode = "";
         if (servbusmodel != null && servbusmodel.BusId > 0 && servbusmodel.BusArea.Length == 6)
         {
             sareacode = servbusmodel.BusArea.Substring(0, 2) + "0000";
         }
         sbarea.Append(Com.Public.GetDrpArea("0", "", ref sareacode, false, "0"));
         sbarea.Append("</select> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;");
         sbarea.Append(" </div>");
         //获取城市
         sbarea.Append("<div class=\"col-xs-3 text-right\">默认归属地(市):</div>");
         sbarea.Append("<div class=\"col-xs-3 text-left\">");
         sbarea.Append("<select id=\"acity\">");
         string sareacitycode = "";
         if (servbusmodel != null && servbusmodel.BusId > 0 && servbusmodel.BusArea.Length == 6)
         {
             sareacitycode = servbusmodel.BusArea.Substring(0, 4) + "00";
         }
         sbarea.Append(Com.Public.GetDrpArea("1", sareacode, ref sareacitycode, false, "0"));
         sbarea.Append("</select> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;");
         sbarea.Append(" </div>");
         sbarea.Append(" </div>");
         areastr = sbarea.ToString();
         //对应套餐
         SchSystem.BLL.ServBus stBll = new SchSystem.BLL.ServBus();
         DataTable             stdt  = stBll.GetList("BusId,CnName", "").Tables[0];
         servbus = Newtonsoft.Json.JsonConvert.SerializeObject(stdt);
     }
 }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //獲取GET參數
            dotype = Request.Params["dotype"].ToString();
            string AutoId = Request.Params["id"].ToString();

            //獲取登錄者的真實姓名
            uname = Com.Session.uname;
            #region 查詢當前AutoId的數據記錄
            SchSystem.BLL.ServUserFor    sufBll    = new SchSystem.BLL.ServUserFor();
            SchSystem.Model.ServUserForV sufvModel = new SchSystem.Model.ServUserForV();
            string ServiceId = "";
            if (!string.IsNullOrEmpty(AutoId) && !string.IsNullOrEmpty(dotype))
            {
                sufvModel        = sufBll.GetModelV("AutoId,UserName,UTname,CnName,FromType,RecUser,ServiceId,ServStat,ServMonth,FeeM,RecTime,EndTime,EditTime,DoNote,Uareano,BusMonth,FeeCode", int.Parse(AutoId));
                ServiceId        = sufvModel.ServiceId;
                servUserForModel = Newtonsoft.Json.JsonConvert.SerializeObject(sufvModel);
            }
            #endregion
            #region 獲取資費套餐下拉列表
            SchSystem.BLL.ServBus sbBll     = new SchSystem.BLL.ServBus();
            DataTable             servbusdt = sbBll.GetList("'0' pId,ServiceId id,FeeCode,CnName name,'false' checked,BusMonth,'true' chkDisabled", "").Tables[0];
            if (servbusdt.Rows.Count > 0)
            {
                for (int i = 0; i < servbusdt.Rows.Count; i++)
                {
                    if (servbusdt.Rows[i]["id"].ToString() == ServiceId)
                    {
                        servbusdt.Rows[i]["checked"] = true;
                    }
                }
            }
            servbustree = Newtonsoft.Json.JsonConvert.SerializeObject(servbusdt);
            #endregion

            #region 獲取省市區
            //获取省份
            StringBuilder areaProvince = new StringBuilder();
            string        sareacode    = "";
            areaProvince.Append(Com.Public.GetDrpArea("0", "", ref sareacode, false, "0"));
            province = areaProvince.ToString();
            //获取城市
            StringBuilder areaCity      = new StringBuilder();
            string        sareacitycode = "";
            areaCity.Append(Com.Public.GetDrpArea("1", sareacode, ref sareacitycode, false, "0"));
            city = areaCity.ToString();
            #endregion
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Com.Session.userid == null)
                {
                    Response.Redirect("../../Login.aspx");
                    Response.End();
                }
                else
                {
                    schid = Com.Session.schid;

                    //套餐名称和资费金额
                    SchSystem.BLL.ServBus servbusbll = new SchSystem.BLL.ServBus();
                    DataTable             stdt       = servbusbll.GetList("CnName,FeeCode", "").Tables[0];
                    cnnamefeecode = Newtonsoft.Json.JsonConvert.SerializeObject(stdt);
                }
            }
        }
예제 #8
0
 public static Com.DataPack.DataRsp <string> ServBusEditSave(List <string> arr)
 {
     Com.DataPack.DataRsp <string> rsp = new Com.DataPack.DataRsp <string>();
     if (Com.Session.userid == null)
     {
         rsp.code = "expire";
         rsp.msg  = "你现在登录已过期,请重新登录!";
     }
     else
     {
         string currentCnName = ""; string currentCode = "";
         try
         {
             SchSystem.BLL.ServBus   servbusbll   = new SchSystem.BLL.ServBus();
             SchSystem.Model.ServBus servbusmodel = new SchSystem.Model.ServBus();
             foreach (string str in arr)
             {
                 string[] strarr = str.Split('#');
                 if (strarr[0] == "BusId")
                 {
                     servbusmodel.BusId = Convert.ToInt32(strarr[1]);
                 }
                 else if (strarr[0] == "ServiceId")
                 {
                     servbusmodel.ServiceId = strarr[1];
                 }
                 else if (strarr[0] == "CnName")
                 {
                     servbusmodel.CnName = strarr[1].Trim();
                 }
                 else if (strarr[0] == "BusType")
                 {
                     servbusmodel.BusType = Convert.ToInt32(strarr[1]);
                 }
                 else if (strarr[0] == "FeeCode")
                 {
                     servbusmodel.FeeCode = strarr[1].Trim();
                 }
                 else if (strarr[0] == "BusMonth")
                 {
                     servbusmodel.BusMonth = Convert.ToInt32(strarr[1]);
                 }
                 else if (strarr[0] == "FuncStr")
                 {
                     servbusmodel.FuncStr = strarr[1].Trim();
                 }
                 else if (strarr[0] == "BusNote")
                 {
                     servbusmodel.BusNote = strarr[1].Trim();
                 }
                 else if (strarr[0] == "Note")
                 {
                     servbusmodel.Note = strarr[1].Trim();
                 }
                 else if (strarr[0] == "cnname")
                 {
                     currentCnName = strarr[1].Trim();
                 }
                 else if (strarr[0] == "code")
                 {
                     currentCode = strarr[1].Trim();
                 }
                 else if (strarr[0] == "BusUrl")
                 {
                     servbusmodel.BusUrl = strarr[1].Trim();
                 }
                 else if (strarr[0] == "CapName")
                 {
                     servbusmodel.CapName = strarr[1].Trim();
                 }
                 else if (strarr[0] == "acity")
                 {
                     servbusmodel.BusArea = strarr[1].Trim();
                 }
                 else if (strarr[0] == "FrmType")
                 {
                     servbusmodel.FrmType = int.Parse(strarr[1]);
                 }
             }
             DataTable cnnamedt = servbusbll.ExistsCnNameUpdate(servbusmodel.CnName, 0, currentCnName).Tables[0];
             DataTable codedt   = servbusbll.ExistsCodeUpdate(servbusmodel.ServiceId, 0, currentCode).Tables[0];
             if (servbusmodel.CnName == "" || servbusmodel.CapName == "")
             {
                 rsp.code = "error";
                 rsp.msg  = "操作失败!不允许输入空格";
             }
             else if (cnnamedt.Rows.Count > 0)
             {
                 rsp.code = "namecf";
                 rsp.msg  = "套餐名称不允许重复!";
             }
             else if (codedt.Rows.Count > 0)
             {
                 rsp.code = "codecf";
                 rsp.msg  = "套餐代码不允许重复!";
             }
             else if (servbusbll.ExistsCapNameRepeat(servbusmodel.BusId, servbusmodel.CapName))
             {
                 rsp.code = "capname";
                 rsp.msg  = "系统显示名称不允许重复";
             }
             else
             {
                 if (servbusbll.Update(servbusmodel))
                 {
                     rsp.code = "success";
                     rsp.msg  = "操作成功!";
                 }
                 else
                 {
                     rsp.code = "error";
                     rsp.msg  = "操作失败!";
                 }
             }
         }
         catch (Exception ex)
         {
             rsp.code = "ExcepError";
             rsp.msg  = ex.Message;
         }
     }
     return(rsp);
 }
예제 #9
0
        public static string getServFunc(string ordpack)
        {
            string ret = "";

            if (Com.Session.userid == null)
            {
                ret = "expire";
            }
            else
            {
                retprompt retobj = new retprompt();
                //根據套餐代碼查詢功能代碼
                SchSystem.BLL.ServBus sbBll = new SchSystem.BLL.ServBus();
                string funcstr = sbBll.GetList("FuncStr", "ServiceId='" + ordpack + "'").Tables[0].Rows[0]["FuncStr"].ToString();
                string funcs   = "";
                if (!string.IsNullOrEmpty(funcstr))
                {
                    string[] funcstrarr = funcstr.Split(',');
                    foreach (string str in funcstrarr)
                    {
                        funcs += "'" + str + "',";
                    }
                }
                //根據功能代碼查詢功能名稱以及編號
                SchSystem.BLL.ServFunc sfBll = new SchSystem.BLL.ServFunc();
                DataTable dtServFunc         = sfBll.GetList("AutoId,FuncName,FuncCode", "FuncCode in (" + funcs.Substring(0, funcs.Length - 1) + ")").Tables[0];

                retobj.retxt  = "servfunc";
                retobj.retobj = dtServFunc;
                //根據功能AutoId查詢功能擴展數據
                SchSystem.BLL.ServFuncExt sfeBll = new SchSystem.BLL.ServFuncExt();
                DataTable dtServFuncExt          = sfeBll.GetList("FuncId,NapeCode,NapeCodes,NapeC,'' Title", "FuncId in(select AutoId from ServFunc where FuncCode in(" + funcs.Substring(0, funcs.Length - 1) + "))").Tables[0];
                retobj.servfuncext = dtServFuncExt;
                Dictionary <string, object> listDic = new Dictionary <string, object>();
                if (dtServFuncExt.Rows.Count > 0)
                {
                    for (int i = 0; i < dtServFuncExt.Rows.Count; i++)
                    {
                        for (int j = 0; j < dtServFunc.Rows.Count; j++)
                        {
                            if (dtServFuncExt.Rows[i]["FuncId"].ToString() == dtServFunc.Rows[j]["AutoId"].ToString())
                            {
                                SchSystem.BLL.ServUserForExt sufeBll = new SchSystem.BLL.ServUserForExt();
                                DataTable dtsufe = sufeBll.GetList("Fcode,NapeCode,NapeCodes", "UserForId in (select AutoId from ServUserFor where ServiceId='" + ordpack + "')").Tables[0];
                                if (dtServFuncExt.Rows[i]["NapeCode"].ToString() == "prd")
                                {
                                    SchSystem.BLL.SysPer spBll    = new SchSystem.BLL.SysPer();
                                    DataTable            dtSysPer = spBll.GetList("'0' pId,PerName name,PerCode id,'false' checked,'true' chkDisabled", "Stat=1 and PerCode in (" + dtServFuncExt.Rows[i]["NapeCodes"].ToString() + ") order by convert(int,PerCode)").Tables[0];
                                    dtServFuncExt.Rows[i]["Title"] = "学段";
                                    string prdtxt = "prd_" + dtServFuncExt.Rows[i]["FuncId"].ToString();
                                    //
                                    if (dtSysPer.Rows.Count > 0)
                                    {
                                        for (int y = 0; y < dtSysPer.Rows.Count; y++)
                                        {
                                            if (dtsufe.Rows.Count > 0)
                                            {
                                                for (int z = 0; z < dtsufe.Rows.Count; z++)
                                                {
                                                    if (dtsufe.Rows[z]["Fcode"].ToString() == dtServFunc.Rows[j]["FuncCode"].ToString() && dtServFuncExt.Rows[i]["NapeCode"].ToString() == dtsufe.Rows[z]["NapeCode"].ToString())
                                                    {
                                                        if (!string.IsNullOrEmpty(dtsufe.Rows[z]["NapeCodes"].ToString()))
                                                        {
                                                            string[] ncarr = dtsufe.Rows[z]["NapeCodes"].ToString().Split(',');
                                                            for (int x = 0; x < ncarr.Length; x++)
                                                            {
                                                                if (ncarr[x].ToString() == dtSysPer.Rows[y]["id"].ToString())
                                                                {
                                                                    dtSysPer.Rows[y]["checked"] = true;
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    //
                                    listDic.Add(prdtxt, dtSysPer);
                                }
                                if (dtServFuncExt.Rows[i]["NapeCode"].ToString() == "mat")
                                {
                                    SchSystem.BLL.SysMater smBll = new SchSystem.BLL.SysMater();
                                    DataTable dtSysMat           = smBll.GetList("'0' pId,MaterName name,MaterCode id,'false' checked,'true' chkDisabled", "Stat=1 and MaterCode in (" + dtServFuncExt.Rows[i]["NapeCodes"].ToString() + ")").Tables[0];
                                    dtServFuncExt.Rows[i]["Title"] = "教版";
                                    string prdtxt = "mat_" + dtServFuncExt.Rows[i]["FuncId"].ToString();
                                    //
                                    if (dtSysMat.Rows.Count > 0)
                                    {
                                        for (int y = 0; y < dtSysMat.Rows.Count; y++)
                                        {
                                            if (dtsufe.Rows.Count > 0)
                                            {
                                                for (int z = 0; z < dtsufe.Rows.Count; z++)
                                                {
                                                    if (dtsufe.Rows[z]["Fcode"].ToString() == dtServFunc.Rows[j]["FuncCode"].ToString() && dtServFuncExt.Rows[i]["NapeCode"].ToString() == dtsufe.Rows[z]["NapeCode"].ToString())
                                                    {
                                                        if (!string.IsNullOrEmpty(dtsufe.Rows[z]["NapeCodes"].ToString()))
                                                        {
                                                            string[] ncarr = dtsufe.Rows[z]["NapeCodes"].ToString().Split(',');
                                                            for (int x = 0; x < ncarr.Length; x++)
                                                            {
                                                                if (ncarr[x].ToString() == dtSysMat.Rows[y]["id"].ToString())
                                                                {
                                                                    dtSysMat.Rows[y]["checked"] = true;
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    //
                                    listDic.Add(prdtxt, dtSysMat);
                                }
                                if (dtServFuncExt.Rows[i]["NapeCode"].ToString() == "sub")
                                {
                                    SchSystem.BLL.SysSub ssBll    = new SchSystem.BLL.SysSub();
                                    DataTable            dtSysSub = ssBll.GetList("'0' pId,SubName name,SubCode id,'false' checked,'true' chkDisabled", "Stat=1 and SubCode in (" + dtServFuncExt.Rows[i]["NapeCodes"].ToString() + ")").Tables[0];
                                    dtServFuncExt.Rows[i]["Title"] = "科目";
                                    string prdtxt = "sub_" + dtServFuncExt.Rows[i]["FuncId"].ToString();
                                    //
                                    if (dtSysSub.Rows.Count > 0)
                                    {
                                        for (int y = 0; y < dtSysSub.Rows.Count; y++)
                                        {
                                            if (dtsufe.Rows.Count > 0)
                                            {
                                                for (int z = 0; z < dtsufe.Rows.Count; z++)
                                                {
                                                    if (dtsufe.Rows[z]["Fcode"].ToString() == dtServFunc.Rows[j]["FuncCode"].ToString() && dtServFuncExt.Rows[i]["NapeCode"].ToString() == dtsufe.Rows[z]["NapeCode"].ToString())
                                                    {
                                                        if (!string.IsNullOrEmpty(dtsufe.Rows[z]["NapeCodes"].ToString()))
                                                        {
                                                            string[] ncarr = dtsufe.Rows[z]["NapeCodes"].ToString().Split(',');
                                                            for (int x = 0; x < ncarr.Length; x++)
                                                            {
                                                                if (ncarr[x].ToString() == dtSysSub.Rows[y]["id"].ToString())
                                                                {
                                                                    dtSysSub.Rows[y]["checked"] = true;
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    //
                                    listDic.Add(prdtxt, dtSysSub);
                                }
                                if (dtServFuncExt.Rows[i]["NapeCode"].ToString() == "grd")
                                {
                                    SchSystem.BLL.SysGrade sgBll = new SchSystem.BLL.SysGrade();
                                    DataTable dtSysGrade         = sgBll.GetList("'0' pId,GradeName name,GradeCode id,'false' checked,'true' chkDisabled", "GradeCode in (" + dtServFuncExt.Rows[i]["NapeCodes"].ToString() + ")").Tables[0];
                                    dtServFuncExt.Rows[i]["Title"] = "年级";
                                    string prdtxt = "grd_" + dtServFuncExt.Rows[i]["FuncId"].ToString();
                                    //
                                    if (dtSysGrade.Rows.Count > 0)
                                    {
                                        for (int y = 0; y < dtSysGrade.Rows.Count; y++)
                                        {
                                            if (dtsufe.Rows.Count > 0)
                                            {
                                                for (int z = 0; z < dtsufe.Rows.Count; z++)
                                                {
                                                    if (dtsufe.Rows[z]["Fcode"].ToString() == dtServFunc.Rows[j]["FuncCode"].ToString() && dtServFuncExt.Rows[i]["NapeCode"].ToString() == dtsufe.Rows[z]["NapeCode"].ToString())
                                                    {
                                                        if (!string.IsNullOrEmpty(dtsufe.Rows[z]["NapeCodes"].ToString()))
                                                        {
                                                            string[] ncarr = dtsufe.Rows[z]["NapeCodes"].ToString().Split(',');
                                                            for (int x = 0; x < ncarr.Length; x++)
                                                            {
                                                                if (ncarr[x].ToString() == dtSysGrade.Rows[y]["id"].ToString())
                                                                {
                                                                    dtSysGrade.Rows[y]["checked"] = true;
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    //
                                    listDic.Add(prdtxt, dtSysGrade);
                                }
                                if (dtServFuncExt.Rows[i]["NapeCode"].ToString() == "utp")
                                {
                                    SchSystem.BLL.SysUType sutBll = new SchSystem.BLL.SysUType();
                                    DataTable dtSysUType          = sutBll.GetList("'0' pId,UTypeName name,UTypeCode id,'false' checked,'true' chkDisabled", "Stat=1 and UTypeCode in (" + dtServFuncExt.Rows[i]["NapeCodes"].ToString() + ")").Tables[0];
                                    dtServFuncExt.Rows[i]["Title"] = "角色";
                                    string prdtxt = "utp_" + dtServFuncExt.Rows[i]["FuncId"].ToString();
                                    //
                                    if (dtSysUType.Rows.Count > 0)
                                    {
                                        for (int y = 0; y < dtSysUType.Rows.Count; y++)
                                        {
                                            if (dtsufe.Rows.Count > 0)
                                            {
                                                for (int z = 0; z < dtsufe.Rows.Count; z++)
                                                {
                                                    if (dtsufe.Rows[z]["Fcode"].ToString() == dtServFunc.Rows[j]["FuncCode"].ToString() && dtServFuncExt.Rows[i]["NapeCode"].ToString() == dtsufe.Rows[z]["NapeCode"].ToString())
                                                    {
                                                        if (!string.IsNullOrEmpty(dtsufe.Rows[z]["NapeCodes"].ToString()))
                                                        {
                                                            string[] ncarr = dtsufe.Rows[z]["NapeCodes"].ToString().Split(',');
                                                            for (int x = 0; x < ncarr.Length; x++)
                                                            {
                                                                if (ncarr[x].ToString() == dtSysUType.Rows[y]["id"].ToString())
                                                                {
                                                                    dtSysUType.Rows[y]["checked"] = true;
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    //
                                    listDic.Add(prdtxt, dtSysUType);
                                }
                            }
                        }
                    }
                    retobj.sysext = listDic;
                }
                ret = Newtonsoft.Json.JsonConvert.SerializeObject(retobj);
            }
            return(ret);
        }
 public static Com.DataPack.DataRsp <string> ServBusAddSave(List <string> arr)
 {
     Com.DataPack.DataRsp <string> rsp = new Com.DataPack.DataRsp <string>();
     if (Com.Session.userid == null)
     {
         rsp.code = "expire";
         rsp.msg  = "你现在登录已过期,请重新登录!";
     }
     else
     {
         SchSystem.BLL.ServBus   servbusbll   = new SchSystem.BLL.ServBus();
         SchSystem.Model.ServBus servbusmodel = new SchSystem.Model.ServBus();
         try
         {
             foreach (string str in arr)
             {
                 string[] strarr = str.Split('#');
                 if (strarr[0] == "ServiceId")
                 {
                     servbusmodel.ServiceId = strarr[1];
                 }
                 else if (strarr[0] == "CnName")
                 {
                     servbusmodel.CnName = strarr[1].Trim();
                 }
                 else if (strarr[0] == "BusType")
                 {
                     servbusmodel.BusType = Convert.ToInt32(strarr[1]);
                 }
                 else if (strarr[0] == "FeeCode")
                 {
                     servbusmodel.FeeCode = strarr[1].Trim();
                 }
                 else if (strarr[0] == "BusMonth")
                 {
                     servbusmodel.BusMonth = Convert.ToInt32(strarr[1]);
                 }
                 else if (strarr[0] == "FuncStr")
                 {
                     servbusmodel.FuncStr = strarr[1].Trim();
                 }
                 else if (strarr[0] == "BusNote")
                 {
                     servbusmodel.BusNote = strarr[1].Trim();
                 }
                 else if (strarr[0] == "Note")
                 {
                     servbusmodel.Note = strarr[1].Trim();
                 }
                 else if (strarr[0] == "BusUrl")
                 {
                     servbusmodel.BusUrl = strarr[1].Trim();
                 }
                 else if (strarr[0] == "CapName")
                 {
                     servbusmodel.CapName = strarr[1].Trim();
                 }
                 else if (strarr[0] == "acity")
                 {
                     servbusmodel.BusArea = strarr[1].Trim();
                 }
                 else if (strarr[0] == "FrmType")
                 {
                     servbusmodel.FrmType = int.Parse(strarr[1]);
                 }
             }
             if (servbusmodel.CnName == "" || servbusmodel.CapName == "")
             {
                 rsp.code = "error";
                 rsp.msg  = "操作失败!不允许输入空格";
             }
             else if (servbusbll.ExistsServiceId(0, servbusmodel.ServiceId))
             {
                 rsp.code = "code";
                 rsp.msg  = "套餐代码不允许重复";
             }
             else if (servbusbll.ExistsCnName(0, servbusmodel.CnName))
             {
                 rsp.code = "zhcf";
                 rsp.msg  = "套餐名称不允许重复";
             }
             else if (servbusbll.ExistsCapNameRepeat(servbusmodel.CapName))
             {
                 rsp.code = "capname";
                 rsp.msg  = "系统显示名称不允许重复";
             }
             else
             {
                 int result = servbusbll.Add(servbusmodel);
                 if (result > 0)
                 {
                     rsp.code = "success";
                     rsp.msg  = "操作成功";
                 }
                 else
                 {
                     rsp.code = "error";
                     rsp.msg  = "操作失败";
                 }
             }
         }
         catch (Exception ex)
         {
             rsp.code = "error";
             rsp.msg  = ex.Message;
         }
     }
     return(rsp);
 }
예제 #11
0
 public static Com.DataPack.DataRsp <string> page(string PageIndex, string PageSize, string ServiceId, string CnName, string FeeCode, string BusMonth)
 {
     Com.DataPack.DataRsp <string> rsp = new Com.DataPack.DataRsp <string>();
     if (Com.Session.userid == null)
     {
         rsp.code = "expire";
         rsp.msg  = "你现在登录已过期,请重新登录!";
     }
     else
     {
         SchSystem.BLL.ServBus servbusbll = new SchSystem.BLL.ServBus();
         string strwhere = "1=1 ";
         if (!string.IsNullOrEmpty(ServiceId))
         {
             strwhere += " and ServiceId = '" + Com.Public.SqlEncStr(ServiceId) + "'";
         }
         if (!string.IsNullOrEmpty(CnName))
         {
             strwhere += " and CnName = '" + Com.Public.SqlEncStr(CnName) + "'";
         }
         if (!string.IsNullOrEmpty(FeeCode))
         {
             strwhere += " and FeeCode = '" + Com.Public.SqlEncStr(FeeCode) + "'";
         }
         if (!string.IsNullOrEmpty(BusMonth))
         {
             strwhere += " and BusMonth = '" + Com.Public.SqlEncStr(BusMonth) + "'";
         }
         Com.Public.PageModelResp pages = new Com.Public.PageModelResp();
         pages.PageIndex = int.Parse(PageIndex);
         pages.PageSize  = int.Parse(PageSize);
         int rowc = 0;
         int pc   = 0;
         try
         {
             string    dbcols = "BusId,ServiceId,FeeCode,CnName,FuncStr,BusMonth,BusNote,BusType,BusUrl,Note,CapName,BusArea,FrmType";
             DataTable dt     = servbusbll.GetListCols(dbcols, strwhere, "BusId", "DESC", pages.PageIndex, pages.PageSize, ref rowc, ref pc).Tables[0];
             pages.PageCount = pc;
             pages.RowCount  = rowc;
             if (dt.Rows.Count > 0)
             {
                 dt.Columns.Add("TBusType");
                 dt.Columns.Add("TBusMonth");
                 dt.Columns.Add("TServFuncName");
                 dt.Columns.Add("Province");
                 dt.Columns.Add("City");
                 for (int i = 0; i < dt.Rows.Count; i++)
                 {
                     string FuncStr = dt.Rows[i]["FuncStr"].ToString();
                     if (FuncStr != "")
                     {
                         string[] FuncStrArr = FuncStr.Split(',');
                         string   FuncStrstr = "";
                         foreach (string s in FuncStrArr)
                         {
                             FuncStrstr += "'" + s + "',";
                         }
                         FuncStr = FuncStrstr.Substring(0, FuncStrstr.Length - 1);
                     }
                     dt.Rows[i]["TServFuncName"] = servbusbll.GetFuncNames("FuncCode in (" + FuncStr + ")");
                     dt.Rows[i]["TBusType"]      = dt.Rows[i]["BusType"].ToString() == "1" ? " 自定义套餐" : "CP套餐";
                     dt.Rows[i]["TBusMonth"]     = Com.Public.InttoMonth(Convert.ToInt32(dt.Rows[i]["BusMonth"]));
                     if (!string.IsNullOrEmpty(dt.Rows[i]["BusArea"].ToString()))
                     {
                         dt.Rows[i]["Province"] = Com.Public.GetSSQ("0", dt.Rows[i]["BusArea"].ToString());
                         dt.Rows[i]["City"]     = Com.Public.GetSSQ("1", dt.Rows[i]["BusArea"].ToString());
                     }
                     else
                     {
                         dt.Rows[i]["Province"] = "";
                         dt.Rows[i]["City"]     = "";
                     }
                 }
                 pages.list = dt;
             }
         }
         catch (Exception ex)
         {
             rsp.code = "ExcepError";
             rsp.msg  = ex.Message;
         }
         rsp.RspData = Newtonsoft.Json.JsonConvert.SerializeObject(pages);
     }
     return(rsp);
 }