Example #1
0
        protected void btSave_Click(object sender, EventArgs e)
        {
            CMS_AdminRole bar = new CMS_AdminRole();

            Model.CMS_AdminRole role = CurrentId > 0 ? bar.GetModel(CurrentId) : new Model.CMS_AdminRole();
            role.Name         = tbTitle.Text.Trim();
            role.AdminSetting = ContextHelper.ContextForm("admin_setting"); //获取所选系统权限
            role.Setting      = ContextHelper.ContextForm("setting");       //获取所选栏目权限
            if (CurrentId == 0)
            {
                int newId = CurrentId = bar.Add(role);
                //SaveActionLog(newId, 1 , "角色");
            }
            else
            {
                bar.Update(role);
                //SaveActionLog(CurrentId, 3 , "角色");
            }
            Response.Redirect("Role.aspx");
        }