public int SaveNewYear(string name, DateTime Date, int Year, int ownerID)
        {
            DataRepository dataRepository = new DataRepository();
            Year yr = new Year();
            yr.Name = name;
            yr.Year1 = Year;
            yr.Date = Date;
            yr.OwnerID = ownerID;

            int YID = dataRepository.Add(yr);
            return YID;
        }
 public int SaveNewTournCourse(string name, int YID, int ST)
 {
     DataRepository dataRepository = new DataRepository();
     Course course = new Course();
     course.CourseName = name;
     course.Stableford_Total = ST;
     course.YID = YID;
     int CID = dataRepository.Add(course);
     return CID;
 }
        public void SaveNewHole(int CID, int YID, int holenum, int par, int pin, int LD, int SIndx)
        {
            DataRepository dataRepository = new DataRepository();
            Hole h = new Hole();
            h.CourseID = CID;
            h.YearID = YID;
            h.HoleNum = holenum;
            h.Par = par;
            h.N_pin = pin;
            h.L_drive = LD;
            h.SI = SIndx;

            dataRepository.Add(h);
        }
 public int SaveNewTourn(string name, DateTime date, int yr)
 {
     DataRepository dataRepository = new DataRepository();
     CourseUA course = new CourseUA();
     course.CourseName = name;
     course.Stableford_Total = 5;
     int CID = dataRepository.Add(course);
     return CID;
 }
 public int SaveNewCourse(string name, int stable)
 {
     DataRepository dataRepository = new DataRepository();
     CourseUA course = new CourseUA();
     course.CourseName = name;
     course.Stableford_Total = stable;
     int CID = dataRepository.Add(course);
     return CID;
 }