public async void LoadAcl(string id) { Busy = true; BusyContent = "Loading ACL"; Id = id; List <Organization> orgs = new List <Organization>(); List <IdentityDescriptionObject> acl = new List <IdentityDescriptionObject>(); AllIdentities = new ObservableCollection <Organization>(); AclList = new ObservableCollection <IdentityDescriptionObject>(); await Task.Factory.StartNew(() => { var visService = new VisService(); acl = visService.GetAcl(Id); orgs = visService.FindIdentties(); }); foreach (var i in acl) { AclList.Add(i); } foreach (var org in orgs) { if (acl.FirstOrDefault(x => x.IdentityId == org.Mrn) == null) { AllIdentities.Add(org); } } Busy = false; }
public async void LoadSubscriptions(string id) { Busy = true; BusyContent = "Loading subscriptions"; Id = id; List <VisSubscriptionObject> subscriptions = new List <VisSubscriptionObject>(); List <IdentityDescriptionObject> acl = new List <IdentityDescriptionObject>(); SubscriptionList = new ObservableCollection <VisSubscriptionObject>(); AclList = new ObservableCollection <IdentityDescriptionObject>(); await Task.Factory.StartNew(() => { var visService = new VisService(); subscriptions = visService.GetSubscriptions(Id); acl = visService.GetAcl(Id); }); foreach (var i in acl) { AclList.Add(i); } foreach (var i in subscriptions) { SubscriptionList.Add(i); } Busy = false; }