Beispiel #1
0
        /// <summary>
        /// 编辑权限
        /// </summary>
        public void limit_Edit()
        {
            if (!EX_Admin.Power("supplier_group_edit", "编辑商家分组"))
            {
                AjaxNoPower();
                return;
            }
            int id = RequestTool.RequestInt("id", 0);
            Lebi_Supplier_Limit model = B_Lebi_Supplier_Limit.GetModel(id);

            if (model == null)
            {
                model = new Lebi_Supplier_Limit();
                model = B_Lebi_Supplier_Limit.BindForm(model);
                B_Lebi_Supplier_Limit.Add(model);
                string action      = Tag("添加权限分组");
                string description = Shop.Bussiness.Language.Content(Language.RequestString("Name"), "CN");
                Log.Add(action, "Supplier_Group", model.id.ToString(), CurrentAdmin, description);
            }
            else
            {
                model = B_Lebi_Supplier_Limit.BindForm(model);
                B_Lebi_Supplier_Limit.Update(model);
                string action      = Tag("编辑权限分组");
                string description = Shop.Bussiness.Language.Content(Language.RequestString("Name"), "CN");
                Log.Add(action, "Supplier_Group", model.id.ToString(), CurrentAdmin, description);
            }
            Response.Write("{\"msg\":\"OK\"}");
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("supplier_group_edit", "编辑商家分组"))
            {
                PageNoPower();
            }
            int id = RequestTool.RequestInt("id", 0);

            model = B_Lebi_Supplier_Limit.GetModel(id);
            if (model == null)
            {
                model = new Lebi_Supplier_Limit();
            }
        }
Beispiel #3
0
        /// <summary>
        /// 删除一个权限代码
        /// </summary>
        public void limit_Del()
        {
            if (!EX_Admin.Power("supplier_group_edit", "编辑商家分组"))
            {
                AjaxNoPower();
                return;
            }
            int id = RequestTool.RequestInt("id", 0);
            Lebi_Supplier_Limit model = B_Lebi_Supplier_Limit.GetModel(id);
            string action             = Tag("删除权限分组");
            string description        = Shop.Bussiness.Language.Content(model.Name, "CN");

            Log.Add(action, "Supplier_Group", id.ToString(), CurrentAdmin, description);
            B_Lebi_Supplier_Limit.Delete(id);
            Response.Write("{\"msg\":\"OK\"}");
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Power("supplier_power_edit", "编辑分组权限"))
            {
                AjaxNoPower();
                return;
            }
            models = GetLimit(0);
            int id = RequestTool.RequestInt("id", 0);

            group = B_Lebi_Supplier_UserGroup.GetModel("Supplier_id = " + CurrentSupplier.id + " and id = " + id);
            if (group == null)
            {
                PageError();
            }
            ps            = B_Lebi_Supplier_Power.GetList("Supplier_Group_id=" + group.id + " and Url=''", "");
            defaultparent = B_Lebi_Supplier_Limit.GetModel("Code='default'");
            if (defaultparent != null)
            {
                count = B_Lebi_Supplier_Limit.Counts("parentid = " + defaultparent.id + ""); //未分组
            }
        }
Beispiel #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!EX_Admin.Power("supplier_group_edit", "编辑商家分组"))
            {
                PageReturnMsg = PageNoPowerMsg();
            }

            models = GetLimit(0);
            int id = RequestTool.RequestInt("id", 0);

            group = B_Lebi_Supplier_Group.GetModel(id);
            if (group == null)
            {
                PageError();
            }
            ps            = B_Lebi_Supplier_Power.GetList("Supplier_Group_id=" + group.id + " and Url=''", "");
            purls         = B_Lebi_Supplier_Power.GetList("Supplier_Group_id=" + group.id + " and Url!=''", "");
            defaultparent = B_Lebi_Supplier_Limit.GetModel("Code='default'");
            if (defaultparent != null)
            {
                count = B_Lebi_Supplier_Limit.Counts("parentid = " + defaultparent.id + ""); //未分组
            }
        }