Exemplo n.º 1
0
        internal Booking(Supplier supplier, Customer customer, string sale, int bookingNumber, DateTime startDate, 
            DateTime endDate, IDataAccessFacade dataAccessFacade)
        {
            validateSale(sale);
            validateEndDate(startDate, endDate);

            // Get entities for DataAccess
            ISupplier supplierEntity = supplier._supplierEntity;
            ICustomer customerEntity = customer._customerEntity;

            this.dataAccessFacade = dataAccessFacade;
            _bookingEntity = dataAccessFacade.CreateBooking(supplierEntity, customerEntity, sale, bookingNumber,
                startDate, endDate);

            _supplier = supplier;
            _customer = customer;
        }
Exemplo n.º 2
0
        internal Booking(Supplier supplier, Customer customer, string sale, int bookingNumber, DateTime startDate,
                         DateTime endDate, IDataAccessFacade dataAccessFacade)
        {
            validateSale(sale);
            validateEndDate(startDate, endDate);

            // Get entities for DataAccess
            ISupplier supplierEntity = supplier._supplierEntity;
            ICustomer customerEntity = customer._customerEntity;

            this.dataAccessFacade = dataAccessFacade;
            _bookingEntity        = dataAccessFacade.CreateBooking(supplierEntity, customerEntity, sale, bookingNumber,
                                                                   startDate, endDate);

            _supplier = supplier;
            _customer = customer;
        }