Ejemplo n.º 1
0
        private void AddCourseButton_Clicked(object sender, EventArgs e)
        {
            var NewCourse = new PlayedCourse();

            NewCourse.CourseID = SelectedCourseID;

            if (Preferences.Get("SeasonsView", 0) > 0)
            {
                NewCourse.Season = Preferences.Get("SeasonsView", 0);
            }
            else
            {
                NewCourse.Season = Preferences.Get("LatestSeason", 0);
            }
            App.Database.SaveCourse(NewCourse);
            //mp.RefreshCourseList();
            PopupNavigation.Instance.PopAllAsync();
            (Application.Current.MainPage as MainPage).ClickPage("Post a Score");
        }
Ejemplo n.º 2
0
 public int SaveCourse(PlayedCourse course)
 {
     return(_database.Insert(course));
 }