Exemplo n.º 1
0
 public void saveToDataBase(FootballPlayer PlayerDetails)
 {
     //DisplayAlert ("folder",folderPath,"ok");
     if (PlayerDetails != null)
     {
         try {
             using (SQLiteConnection connection = new SQLiteConnection(Path.Combine(App.folderPath, "FootballPlayerDB.db3"))) {
                 connection.Insert(PlayerDetails);
             }
             MessagingCenter.Send(this, "DBChanged");
             this.Navigation.PopAsync();
         } catch (SQLiteException ex) {
             DisplayAlert("Error", ex.Message, "return");
         }
     }
 }
Exemplo n.º 2
0
        public void saveToDataBase(FootballPlayer PlayerDetails)
        {
            //DisplayAlert ("folder",folderPath,"ok");
            if (PlayerDetails != null) {
                try {
                    using (SQLiteConnection connection = new SQLiteConnection (Path.Combine (App.folderPath, "FootballPlayerDB.db3"))) {
                        connection.Insert (PlayerDetails);

                    }
                    MessagingCenter.Send (this, "DBChanged");
                    this.Navigation.PopAsync ();
                } catch (SQLiteException ex) {
                    DisplayAlert ("Error", ex.Message, "return");
                }
            }
        }