Example #1
0
        public static async Task <Appointment> Edit(Appointment appt)
        {
            Appointment newAppt;

            await SetAppointmentStore();

            Thread.Sleep(150);


            if (appt.OriginalStartTime == null)
            {
                await _appointmentStore.ShowAppointmentDetailsAsync(appt.LocalId);

                newAppt = await _appointmentStore.GetAppointmentAsync(appt.LocalId);
            }
            else
            {
                await _appointmentStore.ShowAppointmentDetailsAsync(appt.LocalId, appt.OriginalStartTime.Value);

                newAppt =
                    await _appointmentStore.GetAppointmentInstanceAsync(appt.LocalId, appt.OriginalStartTime.Value);
            }

            return(newAppt);
        }