public void inputRoom() { Console.WriteLine("input N room in Hotel"); int n = Convert.ToInt32(Console.ReadLine()); for (int i = 0; i < n; i++) { Room newroom = new Room(); newroom.input(); Console.WriteLine("room vua nhap"); newroom.display(); ListRoom.Add(newroom); } }
private void AddRoom() { // add room to database var room = new ROOM() { RoomID = RoomID, Status_ = "Còn sử dụng", Capacity = Int32.Parse(Capacity), Description_ = Description }; DataProvider.Ins.DB.ROOMs.Add(room); DataProvider.Ins.DB.SaveChanges(); // add room to listroom for displaying ListRoom.Add(room); }