Exemplo n.º 1
0
        private void safeRemoveTimeEntry(long id)
        {
            var collectionIndex = TimeEntries.IndexOf(c => c.Any(vm => vm.Id == id));

            if (collectionIndex < 0)
            {
                return;
            }

            var item = TimeEntries[collectionIndex].First(vm => vm.Id == id);

            TimeEntries.RemoveFromChildCollection(collectionIndex, item);
            RaisePropertyChanged(nameof(IsEmpty));
        }