public void UpdateGuestReq(Guest guest)//Updates guest { if (!CheckDate(guest.EntryDate, guest.ReleaseDate)) { throw new ArgumentOutOfRangeException("Dates are not valid/n "); } try { dal.UpdateGuestReq(guest.Clone()); } catch (KeyNotFoundException e) { throw e; } }
public void AddGuestReq(Guest guest)//Adds a new Guest Request { if (!CheckDate(guest.EntryDate, guest.ReleaseDate)) { throw new ArgumentOutOfRangeException("Dates are not valid\n "); } if (checkEmail(guest.EmailAddress) == false) { throw new ArgumentOutOfRangeException("Invalid Email Address\n"); } try { dal.AddGuestReq(guest.Clone()); } catch (DuplicateWaitObjectException s) { throw s; } }