public ActionResult GetTeacherVerticalResult(string teacherName, DateTime startTime, DateTime endTime) { var business = new DormExamBusiness(Db); var condition = new DormExamSearchCondition { DepartmentId = 0, MajorId = 0, Grade = "全部", ClassInfoId = 0, TeacherName = teacherName }; var list = business.SearchDormExam(condition); var result = list.Where(u => u.Time <= endTime && u.Time >= startTime).ToList(); return Content(JsonConvert.SerializeObject(business.CalculateTeacherVertical(result))); }
public ActionResult GetStudentVerticalResult(int departmentId, int majorId, string grade, int classId, DateTime startTime, DateTime endTime) { var business = new DormExamBusiness(Db); var condition = new DormExamSearchCondition { DepartmentId = departmentId, MajorId = majorId, Grade = grade, ClassInfoId = classId }; var list = business.SearchDormExam(condition); var result = list.Where(u => u.Time <= endTime && u.Time >= startTime).ToList(); return Content(JsonConvert.SerializeObject(business.CalculateTeacherVertical(result))); }