Exemplo n.º 1
0
        /// <summary>
        /// 编辑会员分组推广佣金比例
        /// </summary>
        public void UserLevel_Edit()
        {
            if (!EX_Admin.Power("agent_config", "代理-参数设置"))
            {
                AjaxNoPower();
                return;
            }
            int id = RequestTool.RequestInt("id", 0);
            Lebi_Agent_UserLevel model = B_Lebi_Agent_UserLevel.GetModel("UserLevel_id = " + id + "");

            if (model == null)
            {
                model = new Lebi_Agent_UserLevel();
            }
            B_Lebi_Agent_UserLevel.SafeBindForm(model);
            if (model.id == 0)
            {
                model.UserLevel_id = id;
                B_Lebi_Agent_UserLevel.Add(model);
                Log.Add("添加会员分组推广佣金比例", "Agent_UserLevel", id.ToString(), CurrentAdmin, "");
            }
            else
            {
                B_Lebi_Agent_UserLevel.Update(model);
                Log.Add("编辑会员分组推广佣金比例", "Agent_UserLevel", id.ToString(), CurrentAdmin, "");
            }
            string result = "{\"msg\":\"OK\", \"id\":\"" + id + "\"}";

            Response.Write(result);
        }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!EX_Admin.Power("agent_config", "代理-参数设置"))
     {
         WindowNoPower();
     }
     id    = RequestTool.RequestInt("id", 0);
     model = B_Lebi_Agent_UserLevel.GetModel("UserLevel_id = " + id + "");
     if (model == null)
     {
         model = new Lebi_Agent_UserLevel();
         model.Angent1_Commission = -1;
         model.Angent2_Commission = -1;
         model.Angent3_Commission = -1;
     }
 }