//when the form is saved, these values/objects will be passed back over to AdminSettingsWizardData's "AcceptChanges" event public override void SaveState(SavePageEventArgs e) { int totalACSBoundariesToAdd = ACSBoundaryListViewControl.Items.Count; string[] acsBoundariesToAddStringArray = new string[totalACSBoundariesToAdd]; int x = 0; foreach (ACSPriorityBoundary acsBoundary in ACSBoundaryListViewControl.Items) { acsBoundariesToAddStringArray[x] += "<ACSPriorityBoundary>" + "<WorkItemType>" + acsBoundary.WorkItemType + "</WorkItemType>" + "<Min>" + acsBoundary.MinBoundary + "</Min>" + "<Max>" + acsBoundary.MaxBoundary + "</Max>" + "<IRImpactSRUrgencyEnum>" + acsBoundary.IRImpactSRUrgency.Id + "</IRImpactSRUrgencyEnum>" + "<IRUrgencySRPriorityEnum>" + acsBoundary.IRUrgencySRPriority.Id + "</IRUrgencySRPriorityEnum>" + "</ACSPriorityBoundary>"; x++; } //prepare the XML string string ACSBoundariesXMLString = "<ACSPriorityBoundaries>" + string.Join("", acsBoundariesToAddStringArray) + "</ACSPriorityBoundaries>"; //Send back over to AdminSettingsWizardData for Save if (acsBoundariesToAddStringArray != null) { settings.AzureCognitiveServicesBoundaries = ACSBoundariesXMLString; } }
//when the form is saved, these values/objects will be passed back over to AdminSettingsWizardData's "AcceptChanges" event public override void SaveState(SavePageEventArgs e) { int totalMailboxesToAdd = MailboxListViewControl.Items.Count; string[] mailboxToAddStringArray = new string[totalMailboxesToAdd]; int totalMailboxesToRemove = MailboxesToRemove.Count; string[] mailboxToRemoveStringArray = new string[totalMailboxesToRemove]; int x = 0; foreach (AdditionalMailbox mailboxEntry in MailboxListViewControl.Items) { mailboxToAddStringArray[x] += mailboxEntry.MailboxID + ";" + //1 - (guid) MailboxID mailboxEntry.MailboxAddress + ";" + //2 - (string) MailboxAddress mailboxEntry.MailboxWorkItemType + ";" + //3 - (string) MailboxWorkType mailboxEntry.MailboxIRTemplate.DisplayName + ";" + //4 - (string) MailboxIRDisplayName mailboxEntry.MailboxIRTemplate.Id + ";" + //5 - (guid) MailboxIRTemplateGUID mailboxEntry.MailboxSRTemplate.DisplayName + ";" + //6 - (string) MailboxSRDisplayName mailboxEntry.MailboxSRTemplate.Id + ";" + //7 - (guid) MailboxSRTemplateGUID mailboxEntry.MailboxCRTemplate.DisplayName + ";" + //8 - (string) MailboxCRDisplayName mailboxEntry.MailboxCRTemplate.Id + ";" + //9 - (guid) MailboxCRTemplateGUID mailboxEntry.MailboxPRTemplate.DisplayName + ";" + //10 - (string) MailboxPRDisplayName mailboxEntry.MailboxPRTemplate.Id; //11 - (guid) MailboxPRTemplateGUID x++; } int y = 0; foreach (AdditionalMailbox mailboxToRemove in MailboxesToRemove) { mailboxToRemoveStringArray[y] += mailboxToRemove.MailboxID; y++; } //Send back over to AdminSettingsWizardData for Save if (mailboxToRemoveStringArray != null) { settings.MultipleMailboxesToRemove = mailboxToRemoveStringArray; } if (mailboxToAddStringArray != null) { settings.MultipleMailboxesToAdd = mailboxToAddStringArray; } }
//when the form is saved, these values/objects will be passed back over to AdminSettingsWizardData's "AcceptChanges" event public override void SaveState(SavePageEventArgs e) { int totalCustomRulesToAdd = CustomRulesListViewControl.Items.Count; string[] customRuleToAddStringArray = new string[totalCustomRulesToAdd]; int totalCustomRulesToRemove = CustomRulesToRemove.Count; string[] customRuleToRemoveStringArray = new string[totalCustomRulesToRemove]; int x = 0; foreach (AdditionalCustomRule customRuleEntry in CustomRulesListViewControl.Items) { customRuleToAddStringArray[x] += customRuleEntry.CustomRuleID + ";" + //1 - (guid) RuleID customRuleEntry.CustomRuleDisplayName + ";" + //2 - (string) CustomRuleDisplayName customRuleEntry.CustomRuleMessageClassEnum.Id + ";" + //3 - (enum) CustomRuleMessageClass customRuleEntry.CustomRuleRegex + ";" + //4 - (string) CustomRuleRegexPattern customRuleEntry.CustomRuleMessagePart + ";" + //5 - (string) CustomRuleMessagePart customRuleEntry.CustomRuleItemType + ";" + //6 - (string) CustomRuleWorkItemToCreate customRuleEntry.CustomRuleRegexMatchProperty; //7 - (string) CustomRuleRegexMatchProperty x++; } int y = 0; foreach (AdditionalCustomRule customRuleToRemove in CustomRulesToRemove) { customRuleToRemoveStringArray[y] += customRuleToRemove.CustomRuleID; y++; } //Send back over to AdminSettingsWizardData for Save if (customRuleToRemoveStringArray != null) { settings.MultipleCustomRulesToRemove = customRuleToRemoveStringArray; } if (customRuleToAddStringArray != null) { settings.MultipleCustomRulesToAdd = customRuleToAddStringArray; } }
//when the form is saved, these values/objects will be passed back over to AdminSettingsWizardData's "AcceptChanges" event public override void SaveState(SavePageEventArgs e) { settings.ExternalIRCommentType = CBExternalIRCommentType.SelectedItem.ToString(); settings.ExternalSRCommentType = CBExternalSRCommentType.SelectedItem.ToString(); settings.ExternalIRCommentPrivate = CBExternalIRCommentTypePrivate.SelectedItem.ToString(); settings.ExternalSRCommentPrivate = CBExternalSRCommentTypePrivate.SelectedItem.ToString(); //ensure that there wasn't an attempt intentional/accidental to control an End User Comment's privacy as it doesn't exist if (CBExternalIRCommentType.SelectedItem.ToString() == "EndUserComment") { CBExternalIRCommentTypePrivate.SelectedItem = "null"; } if (CBExternalSRCommentType.SelectedItem.ToString() == "EndUserComment") { CBExternalSRCommentTypePrivate.SelectedItem = "null"; } //validate dynamic analyst assignment if (cbDynamicAssignment.SelectedItem == null) { settings.DynamicAnalystAssignment = null; } }
public override void SaveState(SavePageEventArgs e) { settings.RetentionDays = Convert.ToInt32(numericDays.Value); }
//when the form is saved, these values/objects will be passed back over to AdminSettingsWizardData's "AcceptChanges" event public override void SaveState(SavePageEventArgs e) { settings.LoggingLevel = cbLoggingLevel.Text; settings.LoggingType = cbLoggingType.Text; }