Пример #1
0
 public ActionResult Search(StudentVisitRecordCriteria c)
 {
     c.sortname = "time";
     c.sortorder = "desc";
     var m = new Student_Visit_ViewModel {
         Criteria = c,
         CurrentUser = AppContext.CurrentUser,
         Records = this.Service.Search(c).Data,
         ShowConfirmEdit = true,
         ShowDelete = true,
         ShowInput = false
     };
     return this.View(m);
 }
Пример #2
0
 private Student_Visit_ViewModel BuildVisitViewModel(int studentId)
 {
     var m = new Student_Visit_ViewModel();
     var studentService = new StudentService(new SysContext { CurrentUser = AppContext.CurrentUser });
     m.Student = studentService.FindById(studentId);
     m.Records = this.Service.FindByStudentId(studentId).OrderByDescending(o => o.Time).ToList();
     return m;
 }
Пример #3
0
 public ActionResult Search()
 {
     var m = new Student_Visit_ViewModel {
         Criteria = new StudentVisitRecordCriteria(),
         CurrentUser = AppContext.CurrentUser,
         Records = new List<StudentVisitRecord>(),
         ShowConfirmEdit = true,
         ShowDelete = true,
         ShowInput = false
     };
     m.Criteria.TimeFromSrh = DateTime.Today.AddDays(-7);
     m.Criteria.TimeToSrh = DateTime.Today.AddDays(1);
     return this.View(m);
 }