Exemplo n.º 1
0
        /// <summary>
        /// Creates Booking
        /// </summary>
        /// <param name="EmployeeID"> An employees ID</param>
        /// <param name="username"> A Username from the user</param>
        /// <param name="escapeRoomID">The EscapeRoom ID</param>
        /// <param name="BookTime"> The Time for the booking</param>
        /// <param name="AmountOfPeople">The Amount of people</param>
        /// <param name="BDate">The Date of the booking</param>
        /// <returns> returns 1 if succesful and returns 0 if failed.</returns>
        public int CreateBooking(int EmployeeID, string username, int escapeRoomID, TimeSpan BookTime, int AmountOfPeople, DateTime BDate)
        {
            IBookingServices Service = new BookingServicesClient();

            return(Service.Create(EmployeeID, username, escapeRoomID, BookTime, AmountOfPeople, BDate));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Calls the WCF, so the method Create runs in the host and a booking is createt and saved in the database
        /// </summary>
        /// <param name="book"></param>
        /// <returns></returns>
        public int Create(MAPMAClient.Model.Booking book)
        {
            IBookingServices Service = new BookingServicesClient();

            return(Service.Create(book.Emp.EmployeeID, book.Cus.Username, book.Er.EscapeRoomID, book.BookingTime, book.AmountOfPeople, book.Date));
        }