Ejemplo n.º 1
0
        private async void TimeSlotBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox box = sender as ComboBox;

            if (box.SelectedIndex != -1)
            {
                var val = box.SelectedItem as Roster;
                time = val.start_time.ToString();
                if (val.val == 0)
                {
                    AppointmentBookSuccess bookFail = new AppointmentBookSuccess()
                    {
                        Title           = "Appointment Booking Failed",
                        Content         = String.Format("No vacancies on {0} at {1}", app_date, time),
                        CloseButtonText = "OK"
                    };
                    await bookFail.ShowAsync();

                    box.SelectedIndex = -1;
                }
                else
                {
                    await viewModel.CheckApp(1, app_date, time);
                }
            }
            BookButton.IsEnabled = (Appointment_Date.Date != null) && (TimeSlotBox.SelectedIndex != -1);
            Bindings.Update();
        }
Ejemplo n.º 2
0
 private async void onInsertFail(object source, EventArgs e)
 {
     AppointmentBookSuccess bookFail = new AppointmentBookSuccess()
     {
         Title           = "Appointment Booking Failed",
         Content         = String.Format("You already have an appointment on {0} at {1}", app_date, time),
         CloseButtonText = "OK"
     };
     await bookFail.ShowAsync();
 }
Ejemplo n.º 3
0
        private async void onAppointmentRead(object source, EventArgs e)
        {
            AppointmentBookSuccess bookSuccess = new AppointmentBookSuccess()
            {
                Title   = "Appointment Booking Confirmed",
                Content = String.Format("Appointment booked with Dr. {0} in {1},{2} on {3} at {4}", viewModel.app.doc_name,
                                        viewModel.app.hosp_name, viewModel.app.location, viewModel.app.app_date, viewModel.app.Timeslot),
            };

            await bookSuccess.ShowAsync();
        }
Ejemplo n.º 4
0
        private async void onAppCheckSuccess(object source, EventArgs e)
        {
            if (viewModel.ct > 0)
            {
                AppointmentBookSuccess bookFail = new AppointmentBookSuccess()
                {
                    Title   = "Appointment Booking Failed",
                    Content = String.Format("You already have an appointment on {0} at {1}", app_date, time),
                };
                await bookFail.ShowAsync();

                TimeSlotBox.SelectedIndex = -1;
            }
        }
Ejemplo n.º 5
0
        public async void onAppointmentRead(object source, EventArgs args)
        {
            AppointmentBookSuccess bookSuccess = new AppointmentBookSuccess()
            {
                Title   = "Appointment Booking Confirmed",
                Content = String.Format("Appointment booked with Dr. {0} in {1},{2} on {3} at {4}", viewModel.app.doc_name,
                                        viewModel.app.hosp_name, viewModel.app.location, viewModel.app.app_date, viewModel.app.Timeslot),
            };

            bookSuccess.ButtonClicked += this.onOKButtonClicked;
            //AppStack.Visibility = Visibility.Visible;
            await viewModel.GetAppointments(1);

            await bookSuccess.ShowAsync();
        }
Ejemplo n.º 6
0
        public async void onAppUpdateSuccess(object souce, EventArgs args)
        {
            AppointmentBookSuccess bookSuccess = new AppointmentBookSuccess()
            {
                Title   = "Appointment Rescheduled",
                Content = String.Format("Appointment booked with Dr. {0} in {1},{2} is rescheduled on {3} at {4}",
                                        app_temp.doc_name, app_temp.hosp_name, app_temp.location, app_date, time),
            };

            //bookSuccess.ButtonClicked += this.onOKButtonClicked;
            //await viewModel.GetAppointments(1);

            app_date = viewModel.app_vals.APP_DATE;
            await bookSuccess.ShowAsync();
        }
Ejemplo n.º 7
0
        public async void onAppCheckSuccess(object source, EventArgs args)
        {
            if (viewModel.ct > 0)
            {
                AppointmentBookSuccess bookFail = new AppointmentBookSuccess()
                {
                    Title   = "Appointment Booking Failed",
                    Content = String.Format("You already have an appointment on {0} at {1}", app_date, time),
                };
                Res_Pop.IsOpen     = false;
                Res_Pop.Visibility = Visibility.Collapsed;
                await bookFail.ShowAsync();

                TimeSlotBox.SelectedIndex = -1;
            }
        }