示例#1
0
        public void AddPackstoCarriage(Packs packs, int quantity)
        {
            CartLine line = lineCollection.Where(p => p.Packs.PacksID == packs.PacksID).FirstOrDefault();

            if (line == null)
            {
                lineCollection.Add(new CartLine {
                    Packs = packs, Quantity = quantity                              /*, Waga = waga*/
                });
            }
            else
            {
                line.Quantity += quantity;
                // line.Waga += waga;
            }
        }
示例#2
0
 public void RemoveLine(Packs packs)
 {
     lineCollection.RemoveAll(l => l.Packs.PacksID == packs.PacksID);
 }