예제 #1
0
 public ActionResult AttendanceDetail(string Dt1, string Dt2, OrgSearchModel m)
 {
     var dt1 = Dt1.ToDate();
     if (!dt1.HasValue)
         dt1 = ChurchAttendanceModel.MostRecentAttendedSunday();
     var dt2 = Dt2.ToDate();
     if (!dt2.HasValue)
         dt2 = dt1.Value.AddDays(1);
     var m2 = new AttendanceDetailModel(dt1.Value, dt2, m);
     return View(m2);
 }
예제 #2
0
 public ActionResult MeetingsAttendance(DateTime? dt1, DateTime? dt2, OrgSearchModel m)
 {
     var dt = ChurchAttendanceModel.MostRecentAttendedSunday();
     if (!dt1.HasValue)
         dt1 = new DateTime(dt.Year, 1, 1);
     if (!dt2.HasValue)
         dt2 = dt;
     var m2 = new AttendanceDetailModel(dt1.Value, dt2, m);
     return m2.FetchMeetings().ToDataTable().ToExcel("MeetingsExport.xlsx");
 }