private async void Load() { Data = await UserService.GetProfile(Helper.Account.Role); if (Data != null) { KHS = await KhsService.GetKHsSummary(Data.Npm); } }
async void ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { Items.Clear(); var mahasiswa = await UserService.GetProfile(Helper.Account.Role); var data = await KhsService.GetKhs(mahasiswa.Npm); foreach (var datas in data.GroupBy(x => x.Smt)) { GroupKhs d = new GroupKhs(datas.Key); foreach (var item in datas) { d.Add(item); } Items.Add(d); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { await Task.Delay(200); IsBusy = false; } }