private void UpdateCourse(SimpleEditableCourseStat source, CourseStat target)
 {
     target.CourseId    = source.CourseId;
     target.TeeMarkerId = source.TeeMarkerId;
     target.Slope       = source.Slope;
     target.Rating      = source.Rating;
     target.Yardage     = source.Yardage;
 }
        internal void SetCourse(CourseStat courseStat)
        {
            _editingCourseStat = courseStat;
            if (CourseStat != null)
            {
                CourseStat.ErrorsChanged -= RaiseCanExecuteChanged;
            }

            CourseStat = new SimpleEditableCourseStat();
            CopyCourseStat(courseStat, CourseStat);
        }
        private void CopyCourseStat(CourseStat source, SimpleEditableCourseStat target)
        {
            target.CourseId = source.CourseId;

            if (EditMode)
            {
                target.Yardage     = source.Yardage;
                target.TeeMarkerId = source.TeeMarkerId;
                target.Rating      = source.Rating;
                target.Slope       = source.Slope;
            }
        }
Ejemplo n.º 4
0
        internal void InsertCourseStat(CourseStat courseStat)
        {
            using (_dbConnection = new SqlConnection(_connectionString))
            {
                var parameters = new DynamicParameters();
                parameters.Add("@COURSE_ID", courseStat.CourseId);
                parameters.Add("@TEE_MARKER_ID", courseStat.TeeMarkerId);
                parameters.Add("@SLOPE", courseStat.Slope);
                parameters.Add("@RATING", courseStat.Rating);
                parameters.Add("@YARDAGE", courseStat.Yardage);

                _dbConnection.Execute("dbo.USP_INS_COURSE_STAT", parameters, commandType: CommandType.StoredProcedure);
            }
        }
Ejemplo n.º 5
0
 private void OnViewRounds(CourseStat courseStat)
 {
     ViewRoundsRequested(courseStat.CourseId);
 }
Ejemplo n.º 6
0
 private void OnViewHoles(CourseStat courseStat)
 {
     ViewHolesRequested(courseStat.CourseId, courseStat.TeeMarkerId);
 }
Ejemplo n.º 7
0
 internal void UpdateCourseStat(CourseStat _editingCourseStat)
 {
     throw new NotImplementedException();
 }