コード例 #1
0
ファイル: Cart.cs プロジェクト: Cybervaldemar/ArsenalMash
        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;
            }
        }
コード例 #2
0
 partial void DeleteTypeServices(TypeServices instance);
コード例 #3
0
 partial void UpdateTypeServices(TypeServices instance);
コード例 #4
0
 partial void InsertTypeServices(TypeServices instance);
コード例 #5
0
 public bool UpdateService(TypeServices instance)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
ファイル: Cart.cs プロジェクト: Cybervaldemar/ArsenalMash
 public void RemoveLine(TypeServices order)
 {
     lineCollection.RemoveAll(l => l.Order.ID == order.ID);
 }