async Task ExecuteLoadItemsCommand() { if (IsBusy) { return; } IsBusy = true; try { Trainings.Clear(); var trainings = await App.Database.GetTrainingsAsync(); foreach (var t in trainings) { Trainings.Add(t); } } catch (Exception ex) { Debug.WriteLine(ex); } finally { IsBusy = false; } }
public void Reset() { SelectedEmployee = null; FirstName = null; LastName = null; Status = false; HireDate = null; ReviewDate = null; Positions.Clear(); Trainings.Clear(); NotifyOfPropertyChange(() => CanSave); NotifyOfPropertyChange(() => CanReset); }