public ActionResult List()
        {
            using (var db = new XkSystem.Models.DbContext())
            {
                var vm        = new Models.ExamChange.List();
                var tbStudent = from p in db.Table <Student.Entity.tbStudent>()
                                select p;

                var student = (from p in tbStudent
                               where (p.StudentCode == vm.SearchText || p.StudentName == vm.SearchText)
                               select new
                {
                    p.Id,
                    p.StudentCode,
                    p.StudentName
                }).FirstOrDefault();
                if (student != null)
                {
                    vm.StudentId = student.Id;
                    var tb = from p in db.Table <Exam.Entity.tbExamMark>()
                             where p.tbExamCourse.IsDeleted == false && p.tbExamCourse.tbCourse.IsDeleted == false &&
                             p.tbStudent.Id == student.Id &&
                             p.tbExamCourse.tbExam.IsDeleted == false
                             select p;

                    vm.ExamMarkList = (from p in tb
                                       select new Dto.ExamChange.List
                    {
                        Id = p.Id,
                        CourseId = p.tbExamCourse.tbCourse.Id,
                        StudentId = p.tbStudent.Id,
                        StudentCode = p.tbStudent.StudentCode,
                        StudentName = p.tbStudent.StudentName,
                        ExamName = p.tbExamCourse.tbExam.ExamName,
                        CourseName = p.tbExamCourse.tbCourse.CourseName,
                        AppraiseMark = p.AppraiseMark,
                        SegmentMark = p.SegmentMark,
                        TotalMark = p.TotalMark,
                        ExamLevelName = p.tbExamLevel.ExamLevelName,
                    }).ToList();
                }
                return(View(vm));
            }
        }
 public ActionResult List(Models.ExamChange.List vm)
 {
     return(Code.MvcHelper.Post(null, Url.Action("List", new { searchText = vm.SearchText })));
 }