Example #1
0
 private void deleteRoomMenuItem_Click(object sender, RoutedEventArgs e)
 {
     if (roomsUserControl.allRoomsTable.SelectedItem != null)
     {
         room = (Room)this.roomsUserControl.allRoomsTable.SelectedItem;
         if (string.Equals(room.Name, "Magacin"))
         {
             return;
         }
         if (!room.RoomRenovationState.ActivityStatus)
         {
             RoomController.GetInstance().DeleteRoom((Room)this.roomsUserControl.allRoomsTable.SelectedItem);
             ManagerMainWindow.getInstance().roomsUserControl.refreshTable();
             MessageBox.Show("Izabrana prostorija je sada obrisana iz sistema.", "Brisanje prostorije", MessageBoxButton.OK, MessageBoxImage.Information);
         }
         else
         {
             RenovationMessageWindow.GetInstance().Show();
         }
     }
     else
     {
         MessageBox.Show("Niste odabrali prostoriju!", "Upozorenje", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
 public static RenovationMessageWindow GetInstance()
 {
     if (instance == null)
     {
         instance = new RenovationMessageWindow();
     }
     return(instance);
 }
Example #3
0
 private void editRoomMenuItem_Click(object sender, RoutedEventArgs e)
 {
     room = (Room)this.roomsUserControl.allRoomsTable.SelectedItem;
     if (room != null)
     {
         if (room.RoomRenovationState.ActivityStatus)
         {
             RenovationMessageWindow.GetInstance().Show();
         }
         else
         {
             EditRoomWindow.getInstance(room).Show();
         }
     }
     else
     {
         MessageBox.Show("Niste odabrali prostoriju!", "Upozorenje", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
Example #4
0
        private void renovationMenuItem_Click(object sender, RoutedEventArgs e)
        {
            Room selectedRoom = (Room)roomsUserControl.allRoomsTable.SelectedItem;

            if (roomsUserControl.allRoomsTable.SelectedItem != null)
            {
                if (selectedRoom.RoomRenovationState.ActivityStatus)
                {
                    RenovationMessageWindow.GetInstance().ShowDialog();
                }
                else
                {
                    RoomRenovationWindow.GetInstance(selectedRoom).ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("Izaberite prostoriju iz tabele!", "Upozorenje", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     instance = null;
 }