public ActionResult MainPage()
        {
            var stuno = StudentLoginFilter.StuNo;
            var sm    = sb.GetStudent(stuno);

            return(View(sm));
        }
        private void UpdateForm()
        {
            var oldStudent = _studentForm.GetStudent();

            var updatedStudent = _studentBll.GetStudent(oldStudent);

            _studentForm.LoadStudent(updatedStudent);

            _studentForm.LoadEnrolledCourses(updatedStudent.Courses.ToList());
            var availableCourses = _courseBll.GetCourses();

            foreach (var course in updatedStudent.Courses)
            {
                availableCourses.Remove(course);
            }
            _studentForm.LoadAvailableCourses(availableCourses);

            _studentForm.LoadStudentGrades(updatedStudent.Grades.ToList());
        }
        public ActionResult ShowStudyReport(int lessonProcessId, string path, int source = 0)
        {
            StudentReportBll studentReportBll = new StudentReportBll();
            DtoStudentReport studyReport      = studentReportBll.GetByStuLesAnswer(GetCurrentUser().StudentId, lessonProcessId);
            StudentBll       studentBll       = new StudentBll();
            var stuName = studentBll.GetStudent(GetCurrentUser().StudentId).Bst_Name;

            studyReport.StudyAdvice = string.Format(StudentStudyReport(studyReport.Evaluate), stuName, studyReport.ImporveCount, studyReport.ImporveKnow, studyReport.GoodKnow);
            SumReportViewModel viewModels = studyReport.ConvertTo <SumReportViewModel>();

            var courseInfo = studentReportBll.GetStuCourseReportById(lessonProcessId);

            viewModels.StudentName   = GetCurrentUser().Name;
            viewModels.ReportType    = courseInfo.ReportType;
            viewModels.ReportTypeStr = courseInfo.ReportTypeStr;
            viewModels.CourseName    = courseInfo.Ycs_Name;
            viewModels.LessonName    = courseInfo.Ycl_Name;
            viewModels.PraticeCount  = courseInfo.PraticeCount;
            viewModels.Source        = source;
            viewModels.Path          = path;
            return(View(viewModels));
        }