コード例 #1
0
 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;
 }
コード例 #2
0
        internal void SetCourse(CourseStat courseStat)
        {
            _editingCourseStat = courseStat;
            if (CourseStat != null)
            {
                CourseStat.ErrorsChanged -= RaiseCanExecuteChanged;
            }

            CourseStat = new SimpleEditableCourseStat();
            CopyCourseStat(courseStat, CourseStat);
        }
コード例 #3
0
        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;
            }
        }
コード例 #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);
            }
        }
コード例 #5
0
 private void OnViewRounds(CourseStat courseStat)
 {
     ViewRoundsRequested(courseStat.CourseId);
 }
コード例 #6
0
 private void OnViewHoles(CourseStat courseStat)
 {
     ViewHolesRequested(courseStat.CourseId, courseStat.TeeMarkerId);
 }
コード例 #7
0
 internal void UpdateCourseStat(CourseStat _editingCourseStat)
 {
     throw new NotImplementedException();
 }