123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System;
- using System.Collections.ObjectModel;
- using System.Threading.Tasks;
- using Comal.Classes;
- using InABox.Core;
- using InABox.Mobile;
- using Syncfusion.XForms.Buttons;
- using Xamarin.Forms;
- namespace PRS.Mobile
- {
-
-
- public class KanbanEditViewModel : MobileViewModel<Kanban, IKanbanShell>
- {
-
- public KanbanDocumentModel Documents { get; set; }
-
- public KanbanFormModel Forms { get; set; }
-
- public KanbanEditViewModel()
- {
- Documents = new KanbanDocumentModel(App.Data,
- () => new Filter<KanbanDocument>(x => x.EntityLink.ID).IsEqualTo(Item?.ID ?? CoreUtils.FullGuid));
-
- Forms = new KanbanFormModel(App.Data,
- () => new Filter<KanbanForm>(x => x.Parent.ID).IsEqualTo(Item?.ID ?? CoreUtils.FullGuid));
- }
- protected override void DoLoad()
- {
- var tasks = new Task[]
- {
- Task.Run(() => Forms.Refresh(true)),
- Task.Run(() => Documents.Refresh(true))
- };
- Task.WaitAll(tasks);
- }
-
- public override bool IsChanged => Item == null || Item.ID == Guid.Empty || Item.IsChanged();
- }
- }
|