/// <summary> /// 保存系统设置 /// </summary> private void SaveConfigInfo() { // 是否加密先保存好 BaseSystemInfo.ClientEncryptPassword = this.chkClientEncryptPassword.Checked; BaseSystemInfo.CurrentUserName = this.txtUser.Text; BaseSystemInfo.CurrentPassword = this.txtClientPassword.Text; if (BaseSystemInfo.ClientEncryptPassword) { BaseSystemInfo.CurrentPassword = SecretUtil.Encrypt(this.txtClientPassword.Text); } if (!string.IsNullOrEmpty(this.cmbCurrentLanguage.Text)) { BaseSystemInfo.CurrentLanguage = this.cmbCurrentLanguage.SelectedItem.ToString(); } BaseSystemInfo.RememberPassword = this.chkRememberPassword.Checked; BaseSystemInfo.AutoLogOn = this.chbAutoLogOn.Checked; BaseSystemInfo.UseMessage = this.chkUseMessage.Checked; BaseSystemInfo.Service = this.cmbService.SelectedItem.ToString(); BaseSystemInfo.MainForm = txtMainForm.Text; BaseSystemInfo.LogOnForm = this.txtLogOnForm.Text; BaseSystemInfo.RecordLog = this.chkRecordLog.Checked; BaseSystemInfo.AllowUserRegister = this.chkAllowUserRegister.Checked; BaseSystemInfo.UseUserPermission = this.chkUseUserPermission.Checked; BaseSystemInfo.UseOrganizePermission = this.chkUseOrganizePermission.Checked; BaseSystemInfo.UseModulePermission = this.chkUseModulePermission.Checked; BaseSystemInfo.UsePermissionScope = this.chkUsePermissionScope.Checked; BaseSystemInfo.UseAuthorizationScope = this.chkUseAuthorizationScope.Checked; BaseSystemInfo.UseTableColumnPermission = this.chkUseTableColumnPermission.Checked; BaseSystemInfo.UseTableScopePermission = this.chkUseTableScopePermission.Checked; BaseSystemInfo.UseWorkFlow = this.chkWorkFlow.Checked; BaseSystemInfo.OnLineLimit = (int)this.nupOnLineLimit.Value; BaseSystemInfo.CustomerCompanyName = this.txtCustomerCompanyName.Text; if (this.cmbUserCenterDbDbType.Text.Length != 0) { BaseSystemInfo.UserCenterDbType = BaseConfiguration.GetDbType(this.cmbUserCenterDbDbType.SelectedItem.ToString()); } if (this.cmbBusinessDbDbType.Text.Length != 0) { BaseSystemInfo.BusinessDbType = BaseConfiguration.GetDbType(this.cmbBusinessDbDbType.SelectedItem.ToString()); } if (this.cmbWorkFlowDbDbType.Text.Length != 0) { BaseSystemInfo.WorkFlowDbType = BaseConfiguration.GetDbType(this.cmbWorkFlowDbDbType.SelectedItem.ToString()); } BaseSystemInfo.EncryptDbConnection = this.chkEncryptDbConnection.Checked; BaseSystemInfo.UserCenterDbConnectionString = this.txtUserCenterDbConnection.Text; BaseSystemInfo.BusinessDbConnectionString = this.txtBusinessDbConnection.Text; BaseSystemInfo.WorkFlowDbConnectionString = this.txtWorkFlowDbConnection.Text; // 保存用户的信息 UserConfigHelper.SaveConfig(); }