/// <summary> /// Get sekce /// </summary> /// <returns></returns> public async Task GetSections() { if (IsBusy) { return; } IsBusy = true; try { Sekces.Clear(); var items = await sekcesService.GetItemsAsync(true); foreach (var item in items) { Sekces.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
public async Task FillVatAndSectiontNames() { foreach (var item in EditItems.Select(x => x.VatName).Distinct()) { VatNames.Add(item); } foreach (var item in Sekces.Select(x => x.name).Distinct()) { SectionNames.Add(item); } }
public void Sekce() { sekcesService = new SekcesService(); var result = Task.Run(async() => await sekcesService.GetItemsAsync()).Result; foreach (var item in result) { Sekces.Add(item); } AddSfTabItems(); }