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