Example #1
0
        private void FixItemList()
        {
            // Somehow item list got messed up and items are not unique anymore
            var duplicates = ObservableItems.GroupBy(x => x.ItemId).Where(g => g.Count() > 1)
                             .Select(y => y);

            foreach (var duplicateGroup in duplicates)
            {
                var duplicate = duplicateGroup.First();
                ObservableItems.Remove(duplicate);
            }
        }
Example #2
0
 public virtual void RemoveItem(WriteoffItem item)
 {
     ObservableItems.Remove(item);
 }