Ejemplo n.º 1
0
        public string GetOptionServicePanel_Group(int ID)
        {
            List <Lebi_ServicePanel_Group> models = B_Lebi_ServicePanel_Group.GetList("Supplier_id=0", "Sort desc");
            string str = "";

            foreach (Lebi_ServicePanel_Group model in models)
            {
                string sel = "";
                if (ID == model.id)
                {
                    sel = "selected";
                }
                str += "<option value=\"" + model.id + "\" " + sel + ">" + model.Name + "</option>";
            }
            return(str);
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_servicepanel_list", "客服面板"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }
            PageSize     = RequestTool.getpageSize(25);
            key          = RequestTool.RequestString("key");
            string where = "Supplier_id = " + CurrentSupplier.id + "";
            if (key != "")
            {
                where += " and Name like lbsql{'%" + key + "%'}";
            }
            models = B_Lebi_ServicePanel_Group.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_ServicePanel_Group.Counts(where);

            PageString = Shop.Bussiness.Pager.GetPaginationString("?page={0}&key=" + key, page, PageSize, recordCount);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 批量更新客服面板部门信息
        /// </summary>
        public void ServicePanel_Group_Update()
        {
            if (!Power("supplier_servicepanel_list", "客服面板"))
            {
                AjaxNoPower();
                return;
            }
            string id = RequestTool.RequestSafeString("Uid");
            List <Lebi_ServicePanel_Group> models = B_Lebi_ServicePanel_Group.GetList("Supplier_id = " + CurrentSupplier.id + " and id in (lbsql{" + id + "})", "");

            foreach (Lebi_ServicePanel_Group model in models)
            {
                model.Sort = RequestTool.RequestInt("Sort" + model.id + "", 0);
                model.Name = RequestTool.RequestSafeString("Name" + model.id);
                B_Lebi_ServicePanel_Group.Update(model);
            }
            Log.Add("编辑客服部门", "ServicePanel_Group", id.ToString(), CurrentSupplier, id.ToString());
            Response.Write("{\"msg\":\"OK\"}");
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("servicepanel_group_list", "客服面板部门列表"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            PageSize     = RequestTool.getpageSize(25);
            lang         = RequestTool.RequestString("lang");
            key          = RequestTool.RequestString("key");
            string where = "Supplier_id=0";
            if (key != "")
            {
                where += " and Name like lbsql{'%" + key + "%'}";
            }
            //if (lang != "")
            //    where += " and Language like lbsql{'%" + lang + "%'}";
            if (site.SiteCount > 1 && CurrentAdmin.Site_ids != "")
            {
                string sonwhere         = "";
                List <Lebi_Language> ls = B_Lebi_Language.GetList("Site_id in (" + CurrentAdmin.Site_ids + ")", "");
                foreach (Lebi_Language l in ls)
                {
                    if (sonwhere == "")
                    {
                        sonwhere = "','+Language_ids+',' like '%," + l.id + ",%'";
                    }
                    else
                    {
                        sonwhere += " or ','+Language_ids+',' like '%," + l.id + ",%'";
                    }
                }
                where += " and (" + sonwhere + " or Language_ids='')";
            }
            models = B_Lebi_ServicePanel_Group.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_ServicePanel_Group.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key, page, PageSize, recordCount);
        }