private bool SaveForm() { bool objReturn = false; STD_REGISTRY systemRegistry = ApplicationSession.SystemRegistry; AppSettings oldAppSettings = ServiceInterfaceManager.APPSETTINGS_GET(HttpContext.Current.User.Identity.Name, systemRegistry.ID); AppSettings newAppSettings = new AppSettings(); int iValue = 0; int.TryParse(txtSqlCommandTimeout.Text, out iValue); newAppSettings.SqlCommandTimeout = iValue; iValue = 0; int.TryParse(txtLogFileSize.Text, out iValue); newAppSettings.LogFileSize = iValue; iValue = 0; int.TryParse(txtLogFileArchive.Text, out iValue); newAppSettings.LogFileArchive = iValue; bool bValue = false; bool.TryParse(listLogErrors.SelectedValue, out bValue); newAppSettings.LogErrors = bValue; bValue = false; bool.TryParse(listLogInformation.SelectedValue, out bValue); newAppSettings.LogInformation = bValue; bValue = false; bool.TryParse(listLogTiming.SelectedValue, out bValue); newAppSettings.LogTiming = bValue; bValue = false; bool.TryParse(listDatabaseLogEnabled.SelectedValue, out bValue); newAppSettings.DatabaseLogEnabled = bValue; bValue = false; //bool.TryParse(listEventLogEnabled.SelectedValue, out bValue); newAppSettings.EventLogEnabled = bValue; bValue = false; bool.TryParse(listFileLogEnabled.SelectedValue, out bValue); newAppSettings.FileLogEnabled = bValue; if (ValidFileLogPath()) { newAppSettings.FileLogPath = txtFileLogPath.Text; } else { return(false); } bValue = false; bool.TryParse(listMviEnabled.SelectedValue, out bValue); newAppSettings.MviEnabled = bValue; newAppSettings.MviProcessingCode = listMviProcessingCode.SelectedValue; newAppSettings.MviCertName = this.txtMviCertName.Text; newAppSettings.MviServiceUrl = this.txtMviServiceUrl.Text; newAppSettings.ReportBuilderPath = txtReportBuilderPath.Text; newAppSettings.ReportServerUrl = txtReportServerUrl.Text; newAppSettings.ReportServicePath = txtReportServicePath.Text; newAppSettings.EtlSchedule = txtEtlSchedule.Text; iValue = 0; int.TryParse(txtEtlRetryAttempts.Text, out iValue); newAppSettings.EtlRetryAttempts = iValue; iValue = 0; int.TryParse(txtEtlTimeBetweenAttempts.Text, out iValue); newAppSettings.EtlTimeBetweenAttempts = iValue; newAppSettings.HomePageText = txtHomePageText.Text; objReturn = ServiceInterfaceManager.APPSETTINGS_SAVE(HttpContext.Current.User.Identity.Name, systemRegistry.ID, newAppSettings); if (objReturn) { DB_LOG newLog = new DB_LOG(); newLog.STD_REGISTRY_ID = systemRegistry.ID; newLog.IS_ERROR = false; newLog.PROCESS_NAME = "CRSe_WEB.Settings.SaveForm"; newLog.MESSAGE = "CRSe app settings values have been updated (Old Values: " + WriteToXmlString(oldAppSettings) + ") to (New Values: " + WriteToXmlString(newAppSettings) + ")"; newLog.CREATED = DateTime.Now; newLog.CREATEDBY = HttpContext.Current.User.Identity.Name; ServiceInterfaceManager.DB_LOG_SAVE(HttpContext.Current.User.Identity.Name, systemRegistry.ID, newLog); } return(objReturn); }