private static (int ClassId, string ClassRegistrationEventTarget) ParseClassIdAndRegistrationEventTarget(IHtmlTableRowElement classRow)
        {
            int courseId     = int.Parse(classRow.QuerySelector <IHtmlSpanElement>(slc_classId).TextContent);
            int classSection = int.Parse(classRow.QuerySelector <IHtmlSpanElement>(slc_classSection).TextContent);

            string registrationAnchorHref = classRow.QuerySelector <IHtmlAnchorElement>("a[id*=btnAddCourse]").Href;
            int    hrefFirstQuoteIndex = registrationAnchorHref.IndexOf('\''), hrefSecondQuoteIndex = registrationAnchorHref.IndexOf('\'', hrefFirstQuoteIndex + 1);
            string registrationEventTarget = registrationAnchorHref.Substring(hrefFirstQuoteIndex + 1, hrefSecondQuoteIndex - hrefFirstQuoteIndex - 1);

            return(UClass.Identify(courseId, classSection), registrationEventTarget);
        }
        public static UClass ParseClass(IHtmlTableRowElement classRow, int classYear = 0, USemester classSemester = USemester.Unknown)
        {
            int    courseId        = int.Parse(classRow.QuerySelector <IHtmlSpanElement>(slc_classId).TextContent);
            string courseName      = classRow.QuerySelector <IHtmlSpanElement>("td>span[id*=CourseName]").TextContent;
            string classInstructor = classRow.QuerySelector <IHtmlSpanElement>("td>span[id*=Instructor]").TextContent;
            int    classSection    = int.Parse(classRow.QuerySelector <IHtmlSpanElement>(slc_classSection).TextContent);
            string classDaysString = classRow.QuerySelector <IHtmlSpanElement>("td>span[id*=Day]").TextContent;

            DayOfWeek[] classDays = DayOfWeekConverter.ToDays(classDaysString).ToArray();
            var(classStartTime, classEndTime) = ParseClassTime(classRow.OuterHtml);
            int.TryParse(classRow.QuerySelector <IHtmlSpanElement>("td>span[id*=MaxStNo]")?.TextContent, out int classCapacity);
            int.TryParse(classRow.QuerySelector <IHtmlSpanElement>("td>span[id*=RegStNo]")?.TextContent, out int classRegisterdStudentsCount);

            //To detecet Labs
            int classFinancialHours = (int)((classDays.Length == 1 ? 1 : (classEndTime - classStartTime).TotalHours) * classDays.Length);

            classInstructor = classInstructor.Trim();
            courseName      = courseName.Trim();

            return(new UClass(course: new UCourse(courseId, classFinancialHours, courseName),
                              instructorName: classInstructor,
                              days: classDays,
                              startTime: classStartTime,
                              endTime: classEndTime,
                              section: classSection,
                              capacity: classCapacity,
                              numberOfRegisteredStudents: classRegisterdStudentsCount));
        }