public Customer(int id, string name, string address, string telephone, int numNights, Room room, string idRoom) { this.id = id; this.name = name; this.address = address; this.telephone = telephone; this.numNights = numNights; bookRoom(id, room, idRoom); writeToFile(); }
public Customer(int id, string name, string address, string telephone, int numNights) { this.id = id; this.name = name; this.address = address; this.telephone = telephone; this.numNights = numNights; this.room = null; this.idRoom = convertStringFormat(this.idRoom, 5); writeToFile(); }
public void addRoom(int id, Room room) { if (id == this.id) rooms.Add(room); }
public void setUpBookingInformation(int id, ArrayList rooms, string idRoom) { if (id == this.id) { for (int i = 0; i < rooms.Count; i++) { if (((Room)rooms[i]).checkRoom(idRoom)) { this.room = (Room)rooms[i]; break; } } } }
public void checkOut(int id, string idRoom) { if (id == this.id) { this.room.setRoomAvailable(idRoom); this.room = null; this.idRoom = convertStringFormat("", 5); this.checkInStatus = false; changeInFile(id, 7); changeInFile(id, 6); } }
public void checkOut(int id, Hotel hotel, int idHotel, string idRoom) { if (id == this.id) { this.checkInStatus = false; this.room = hotel.changeRoomStatus(idHotel, convertStringFormat(idRoom, 5), checkInStatus); this.idRoom = convertStringFormat("", 5); changeInFile(id, 7); changeInFile(id, 6); } }
public void bookRoom(int id, Room room, string idRoom) { if (id == this.id && room != null) { string idRoom2 = convertStringFormat(idRoom, 5); room.setRoomNotAvailable(idRoom2); this.room = room; this.idRoom = idRoom2; if (!this.checkInStatus) { changeInFile(id, 7); changeInFile(id, 6); } this.checkInStatus = true; } }
public void bookRoom(int id, ArrayList rooms, string idRoom) { if (id == this.id) { string idRoom2 = convertStringFormat(idRoom, 5); for (int i = 0; i < rooms.Count; i++) { if (((Room)rooms[i]).checkRoom(idRoom2)) { this.room = (Room)rooms[i]; this.idRoom = idRoom2; if (this.checkInStatus != true) this.room.setRoomNotAvailable(idRoom2); this.checkInStatus = true; changeInFile(id, 7); changeInFile(id, 6); break; } } } }
public void bookRoom(int id, Hotel hotel, int idHotel, string idRoom) { if (id == this.id) { string idRoom2 = convertStringFormat(idRoom, 5); this.checkInStatus = true; this.room = hotel.changeRoomStatus(idHotel, idRoom2, checkInStatus); if (this.room != null) { this.idRoom = idRoom2; } else this.checkInStatus = false; changeInFile(id, 7); changeInFile(id, 6); } }