Exemplo n.º 1
0
 public Delivery(Guid?delivererId, string customerPhoneNumber, DateTime dueDate, Vehicles vehicle, Guid?startedAtId, double?warehouseDistanceInKilometers,
                 DateTime?warehouseETA, Guid warehouseId, DateTime?warehousePickUpAt, double?customerDistanceInKilometers, DateTime?customerETA,
                 Guid customerId, Guid?currentId, DateTime?deliveredAt, double price, double?tip, PaymentMethods paymentMethod, DeliveryStatus status)
 {
     this.DelivererId                   = delivererId;
     this.CustomerPhoneNumber           = customerPhoneNumber;
     this.DueDate                       = dueDate;
     this.Vehicle                       = vehicle;
     this.VehicleDisplayName            = Instance().GetDisplayName(vehicle.GetType(), vehicle.ToString());
     this.StartedAtId                   = startedAtId;
     this.WarehouseDistanceInKilometers = warehouseDistanceInKilometers;
     this.WarehouseETA                  = warehouseETA;
     this.WarehouseId                   = warehouseId;
     this.WarehousePickUpAt             = warehousePickUpAt;
     this.CustomerDistanceInKilometers  = customerDistanceInKilometers;
     this.CustomerETA                   = customerETA;
     this.CustomerId                    = customerId;
     this.CurrentId                     = currentId;
     this.DeliveredAt                   = deliveredAt;
     this.Price                    = price;
     this.Tip                      = tip;
     this.PaymentMethod            = paymentMethod;
     this.PaymentMethodDisplayName = Instance().GetDisplayName(paymentMethod.GetType(), paymentMethod.ToString());
     this.Status                   = status;
     this.StatusDisplayName        = Instance().GetDisplayName(status.GetType(), status.ToString());
 }
Exemplo n.º 2
0
 /// <summary>
 /// Public constructor without navigational properties and Id
 /// </summary>
 /// <param name="delivererId"></param>
 /// <param name="customerPhoneNumber"></param>
 /// <param name="dueDate"></param>
 /// <param name="vehicle"></param>
 /// <param name="startedAtId"></param>
 /// <param name="warehouseDistanceInKilometers"></param>
 /// <param name="warehouseETA"></param>
 /// <param name="warehouseId"></param>
 /// <param name="warehousePickUpAt"></param>
 /// <param name="customerDistanceInKilometers"></param>
 /// <param name="customerETA"></param>
 /// <param name="customerId"></param>
 /// <param name="currentId"></param>
 /// <param name="deliveredAt"></param>
 /// <param name="price"></param>
 /// <param name="tip"></param>
 /// <param name="paymentMethod"></param>
 /// <param name="status"></param>
 public Delivery(Guid id, string customerPhoneNumber, DateTime dueDate, Vehicles vehicle, string vehicleDisplayName, double price, PaymentMethods paymentMethod, DeliveryStatus status)
 {
     this.CustomerPhoneNumber = customerPhoneNumber;
     this.DueDate             = dueDate;
     this.Vehicle             = vehicle;
     this.VehicleDisplayName  = vehicleDisplayName;
     this.VehicleDisplayName  = Instance().GetDisplayName(vehicle.GetType(), vehicle.ToString());
     this.Price                    = price;
     this.PaymentMethod            = paymentMethod;
     this.PaymentMethodDisplayName = Instance().GetDisplayName(paymentMethod.GetType(), paymentMethod.ToString());
     this.Status                   = status;
     this.StatusDisplayName        = Instance().GetDisplayName(status.GetType(), status.ToString());
 }