Exemple #1
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 #2
0
 private void SaveWorkOutDay(WorkOutDay workOutDay)
 {
     DependencyService.Resolve <IWorkOutDayDataAccess>().SaveNew(workOutDay, ShowReturnMenssage);
 }