예제 #1
0
 private void AddButton_Click(object sender, RoutedEventArgs e)
 {
     Data.AddElement(new Room {
         RoomName    = NameTextBox.Text,
         RoomAdress  = AdressTextBox.Text,
         Description = DescriptionTextBox.Text
     });
     Data.UpdateRooms();
     Close();
 }
예제 #2
0
        private void DeleteButton_Click(object sender, RoutedEventArgs e)
        {
            if (RoomsListBox.SelectedItem == null)
            {
                return;
            }
            RoomViewModel room = (RoomViewModel)RoomsListBox.SelectedItem;

            Data.DelElement(room);
            Data.UpdateRooms();
        }