예제 #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");
            }
        }
예제 #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;
        }
예제 #3
0
 protected virtual void ShowMenssageSuccess()
 {
     PageContext.DisplayAlert("", Lang.success_save, "ok");
 }
예제 #4
0
 protected virtual void ShowMenssageError(string msgError)
 {
     PageContext.DisplayAlert(Lang.warning, msgError, "ok");
 }