Example #1
0
        public void AddItem(TypeServices order, int quantity)
        {
            CartLine line = lineCollection
                .Where(g => g.Order.ID == order.ID)
                .FirstOrDefault();

            if (line == null)
            {
                lineCollection.Add(new CartLine
                {
                    Order = order,
                    Quantity = quantity
                });
            }
            else
            {
                line.Quantity += quantity;
            }
        }
 partial void DeleteTypeServices(TypeServices instance);
 partial void UpdateTypeServices(TypeServices instance);
 partial void InsertTypeServices(TypeServices instance);
 public bool UpdateService(TypeServices instance)
 {
     throw new NotImplementedException();
 }
Example #6
0
 public void RemoveLine(TypeServices order)
 {
     lineCollection.RemoveAll(l => l.Order.ID == order.ID);
 }