Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        public void Reset()
        {
            SelectedEmployee = null;
            FirstName        = null;
            LastName         = null;
            Status           = false;
            HireDate         = null;
            ReviewDate       = null;
            Positions.Clear();
            Trainings.Clear();

            NotifyOfPropertyChange(() => CanSave);
            NotifyOfPropertyChange(() => CanReset);
        }