Ejemplo 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();
            }
        }
Ejemplo n.º 2
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);
        }
Ejemplo n.º 3
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();
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public static void Update(Lebi_ServicePanel model)
 {
     D_Lebi_ServicePanel.Instance.Update(model);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public static int Add(Lebi_ServicePanel model)
 {
     return(D_Lebi_ServicePanel.Instance.Add(model));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 安全方式绑定表单数据
 /// </summary>
 public static Lebi_ServicePanel SafeBindForm(Lebi_ServicePanel model)
 {
     return(D_Lebi_ServicePanel.Instance.SafeBindForm(model));
 }