private void Button_Click(object sender, RoutedEventArgs e)
        {
            ScheduleAppointmentView appointment = new ScheduleAppointmentView();

            appointment.StartTime       = SelectedApp.AvailableAppointment.StartTime;
            appointment.EndTime         = SelectedApp.AvailableAppointment.EndTime;
            appointment.DoctorWorkDayId = SelectedApp.Id;
            MedicalExamination medicalExamination = new MedicalExamination();

            medicalExamination.DoctorId    = SelectedApp.DoctorId;
            medicalExamination.RoomId      = SelectedApp.RoomId;
            appointment.MedicalExamination = medicalExamination;


            if (Backend.App.Instance().DoctorWorkDayService.ScheduleAppointment(ScheduleAppoitmentConverter.AppointmentDtoToAppointment(appointment, SelektovaniPacijent)))
            {
                MessageBox.Show("The appointment is successfully made ");
                ResultSchedule s = new ResultSchedule(Dstart, Dend, DoctorS, PriorityS);
                s.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Error");
            }
        }
示例#2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            String priority = "";

            if (Prioritet.SelectedIndex == 0)
            {
                priority = "Doctor";
            }
            else if (Prioritet.SelectedIndex == 1)
            {
                priority = "DateRange";
            }


            ResultSchedule s = new ResultSchedule(Dstart, Dend, SelektovaniDoktor, priority);

            s.Show();
            this.Close();
        }