Exemplo n.º 1
0
        public OrderEditModel CreateOrderEditModel(UOrder_Order from)
        {
            var to = new OrderEditModel();

            CopyOrderEditModel(to, from);
            return(to);
        }
Exemplo n.º 2
0
 private void CopyOrderEditModel(OrderEditModel to, UOrder_Order from)
 {
     to.OrderId            = from.MOrder.OrderId;
     to.OrderNumber        = from.MOrder.OrderNumber;
     to.Items              = CreateOrderEditItemModels(from.MOrder.OrderItems);
     to.ItemSubtotal       = from.MOrder.ItemSubtotalAmount;
     to.Discount           = from.MOrder.DiscountAmount;
     to.Shipping           = from.MOrder.ShippingAmount;
     to.TaxableSubtotal    = to.ItemSubtotal - to.Discount + to.Shipping;
     to.SalesTaxPercent    = from.MOrder.SalesTaxPercent;
     to.SalesTax           = from.MOrder.SalesTaxAmount;
     to.Total              = from.MOrder.TotalAmount;
     to.SubmissionDateTime = Locale.GetLocalTimeFromUtc(from.MOrder.SubmissionDateTimeUtc);
     to.OrderStatus        = from.MOrder.OrderStatus.ToString();
 }