void LoadRoomFooter(DTO.Booking book) { TimeSpan date = book.CheckIn - book.CheckOut; String type = book.BookingTypeID; roomIcon icon = new roomIcon(); icon.occupiedLabel.Text = date.Days.ToString(); icon.bookTypeLabel.Text = type; }
public void updateHeight() { roomIcon icon = new roomIcon(); int numRoom = numroomIcon; double numRow = Math.Ceiling(((double)numRoom / 4)); Console.WriteLine(numRow + " " + icon.Height); double totalHeight = numRow * icon.Height; flowLayoutRoomList.Size = new Size(1170, (int)totalHeight); this.Size = new Size(1170, (int)totalHeight + 90); }
void LoadRoomList(Room room) { String id = room.RoomID; int num = room.NumPerson; int status = room.Status; string type = room.RoomType.Trim(); roomIcon icon = new roomIcon(); standarList.roomTypeLabel.Text = "Standar"; superiorList.roomTypeLabel.Text = "Superior"; deluxeList.roomTypeLabel.Text = "Deluxe"; premiumDeluxeList.roomTypeLabel.Text = "Premium Deluxe"; familyDeluxeList.roomTypeLabel.Text = "Family Deluxe"; familySuiteList.roomTypeLabel.Text = "Family Suite"; icon.roomIdLabel.Text = id; icon.mainLabel.Text = type; switch (status) { case 1: icon.statusLabel.Text = "Reserved"; reserve += 1; break; case 2: icon.statusLabel.Text = "Occupied"; occupied += 1; break; case 3: icon.statusLabel.Text = "Checked-out"; checkout += 1; break; default: icon.statusLabel.Text = "Available"; available += 1; break; } Ri.Add(icon); //Neu room type id = 1 -> la single room if (type.Equals("Standard".ToUpper())) { standarList.flowLayoutRoomList.Controls.Add(icon); standarList.numroomIcon += 1; standard += 1; } else if (type.Equals("Superior".ToUpper())) { superiorList.flowLayoutRoomList.Controls.Add(icon); superiorList.numroomIcon += 1; superior += 1; } else if (type.Equals("Deluxe".ToUpper())) { deluxeList.flowLayoutRoomList.Controls.Add(icon); deluxeList.numroomIcon += 1; deluxe += 1; } else if (type.Equals("Premium Deluxe".ToUpper())) { premiumDeluxeList.flowLayoutRoomList.Controls.Add(icon); premiumDeluxeList.numroomIcon += 1; premium += 1; } else if (type.Equals("Family Deluxe".ToUpper())) { familyDeluxeList.flowLayoutRoomList.Controls.Add(icon); familyDeluxeList.numroomIcon += 1; familyDeluxe += 1; } else { familySuiteList.flowLayoutRoomList.Controls.Add(icon); familySuiteList.numroomIcon += 1; familySuite += 1; } roomListPanel.Controls.Add(familySuiteList); roomListPanel.Controls.Add(familyDeluxeList); roomListPanel.Controls.Add(premiumDeluxeList); roomListPanel.Controls.Add(deluxeList); roomListPanel.Controls.Add(superiorList); roomListPanel.Controls.Add(standarList); }