public virtual OrderItemStateCreatedDto NewOrderItemStateCreated(string orderItemSeqId) { var e = new OrderItemStateCreatedDto(); var eId = NewOrderItemEventId(orderItemSeqId); e.OrderItemEventId = eId; return(e); }
public virtual OrderItemStateCreatedDto ToOrderItemStateCreatedDto(IOrderItemStateCreated e) { var dto = new OrderItemStateCreatedDto(); dto.OrderItemEventId = e.OrderItemEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.Version = e.Version; dto.CommandId = e.CommandId; dto.ProductId = e.ProductId; dto.ExternalProductId = e.ExternalProductId; dto.Quantity = e.Quantity; dto.CancelQuantity = e.CancelQuantity; dto.SelectedAmount = e.SelectedAmount; dto.ExternalId = e.ExternalId; dto.OrderItemTypeId = e.OrderItemTypeId; dto.OrderItemGroupSeqId = e.OrderItemGroupSeqId; dto.IsItemGroupPrimary = e.IsItemGroupPrimary; dto.FromInventoryItemId = e.FromInventoryItemId; dto.IsPromo = e.IsPromo; dto.QuoteId = e.QuoteId; dto.QuoteItemSeqId = e.QuoteItemSeqId; dto.ShoppingListId = e.ShoppingListId; dto.ShoppingListItemSeqId = e.ShoppingListItemSeqId; dto.UnitPrice = e.UnitPrice; dto.UnitListPrice = e.UnitListPrice; dto.UnitAverageCost = e.UnitAverageCost; dto.UnitRecurringPrice = e.UnitRecurringPrice; dto.IsModifiedPrice = e.IsModifiedPrice; dto.RecurringFreqUomId = e.RecurringFreqUomId; dto.ItemDescription = e.ItemDescription; dto.Comments = e.Comments; dto.CorrespondingPoId = e.CorrespondingPoId; dto.StatusId = e.StatusId; dto.SyncStatusId = e.SyncStatusId; dto.EstimatedShipDate = e.EstimatedShipDate; dto.EstimatedDeliveryDate = e.EstimatedDeliveryDate; dto.AutoCancelDate = e.AutoCancelDate; dto.DontCancelSetDate = e.DontCancelSetDate; dto.DontCancelSetBy = e.DontCancelSetBy; dto.ShipBeforeDate = e.ShipBeforeDate; dto.ShipAfterDate = e.ShipAfterDate; dto.CancelBackOrderDate = e.CancelBackOrderDate; dto.OverrideGlAccountId = e.OverrideGlAccountId; dto.Active = e.Active; return(dto); }
public virtual OrderStateCreatedDto ToOrderStateCreatedDto(IOrderStateCreated e) { var dto = new OrderStateCreatedDto(); dto.OrderEventId = e.OrderEventId; dto.CreatedAt = e.CreatedAt; dto.CreatedBy = e.CreatedBy; dto.CommandId = e.CommandId; dto.OrderTypeId = e.OrderTypeId; dto.OrderName = e.OrderName; dto.ExternalId = e.ExternalId; dto.SalesChannelEnumId = e.SalesChannelEnumId; dto.OrderDate = e.OrderDate; dto.Priority = e.Priority; dto.EntryDate = e.EntryDate; dto.PickSheetPrintedDate = e.PickSheetPrintedDate; dto.StatusId = e.StatusId; dto.CurrencyUomId = e.CurrencyUomId; dto.SyncStatusId = e.SyncStatusId; dto.BillingAccountId = e.BillingAccountId; dto.OriginFacilityId = e.OriginFacilityId; dto.WebSiteId = e.WebSiteId; dto.ProductStoreId = e.ProductStoreId; dto.TerminalId = e.TerminalId; dto.TransactionId = e.TransactionId; dto.AutoOrderShoppingListId = e.AutoOrderShoppingListId; dto.NeedsInventoryIssuance = e.NeedsInventoryIssuance; dto.IsRushOrder = e.IsRushOrder; dto.InternalCode = e.InternalCode; dto.RemainingSubTotal = e.RemainingSubTotal; dto.GrandTotal = e.GrandTotal; dto.InvoicePerShipment = e.InvoicePerShipment; dto.Active = e.Active; var orderRoleEvents = new List <OrderRoleStateCreatedDto>(); foreach (var ee in e.OrderRoleEvents) { OrderRoleStateCreatedDto eeDto = OrderRoleStateEventDtoConverter.ToOrderRoleStateCreatedDto(ee); orderRoleEvents.Add(eeDto); } dto.OrderRoleEvents = orderRoleEvents.ToArray(); var orderItemEvents = new List <OrderItemStateCreatedDto>(); foreach (var ee in e.OrderItemEvents) { OrderItemStateCreatedDto eeDto = OrderItemStateEventDtoConverter.ToOrderItemStateCreatedDto(ee); orderItemEvents.Add(eeDto); } dto.OrderItemEvents = orderItemEvents.ToArray(); var orderShipGroupEvents = new List <OrderShipGroupStateCreatedDto>(); foreach (var ee in e.OrderShipGroupEvents) { OrderShipGroupStateCreatedDto eeDto = OrderShipGroupStateEventDtoConverter.ToOrderShipGroupStateCreatedDto(ee); orderShipGroupEvents.Add(eeDto); } dto.OrderShipGroupEvents = orderShipGroupEvents.ToArray(); return(dto); }