Exemplo n.º 1
0
 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)));
 }
Exemplo n.º 2
0
 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)));
 }
Exemplo n.º 3
0
 public ActionResult GetTeacherHorizontalResult(int departmentId)
 {
     var business = new DormExamBusiness(Db);
     var condition = new DormExamSearchCondition { DepartmentId = departmentId, MajorId = 0, Grade = "全部", ClassInfoId = 0 };
     var json = JsonConvert.SerializeObject(business.CalculateTeacherHorizontal(business.SearchDormExam(condition)),
         DateTimeConverter);
     return Content(json);
 }
Exemplo n.º 4
0
 public ActionResult Search(DormExamSearchCondition condition)
 {
     var business = new DormExamBusiness(Db);
     var json = JsonConvert.SerializeObject(business.SearchDormExam(condition));
     return Content(json);
 }