Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = RequestTool.RequestInt("id", 0);

            if (!Power("supplier_servicepanel_list", "客服面板"))
            {
                WindowNoPower();
            }
            model = B_Lebi_ServicePanel.GetModel("Supplier_id = " + CurrentSupplier.id + " and id = " + id);
            if (model == null)
            {
                model = new Lebi_ServicePanel();
            }
        }
Exemplo 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.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_ServicePanel.Counts(where);

            PageString = Shop.Bussiness.Pager.GetPaginationString("?page={0}&key=" + key, page, PageSize, recordCount);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 删除客服面板成员信息
        /// </summary>
        public void ServicePanel_Del()
        {
            if (!Power("supplier_servicepanel_list", "客服面板"))
            {
                AjaxNoPower();
                return;
            }
            string id = RequestTool.RequestSafeString("ids");

            if (id == "")
            {
                Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}");
                return;
            }
            B_Lebi_ServicePanel.Delete("Supplier_id = " + CurrentSupplier.id + " and id in (lbsql{" + id + "})");
            Log.Add("删除客服成员", "ServicePanel", id.ToString(), CurrentSupplier, id.ToString());
            Response.Write("{\"msg\":\"OK\"}");
        }
Exemplo n.º 4
0
        /// <summary>
        /// 批量更新客服面板成员信息
        /// </summary>
        public void ServicePanel_Update()
        {
            if (!Power("supplier_servicepanel_list", "客服面板"))
            {
                AjaxNoPower();
                return;
            }
            string id = RequestTool.RequestSafeString("Uid");
            List <Lebi_ServicePanel> models = B_Lebi_ServicePanel.GetList("Supplier_id = " + CurrentSupplier.id + " and id in (lbsql{" + id + "})", "");

            foreach (Lebi_ServicePanel model in models)
            {
                model.Sort    = RequestTool.RequestInt("Sort" + model.id + "", 0);
                model.Name    = RequestTool.RequestSafeString("Name" + model.id);
                model.Account = RequestTool.RequestSafeString("Account" + model.id);
                B_Lebi_ServicePanel.Update(model);
            }
            Log.Add("编辑客服成员", "ServicePanel", id.ToString(), CurrentSupplier, id.ToString());
            Response.Write("{\"msg\":\"OK\"}");
        }
Exemplo n.º 5
0
        /// <summary>
        /// 删除商家
        /// </summary>
        public void User_Del()
        {
            if (!EX_Admin.Power("supplier_user_del", "删除商家"))
            {
                AjaxNoPower();
                return;
            }
            string id = RequestTool.RequestString("ids");

            if (id == "")
            {
                Response.Write("{\"msg\":\"" + Tag("请选择要删除的信息") + "\"}");
                return;
            }
            B_Lebi_Supplier.Delete("id in (lbsql{" + id + "})");
            List <Lebi_Order> modellist = B_Lebi_Order.GetList("Supplier_id in (lbsql{" + id + "})", "");

            foreach (Lebi_Order model in modellist)
            {
                B_Lebi_Order.Delete("id = " + model.id + "");
                B_Lebi_Order_Log.Delete("Order_id = " + model.id + "");
                B_Lebi_Order_Product.Delete("Order_id = " + model.id + "");
            }
            B_Lebi_Brand.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ProPerty.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ProPerty_Tag.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Cash.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Message.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_Money.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_Bank.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_BillType.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_ProductType.Delete("Supplier_id in (lbsql{" + id + "})");
            //B_Lebi_Supplier_Verified.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Supplier_Verified_Log.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_Log.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ServicePanel.Delete("Supplier_id in (lbsql{" + id + "})");
            B_Lebi_ServicePanel_Group.Delete("Supplier_id in (lbsql{" + id + "})");
            Log.Add("删除商家", "Supplier_User", id.ToString(), CurrentAdmin, id.ToString());
            Response.Write("{\"msg\":\"OK\"}");
        }
Exemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("servicepanel_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 Lanaguage 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.GetList(where, "Sort desc", PageSize, page);
            int recordCount = B_Lebi_ServicePanel.Counts(where);

            PageString = Pager.GetPaginationString("?page={0}&key=" + key, page, PageSize, recordCount);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 编辑客服面板成员信息
        /// </summary>
        public void ServicePanel_Edit()
        {
            if (!Power("supplier_servicepanel_list", "客服面板"))
            {
                AjaxNoPower();
                return;
            }
            int  id                 = RequestTool.RequestInt("id", 0);
            bool addflag            = false;
            Lebi_ServicePanel model = B_Lebi_ServicePanel.GetModel(id);

            if (model == null)
            {
                addflag = true;
                model   = new Lebi_ServicePanel();
            }
            model                       = B_Lebi_ServicePanel.SafeBindForm(model);
            model.Name                  = RequestTool.RequestSafeString("Name");
            model.Account               = RequestTool.RequestSafeString("Account");
            model.Language_ids          = RequestTool.RequestSafeString("Language_ids");
            model.ServicePanel_Type_id  = RequestTool.RequestInt("ServicePanel_Type_id", 0);
            model.ServicePanel_Group_id = RequestTool.RequestInt("ServicePanel_Group_id", 0);
            model.Sort                  = RequestTool.RequestInt("Sort", 0);
            model.Supplier_id           = CurrentSupplier.id;
            if (addflag)
            {
                B_Lebi_ServicePanel.Add(model);
                id = B_Lebi_ServicePanel.GetMaxId();
                Log.Add("添加客服成员", "ServicePanel", id.ToString(), CurrentSupplier, model.Name);
            }
            else
            {
                B_Lebi_ServicePanel.Update(model);
                Log.Add("编辑客服成员", "ServicePanel", id.ToString(), CurrentSupplier, model.Name);
            }
            string result = "{\"msg\":\"OK\", \"id\":\"" + id + "\"}";

            Response.Write(result);
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = RequestTool.RequestInt("id", 0);

            if (id == 0)
            {
                if (!EX_Admin.Power("servicepanel_add", "添加客服面板成员"))
                {
                    WindowNoPower();
                }
            }
            else
            {
                if (!EX_Admin.Power("servicepanel_edit", "编辑客服面板成员"))
                {
                    WindowNoPower();
                }
            }
            model = B_Lebi_ServicePanel.GetModel(id);
            if (model == null)
            {
                model = new Lebi_ServicePanel();
            }
        }