public CourseDetailsDto GetCourseDetails(int showClassId) { var obj = new ClassState(showClassId); return new CourseDetailsDto { ClassId = showClassId, CourseLength = obj.CourseLength.HasValue ? obj.CourseLength.Value : 0, CourseTime = obj.CourseTime.HasValue ? obj.CourseTime.Value : 0, State = obj.State, Lho = obj.Lho, AwardByHeight = obj.AwardByHeight, Category = obj.Category }; }
public int SetCourseTimeAndLength(CourseDetailsDto courseDetails) { var classState = new ClassState(); var res = classState.SetCourseTimeAndLength(courseDetails); classState.UpdateResults(courseDetails); return res; }