예제 #1
0
        protected void btnSaveSystemRole_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SystemRoleWrapper obj = SystemRoleWrapper.FindById(int.Parse(hidSystemRoleID.Text.Trim()));
                obj.RoleName         = this.txtRoleName.Text.Trim();
                obj.RoleDescription  = this.txtRoleDescription.Text.Trim();
                obj.RoleIsSystemRole = this.chkRoleIsSystemRole.Checked;

                SystemRoleWrapper.Update(obj);

                winSystemRoleEdit.Hide();
                ResourceManager.AjaxSuccess = true;
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = "错误信息:" + ex.Message;
                return;
            }
        }
        protected void btnSaveSystemRole_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SystemRoleWrapper obj = SystemRoleWrapper.FindById(int.Parse(hidSystemRoleID.Text.Trim()));
                obj.RoleName         = this.txtRoleName.Text.Trim();
                obj.RoleCode         = this.txtRoleCode.Text.Trim();
                obj.RoleDescription  = this.txtRoleDescription.Text.Trim();
                obj.RoleIsSystemRole = this.chkRoleIsSystemRole.Checked;

                SystemRoleWrapper.Update(obj);

                winSystemRoleEdit.Hide();
                ResourceManager.AjaxSuccess = true;
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = string.Format(this.GetGlobalResourceObject("GlobalResource", "msgServerErrorMsg").ToString(), ex.Message);
                return;
            }
        }