public async Task AfterIsEditor(IDialogContext context, IAwaitable <YesOrNo> result) { YesOrNo response = await result; IsEditor = response; if (response.ToString().ToLower() == "no") { PromptDialog.Choice( context: context, resume: SendToCMSForm, prompt: "If you are not an editor, you'll have to fill a form for CMS authorization. Would you like me to fill out the form for you?", options: (IEnumerable <YesOrNo>)Enum.GetValues(typeof(YesOrNo)), retry: "Please select one of the choices.", promptStyle: PromptStyle.Auto ); } else { PromptDialog.Choice( context: context, resume: AfterWhichCampus, prompt: "Are you trying to login from the office or off campus? ", options: (IEnumerable <CampusOptions>)Enum.GetValues(typeof(CampusOptions)), retry: "Please select one of the choices.", promptStyle: PromptStyle.Auto ); } }
public async Task SendToCMSForm(IDialogContext context, IAwaitable <YesOrNo> result) { YesOrNo res = await result; if (res.ToString().ToLower() == "no") { PromptDialog.Choice( context: context, resume: AfterFurtherAssistance, prompt: "Do you still require help with this issue? ", options: (IEnumerable <YesOrNo>)Enum.GetValues(typeof(YesOrNo)), retry: "Please select one of the choices.", promptStyle: PromptStyle.Auto ); } else { var myform = new FormDialog <CMSFormRequest>(new CMSFormRequest(), CMSFormRequest.BuildForm, FormOptions.PromptInStart, null); context.Call(myform, AfterCMSFormComplete); } }