public void Edit(DoctorRoomView doctor)
 {
     Doctors = GetAll();
     foreach (DoctorRoomView currentDoctor in Doctors)
     {
         if (currentDoctor.IdOfRoom.Equals(doctor.IdOfRoom.ToString()) && currentDoctor.JmbgOfDoctor.Equals(doctor.JmbgOfDoctor))
         {
             currentDoctor.FromDateTime    = doctor.FromDateTime;
             currentDoctor.ToDateTime      = doctor.ToDateTime;
             currentDoctor.NameOfDoctor    = doctor.NameOfDoctor;
             currentDoctor.SurnameOfDoctor = doctor.SurnameOfDoctor;
         }
     }
     SaveAll(Doctors);
 }
Example #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (AllDoctorsDataGrid.SelectedItems.Count > 0)
            {
                DoctorRoomView selectedDoctor = new DoctorRoomView();
                selectedDoctor = (DoctorRoomView)AllDoctorsDataGrid.SelectedItem;

                AvailableTerms av = new AvailableTerms(selectedDoctor);
                av.Show();
            }
            else
            {
                MessageBox.Show("You must select at least one species", "Notice", MessageBoxButton.OK, MessageBoxImage.Information);
                return;
            }
        }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     SelectedDoctorRoom = (DoctorRoomView)DoctorsRoomDataGrid.SelectedItem;
     if (SelectedDoctorRoom.IdOfRoom.Contains("A"))
     {
         GroundFloor f = new GroundFloor(SelectedDoctorRoom.IdOfRoom);
         f.Show();
     }
     else if (SelectedDoctorRoom.IdOfRoom.Contains("B"))
     {
         GroundFloor2 f = new GroundFloor2(SelectedDoctorRoom.IdOfRoom);
         f.Show();
     }
     else
     {
         FirstFloor f = new FirstFloor(SelectedDoctorRoom.IdOfRoom);
         f.Show();
     }
 }
Example #4
0
 public AvailableTerms(DoctorRoomView doctor)
 {
     InitializeComponent();
     this.DataContext = this;
     SelectedTermsForSelectedDoctor = doctor.MedicalTerms;
 }