private async Task ResumeAfterSaveCustomerDialog(IDialogContext context, IAwaitable <SaveCustomerForm> result) { SaveCustomerForm customer = await result; await context.PostAsync($"Welcome..." + customer.FirstName + " " + customer.LastName + "!... "); context.Call(new RootDialog(), ResumeAfterRootDialog); // context.Wait(this.MessageReceivedAsyncRedirectToRootDialog); //context.Call(root, Microsoft.Bot.Builder.Dialogs.ResumeAfter); }
/// <summary> /// This method will be executed after save the customer /// </summary> /// <param name="context"></param> /// <param name="result"></param> /// <returns></returns> private async Task ResumeAfterSaveCustomerDialog(IDialogContext context, IAwaitable <SaveCustomerForm> result) { try { SaveCustomerForm saveCustomeForm = await result; int mycustomerid = 0; context.PrivateConversationData.SetValue <int>("customerId", Convert.ToInt32(saveCustomeForm.customerId)); if (!context.PrivateConversationData.TryGetValue <int>("customerId", out mycustomerid)) { mycustomerid = 0; } await context.PostAsync("Thank you for your time, Come back soon!* **********************************************************"); } catch (Exception ex) { //await context.PostAsync($"Failed with message: {ex.Message}"); } finally { context.Wait(this.MessageReceivedAsync); } }