public Booking BuildBooking(Booking booking, BookingStatus bookingStatus) { booking.UpdatedBy = "System"; booking.UpdatedOn = DateTime.Now; booking.Status = bookingStatus.ToString(); return(this); }
public void ChangeBookingStatus(Guest guest, BookingStatus status) { XDocument xDoc = XDocument.Load(this._filePath); XElement booking = xDoc .Element("Bookings") .Elements("Booking") .Single(element => uint.Parse(element.Element("GuestId").Value) == guest.Id); booking.Element("BookStatus").Value = status.ToString(); xDoc.Save(this._filePath); }
static string StatusToCompactStr(BookingStatus status) => status.ToString();