Пример #1
0
        public void ToggleDone(FormDocument <TodoForm> document, DocumentEntry entry)
        {
            var id   = Guid.Parse(entry.GetArgument("LM"));
            var item = items.Find(i => i.Id == id);

            if (item == null)
            {
                return;
            }

            item.Done = !item.Done;
            document.Reload();
        }
Пример #2
0
        public void Delete(FormDocument <TodoForm> document, DocumentEntry entry)
        {
            var id   = Guid.Parse(entry.GetArgument("LM"));
            var item = items.Find(i => i.Id == id);

            if (item == null)
            {
                return;
            }

            items.Remove(item);
            document.Reload();
        }