public OrderItemProcessedEventArgs(Customer customer, OrderLineItemData orderLineItemData, IStoreRepository storeRepository)
 {
     Customer          = customer;
     OrderLineItemData = orderLineItemData;
     MessageText       = string.Empty;
     StoreRepository   = storeRepository;
 }
Example #2
0
 public OrderItemProcessedEventArgs(
     Customer customer,
     OrderLineItemData orderLineItemData,
     string message)
 {
     this.Customer          = customer;
     this.OrderLineItemData = orderLineItemData;
     this.Message           = message;
 }
Example #3
0
        public int Insert(int orderId, DateTime?shipDate)
        {
            var data = new OrderLineItemData {
                OrderId = orderId
            };

            if (shipDate.HasValue)
            {
                data.ShipDate = shipDate.Value;
            }
            dataContext.OrderLineItems.Add(data);
            var count = dataContext.SaveChanges();

            if (count == 0)
            {
                throw new InvalidOperationException("OrderLineItemDal.Insert");
            }
            return(data.Id);
        }
 public OrderItemProcessedEventArgs(Customer customer, OrderLineItemData orderLineItemData)
 {
     Customer          = customer;
     OrderLineItemData = orderLineItemData;
 }