protected void btnSaveSystemPrivilege_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SystemPrivilegeWrapper obj = new SystemPrivilegeWrapper();
                obj.OperationID     = SystemOperationWrapper.FindById(Convert.ToInt32(this.cmbOperationID.SelectedItem.Value));
                obj.ResourcesID     = SystemResourcesWrapper.FindById(Convert.ToInt32(this.hidResourcesID.Value));
                obj.PrivilegeCnName = this.txtPrivilegeCnName.Text.Trim();
                obj.PrivilegeEnName = this.txtPrivilegeEnName.Text.Trim();

                obj.Description    = this.txtDescription.Text.Trim();
                obj.PrivilegeOrder = Convert.ToInt32(this.txtPrivilegeOrder.Text.Trim());
                //obj.PrivilegeCategory = this.txtPrivilegeCategory.Text.Trim();



                SystemPrivilegeWrapper.Save(obj);

                winSystemPrivilegeAdd.Hide();
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = "ErrorMessage:" + ex.Message;
            }
        }
예제 #2
0
        protected void btnSaveSystemPrivilege_Click(object sender, DirectEventArgs e)
        {
            try
            {
                SystemPrivilegeWrapper obj = new SystemPrivilegeWrapper();
                obj.OperationID       = null;
                obj.ResourcesID       = null;
                obj.PrivilegeCnName   = this.txtPrivilegeCnName.Text.Trim();
                obj.PrivilegeEnName   = this.txtPrivilegeEnName.Text.Trim();
                obj.DefaultValue      = this.txtDefaultValue.Text.Trim();
                obj.Description       = this.txtDescription.Text.Trim();
                obj.PrivilegeOrder    = Convert.ToInt32(this.txtPrivilegeOrder.Text.Trim());
                obj.PrivilegeCategory = this.txtPrivilegeCategory.Text.Trim();
                obj.PrivilegeType     = this.txtPrivilegeType.Text.Trim();



                SystemPrivilegeWrapper.Save(obj);

                winSystemPrivilegeAdd.Hide();
            }
            catch (Exception ex)
            {
                ResourceManager.AjaxSuccess      = false;
                ResourceManager.AjaxErrorMessage = "错误信息:" + ex.Message;
            }
        }