Esempio n. 1
0
        public virtual TransportOrder Accept(int transportProposalIndex)
        {
            //decrease available capacity on used legs
            foreach (TransportUnit transportUnit in this.TransportUnits)
            {
                //select route
                transportUnit.SelectRoute(transportProposalIndex);

                //reserve capacity
                transportUnit.SelectedRoute.ReserveCapacity();
            }

            //set status to accepted
            this.Status = TransportRequestStatus.Accepted;

            //create the transport order
            return new TransportOrder(this.Customer, this.TransportUnits);
        }
Esempio n. 2
0
 private void Init(Customer customer, IList<TransportUnit> transportUnits)
 {
     this.customer = customer;
     this.createdTime = DateTime.Now; //Steria.Utilities.TimeHelper.Now;
     this.status = TransportRequestStatus.New;
     this.transportUnits = transportUnits;
 }