private async Task ResumeAfterSaveCustomerDialog(IDialogContext context, IAwaitable <SaveCustomerFormApp> result) { SaveCustomerFormApp customer = await result; RootDialog rd = new RootDialog(); await context.PostAsync($"Welcome " + customer.name + " " + customer.LastName); bool creatingUser = true; context.UserData.SetValue <bool>("creatingUser", creatingUser); context.Call(new RootDialog(), ResumeAfterRootDialog); }
/// <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 <SaveCustomerFormApp> result) { try { SaveCustomerFormApp saveCustomeForm = await result; this.ShowOptions(context); } catch (Exception ex) { await context.PostAsync($"Failed with message: {ex.Message}"); } }