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")); }
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)); }
public ActionResult AttendanceDetail(string Dt1, string Dt2, string name, int?divid, int?schedid, int?campusid) { var dt1 = Dt1.ToDate(); if (!dt1.HasValue) { dt1 = ChurchAttendanceModel.MostRecentAttendedSunday(); } var dt2 = Dt2.ToDate(); if (!dt2.HasValue) { dt2 = dt1.Value.AddDays(1); } var m = new AttendanceDetailModel(dt1.Value, dt2, name, divid, schedid, campusid); return(View(m)); }
public ActionResult AttendanceDetail(string dt1, string dt2, OrgSearchModel m) { var d1 = dt1.ToDate(); if (!d1.HasValue) { d1 = ChurchAttendanceModel.MostRecentAttendedSunday(CurrentDatabase); } var d2 = dt2.ToDate(); if (!d2.HasValue) { d2 = d1.Value.AddDays(1); } var m2 = new AttendanceDetailModel(d1.Value, d2, m); return(View(m2)); }