Example #1
0
        // Public Methods
        public void ImportOrder(
            TenantInfoValueObject tenant,
            SystemUser executionSystemUser,
            DateTime orderDate,
            string code,
            Customer customer,
            OrderShipping orderShipping,
            ICollection <OrderItem> orderItemCollection)
        {
            SetNewId();
            SetOrderDate(orderDate);
            SetCode(code);
            SetCustomer(customer);
            SetOrderShipping(orderShipping);

            SetOrderStatus(OrderStatusEnum.Open);
            OrderStatus.SetTenantInfo(tenant);
            OrderStatus.SetCreationInfo(executionSystemUser.Username);

            ImportOrderItemCollection(tenant, executionSystemUser, orderItemCollection);

            SetTenant(tenant);
            SetCreationInfo(executionSystemUser.Username);
        }
Example #2
0
 private void SetOrderShipping(OrderShipping orderShipping)
 {
     OrderShipping = orderShipping;
     orderShipping?.ChangeOrder(this);
 }