Exemple #1
0
        private async void LoadLevels()
        {
            try
            {
                IList <Level> levelItems = DependencyService.Resolve <ILevelDataAccess>().GetAll().OrderBy(l => l.Code).ToList <Level>();

                Levels = levelItems.ToList <ISelectorItem>();
            }
            catch (Exception e)
            {
                await PageContext.DisplayAlert("erro", e?.Message, "cancel");
            }
        }
Exemple #2
0
        private async Task Save()
        {
            IsBusy = true;

            try
            {
                WorkOutDay workOutDay = new WorkOutDay();
                workOutDay.Id          = (IdRecordDay > 0) ? IdRecordDay : workOutDay.Id;
                workOutDay.WorkOutDate = WorkOutDate;
                workOutDay.Level       = (Level)SelectedLevel;
                workOutDay.WorkOut     = (WorkOut)SelectedWorkOut;
                workOutDay.Observasion = Observation;

                SaveWorkOutDay(workOutDay);
                IdRecordDay = workOutDay.Id;
            }
            catch (System.Exception e)
            {
                await PageContext.DisplayAlert("erro", e?.Message, "cancel");
            }

            IsBusy = false;
        }
Exemple #3
0
 protected virtual void ShowMenssageSuccess()
 {
     PageContext.DisplayAlert("", Lang.success_save, "ok");
 }
Exemple #4
0
 protected virtual void ShowMenssageError(string msgError)
 {
     PageContext.DisplayAlert(Lang.warning, msgError, "ok");
 }