Esempio n. 1
0
        /// <summary>
        /// Add guest request
        /// </summary>
        /// <param name="guestRequest"></param>
        public void Add_Guest_Request(GuestRequest guestRequest)
        {
            if (guestRequest.Entry_Date >= guestRequest.ReleaseDate)
            {
                throw new InvalidInputException("The dates are not valid !  From BL");
            }

            if (guestRequest.Adults == 0 && guestRequest.Children == 0)
            {
                throw new InvalidInputException("Invalid number of people ! From BL");
            }
            guestRequest.Status = Guest_Request_Status.Open;
            Dal.Add_Guest_Request(guestRequest.Clone());
        }