Пример #1
0
        public void moveItemToSpecialIndex(int newIndex, int oldIndex)
        {
            var item = new ProductionlistItem(_list[oldIndex].article, _list[oldIndex].quantity);

            _list[oldIndex] = null;
            _list.Insert(newIndex, item);
            _list.RemoveAll(x => x == null);
        }
Пример #2
0
 public void AddItem(ProductionlistItem item)
 {
     if (item == null)
     {
         throw new Exception();
     }
     if (item.quantity <= 0)
     {
         return;
     }
     _list.Add(item);
 }