Esempio n. 1
0
        public void PlaceOrder(BO.Order order)
        {
            MarkDates(order);
            order.Commission = CalculateCommision(order);
            CloseIrrelevantOrders(order);
            UpdateUserStatus(order);
            DO.Host host = dal.RecieveHost(order.HostID);
            host.TotalCommission += order.Commission;
            order.TotalCost       = order.HostingUnit.PricePerNight * PassedDays(order.GuestRequest.EntryDate, order.GuestRequest.ReleaseDate);

            dal.UpdateHost(host);
        }
Esempio n. 2
0
 public Host RecieveHost(int key)
 {
     DO.Host host = XML.RecieveHost(key);
     return(host == null ? throw new MissingMemberException($"host {key} dosen't exist") : host);
 }