예제 #1
0
 public async Task <bool> DeleteSingleLearner(DBLearner learner)
 {
     if (learner != null)
     {
         return(await AsyncDb.DeleteAsync(learner) > 0);
     }
     return(false);
 }
예제 #2
0
 public async Task <int> SaveLearner(DBLearner dbLrnr)
 {
     if (await GetLearnerByIdent(dbLrnr.Ident) != null)
     {
         return(await AsyncDb.UpdateAsync(dbLrnr));
     }
     else
     {
         return(await AsyncDb.InsertAsync(dbLrnr));
     }
 }
예제 #3
0
 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");
     }
 }
예제 #4
0
 public LearnerDetails(DBLearner learner)
 {
     InitializeComponent();
     _learner = learner;
     slLearner.BindingContext = _learner;
 }