public async Task <bool> DeleteSingleLearner(DBLearner learner) { if (learner != null) { return(await AsyncDb.DeleteAsync(learner) > 0); } return(false); }
public async Task <int> SaveLearner(DBLearner dbLrnr) { if (await GetLearnerByIdent(dbLrnr.Ident) != null) { return(await AsyncDb.UpdateAsync(dbLrnr)); } else { return(await AsyncDb.InsertAsync(dbLrnr)); } }
private async void FormView_ItemTapped(object sender, ItemTappedEventArgs e) { try { if (e.Item != null && CanStart("ShowLearner")) { DBLearner dbLearner = e.Item as DBLearner; await Navigation.PushAsync(new LearnerDetails(dbLearner)); } } finally { EndTask("ShowLearner"); } }
public LearnerDetails(DBLearner learner) { InitializeComponent(); _learner = learner; slLearner.BindingContext = _learner; }