示例#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");
         }
     }
 }
        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");
                }
            }
        }