GetVatService() { if (IsBusy) { return; } IsBusy = true; try { VAT.Clear(); var items = await VatServices.GetItemsAsync(true); foreach (var item in items) { VAT.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
async Task GetTask() { if (IsBusy) { return; } VatServices = new VatServices(); IsBusy = true; _Dane.Clear(); var items = await VatServices.GetItemsAsync(true); try { foreach (var item in items) { Dane.Add(item); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }