/// <summary> /// Gets Available Appointments /// </summary> /// <param name="searchQuery">Appointment search query object</param> /// <returns>Collection of Appointments</returns> private async Task <IEnumerable <Appointment> > GetAppointmentsAsync(AppointmentsQuery searchQuery) { var appointments = PortalHelper.GetAvailableAppointments(searchQuery.Date); appointments.Sort((h1, h2) => h1.Date.CompareTo(h2.Date)); return(appointments); }
public async Task BookMeeting(IDialogContext context, LuisResult result) { // Add Custom code here. EntityRecommendation cityEntityRecommendation; if (result.TryFindEntity(EntityDate, out cityEntityRecommendation)) { cityEntityRecommendation.Type = "Date"; } AppointmentsQuery appQuery = new AppointmentsQuery(); var appointmentsFormDialog = new FormDialog <AppointmentsQuery>(appQuery, this.BuildAppointmentsForm, FormOptions.PromptInStart, result.Entities); context.Call(appointmentsFormDialog, this.ResumeAfterAppointmentsFormDialog); }