private async Task ResumeAfterPhoneEntered(IDialogContext context, IAwaitable <string> result) { try { var phone = await result; if (phone != null) { await context.PostAsync($"The phone you provided is: {phone}"); var promptBirthDialog = new PromptDate( "Please enter your date of birth (MM/dd/yyyy):", "The value you entered is not a valid date. Please try again:", "You have tried to enter your date of birth many times. Please try again later.", attempts: 2); context.Call(promptBirthDialog, this.AfterDateOfBirthEntered); } else { context.Done(false); } } catch (TooManyAttemptsException) { context.Done(false); } }
private async Task AfterEmailEnteredPromptForPurchaseDate(IDialogContext context, IAwaitable <string> result) { try { var theemail = await result; if (theemail != null) { this._customerInfo.EmailAddress = theemail; await context.PostAsync($"The email you provided is: {theemail}"); var promptBirthDialog = new PromptDate( "When did you purchase your product? Please enter the APPROXIMATE date (MM/dd/yyyy):", // "Please enter your date of birth (MM/dd/yyyy):", "The value you entered is not a valid date. Please try again:", "You have tried to enter your date of purchase many times. Please try again later.", attempts: 2); context.Call(promptBirthDialog, this.AfterDateOfPurchaseEntered); } else { context.Done(false); } } catch (TooManyAttemptsException) { context.Done(false); } }