Ejemplo n.º 1
0
        private void Button_Click_Room_List(object sender, RoutedEventArgs e)
        {
            var room_list = new RoomList();

            room_list.Show();
            this.Close();
        }
Ejemplo n.º 2
0
 public UpdateRoom(RoomList rl)
 {
     InitializeComponent();
     this.DataContext = this;
     roomList         = rl;
     cbRoomType.Items.Add("Ordination");
     cbRoomType.Items.Add("HospitalRoom");
     cbRoomType.Items.Add("OperationRoom");
 }
Ejemplo n.º 3
0
 public CreateRoom(RoomList rl)
 {
     InitializeComponent();
     this.DataContext = this;
     cbRoomType.Items.Add("Ordination");
     cbRoomType.Items.Add("HospitalRoom");
     cbRoomType.Items.Add("OperationRoom");
     cbRoomType.Text = "Ordination";
     roomList        = rl;
     lbID.Content    = roomList.control.roomService.roomRepository.next_roomID.ToString();
 }
Ejemplo n.º 4
0
        private void Button_Click_Cancel(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show("Da li ste sigurni da želite da izađete?", "Zdravo", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No);

            if (result == MessageBoxResult.Yes)
            {
                roomList = new RoomList();
                roomList.Show();
                this.Close();
            }
        }
Ejemplo n.º 5
0
 private void Button_Click_Ok(object sender, RoutedEventArgs e)
 {
     if (tbDescription.Text == "" || tbDescription.Text == null || tbArea.Text == "" || tbArea.Text == null ||
         tbFloor.Text == "" || tbFloor.Text == null || cbRoomType.Text == "")
     {
         MessageBox.Show("Niste popunili sva polja!", "Upozorenje!", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
     else
     {
         var        room_list = new RoomList();
         Model.Room room      = new Model.Room(roomList.control.roomService.roomRepository.next_roomID, tbDescription.Text,
                                               int.Parse(tbFloor.Text), double.Parse(tbArea.Text),
                                               (Model.RoomType)Enum.Parse(typeof(Model.RoomType), cbRoomType.Text));
         roomList.control.roomService.roomRepository.next_roomID++;
         roomList.control.CreateRoom(room);
         roomList.Load();
         room_list.Show();
         this.Close();
         MessageBox.Show("Uspešno ste kreirali salu!", "Uspešno!", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }
Ejemplo n.º 6
0
 private void Button_Click_Ok(object sender, RoutedEventArgs e)
 {
     if (tbuDescription.Text == "" || tbuDescription.Text == null || tbuArea.Text == "" || tbuArea.Text == null ||
         cbRoomType.Text == "")
     {
         MessageBox.Show("Niste popunili sva polja!", "Upozorenje!", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
     else
     {
         roomList = new RoomList();
         int            rID         = int.Parse(lbuID.Content.ToString());
         double         area        = double.Parse(tbuArea.Text);
         String         description = tbuDescription.Text;
         Model.RoomType rt          = (Model.RoomType)Enum.Parse(typeof(Model.RoomType), cbRoomType.Text);
         roomList.control.UpdateRoom(rID, description, area, rt);
         roomList.Load();
         roomList.Show();
         this.Close();
         MessageBox.Show("Uspešno ste izmenili salu!", "Uspešno!", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }
Ejemplo n.º 7
0
 private void Btn_Room_List(object sender, RoutedEventArgs e)
 {
     rl = new RoomList();
     rl.Show();
     this.Close();
 }
Ejemplo n.º 8
0
 private void Button_Click_Back(object sender, RoutedEventArgs e)
 {
     rl = new RoomList();
     rl.Show();
     this.Close();
 }