public static Rooms Create()
        {
            Rooms room = new Rooms();

            rooms.Add(room);

            return room;
        }
Пример #2
0
 public static void Update(Rooms room, int roomNumber, int numberOfBeds, bool hasTV, string typeOfBathroom, bool hasBeenCleanedToday)
 {
     room.RoomNumber = roomNumber;
     room.NumberOfBeds = numberOfBeds;
     room.HasTV = hasTV;
     room.TypeOfBathroom = typeOfBathroom;
     room.HasBeenCleanedToday = hasBeenCleanedToday;
 }
Пример #3
0
 public RoomEdit1(Rooms x) : this()
 {
     InitializeComponent();
     this.temp = x;
     textBoxNum.Text = temp.RoomNumber.ToString();
     textBoxBeds.Text = temp.Beds.ToString();
     checkBox.IsChecked = temp.HasTV;
     tempID = temp.id;
 }
        private void buttonAddRoom_Click(object sender, RoutedEventArgs e)
        {
            Rooms room = new Rooms()
            {
                RoomNumber = RoomManagementRepository.GetAll().Count + 1,
                NumberOfBeds = "2",
                HasTv = true,
                DateOfReservation = "Enter Date MM/DD/YYYY",

            };
            RoomManagementRepository.Add(room);
        }
Пример #5
0
        public static Rooms Create(int roomnum, int beds, bool tv)
        {
            Rooms room = new Rooms();
            room.id = idCounter + 1;
            idCounter++;
            room.RoomNumber = roomnum;
            room.Beds = beds;
            room.HasTV = tv;
            rooms.Add(room);
            return new Rooms();

        }
     public static Reservations Create(Customer cus, Rooms rm, DateTime ci, DateTime co, string note)
     {
         Reservations res = new Reservations();
         res.id = idCounter + 1;
         idCounter++;
         res.Customer = cus;
         res.Room = rm;
         res.CheckIn = ci;
         res.CheckOut = co;
         res.Notes = note;
         reservations.Add(res);
         return new Reservations();
 }
 public static void Update(Rooms room, bool hasTv, string numberOfBeds, string dateofReservation)
 {
     room.NumberOfBeds = numberOfBeds;
     room.HasTv = hasTv;
     room.DateOfReservation = dateofReservation;
 }
 public static void Add(Rooms room)
 {
     rooms.Add(room);
 }
 private void dataGridRoomManagement_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     currentlySelectedRoom = (Rooms)dataGridRoomManagement.SelectedItem;
 }
Пример #10
0
 public static void Delete(Rooms rm)
 {
     rooms.Remove(rm);
 }