Exemple #1
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (dataGridStanje_u_Magacinu.SelectedIndex != -1)
     {
         SelectedDoctorRoom = (StorageModel)dataGridStanje_u_Magacinu.SelectedItem;
         if (SelectedDoctorRoom.Location.Contains("A"))
         {
             GroundFloor f = new GroundFloor(SelectedDoctorRoom.Location);
             f.Show();
             this.Close();
         }
         else if (SelectedDoctorRoom.Location.Contains("B"))
         {
             GroundFloor2 f = new GroundFloor2(SelectedDoctorRoom.Location);
             f.Show();
             this.Close();
         }
         else
         {
             FirstFloor f = new FirstFloor(SelectedDoctorRoom.Location);
             f.Show();
             this.Close();
         }
     }
 }
        private void GroundFloor2(object sender, RoutedEventArgs e)
        {
            GroundFloor2 p = new GroundFloor2();

            p.Show();
            this.Close();
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            SelectedRoom = (WorkDayViewView)raspored.SelectedItem;

            if (SelectedRoom.IdOfRoom == null)
            {
                MessageBox.Show("Soba ne postoji na mapi");
                return;
            }
            if (SelectedRoom.IdOfRoom.Contains("A"))
            {
                GroundFloor f = new GroundFloor(SelectedRoom.IdOfRoom);
                f.Show();
            }
            else if (SelectedRoom.IdOfRoom.Contains("B"))
            {
                GroundFloor2 f = new GroundFloor2(SelectedRoom.IdOfRoom);
                f.Show();
            }
            else
            {
                FirstFloor f = new FirstFloor(SelectedRoom.IdOfRoom);
                f.Show();
            }
        }
 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();
     }
 }
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            SelectedAnotherRoom = (RoomWorkTime)AnotherRoomsDataGrid.SelectedItem;

            if (SelectedAnotherRoom.IdOfRoom.Equals("HospitalA") || SelectedAnotherRoom.IdOfRoom.Equals("HospitalB"))
            {
                MessageBox.Show("Clinic A and Clinic B are located on the complex maps! ", "Notice", MessageBoxButton.OK, MessageBoxImage.Information);
                return;
            }

            if (SelectedAnotherRoom.IdOfRoom.Contains("A"))
            {
                GroundFloor f = new GroundFloor(SelectedAnotherRoom.IdOfRoom);
                f.Show();
            }
            else if (SelectedAnotherRoom.IdOfRoom.Contains("B"))
            {
                GroundFloor2 f = new GroundFloor2(SelectedAnotherRoom.IdOfRoom);
                f.Show();
            }
        }