private void createButton_Click(object sender, System.EventArgs e) { Page.Validate(); if (Page.IsValid) { try { // Create toolkit instance SupportToolkit toolkit = new SupportToolkit(session); // Create setup parameter object with min required parameters. CreateCaseSetup setup = new CreateCaseSetup(this.siteID.Text, this.firstName.Text, this.lastName.Text, this.phone.Text); // Set any additional information for creating the case setup.Title = this.title.Text; setup.PhoneLogNotes = this.notes.Text; // Set any additional fields using the AdditionalFields property of the setup object setup.AdditionalFields.Append("alt_address", AdditionalFieldType.String, "Test"); // Actually create the case ToolkitResult result = toolkit.CreateCase(setup); ResetFormData(); message.Text = "Case created successfully with IDNum '" + result.IDNum + "'."; } catch (Exception ex) { message.Text = ex.Message; } } }
public static void AddNotes(this CaseDTO @case, int numberOfNotes, ClarifySession clarifySession) { var supportToolkit = new SupportToolkit(clarifySession); for (var i = 0; i < numberOfNotes; i++) { supportToolkit.LogCaseNote(new LogCaseNoteSetup(@case.IDNumber) { Notes = "case notes" }); } }
private void createButton_Click(object sender, System.EventArgs e) { Page.Validate(); if(Page.IsValid) { try { // Create toolkit instance SupportToolkit toolkit = new SupportToolkit( session ); // Create setup parameter object with min required parameters. CreateCaseSetup setup = new CreateCaseSetup( this.siteID.Text, this.firstName.Text, this.lastName.Text, this.phone.Text ); // Set any additional information for creating the case setup.Title = this.title.Text; setup.PhoneLogNotes = this.notes.Text; // Set any additional fields using the AdditionalFields property of the setup object setup.AdditionalFields.Append("alt_address", AdditionalFieldType.String, "Test"); // Actually create the case ToolkitResult result = toolkit.CreateCase( setup ); ResetFormData(); message.Text = "Case created successfully with IDNum '" + result.IDNum + "'."; } catch(Exception ex) { message.Text = ex.Message; } } }