コード例 #1
0
        public ActionResult ChurchAttendance(DateTime?dt)
        {
            if (!dt.HasValue)
            {
                dt = ChurchAttendanceModel.MostRecentAttendedSunday();
            }
            var m = new ChurchAttendanceModel(dt.Value);

            return(View(m));
        }
コード例 #2
0
ファイル: ExportController.cs プロジェクト: cihejimba/bvcms
        public ActionResult OrgDayStats(DateTime?dt, OrgSearchModel m)
        {
            if (!dt.HasValue)
            {
                dt = ChurchAttendanceModel.MostRecentAttendedSunday();
            }
            var orgs = string.Join(",", m.FetchOrgs().Select(oo => oo.OrganizationId));
            var q    = DbUtil.Db.OrgDayStats(orgs, dt);

            return(q.ToDataTable().ToExcel("OrgDatStats.xlsx"));
        }
コード例 #3
0
 public ActionResult Meetings(MeetingsModel m)
 {
     if (!m.Dt1.HasValue)
     {
         m.Dt1 = ChurchAttendanceModel.MostRecentAttendedSunday();
     }
     if (!m.Dt2.HasValue)
     {
         m.Dt2 = m.Dt1.Value.AddDays(1);
     }
     return(View(m));
 }
コード例 #4
0
        public ActionResult ChurchAttendance(string dt)
        {
            var d = dt.ToDate();

            if (!d.HasValue)
            {
                d = ChurchAttendanceModel.MostRecentAttendedSunday();
            }
            var m = new ChurchAttendanceModel(d.Value);

            return(View(m));
        }
コード例 #5
0
        public ActionResult ChurchAttendance(string id)
        {
            var dt2 = id.ToDate();

            if (!dt2.HasValue)
            {
                dt2 = ChurchAttendanceModel.MostRecentAttendedSunday();
            }
            var m = new ChurchAttendanceModel(dt2.Value);

            return(View(m));
        }
コード例 #6
0
        public ActionResult ChurchAttendance2(DateTime?dt1, DateTime?dt2, string skipweeks)
        {
            if (!dt1.HasValue)
            {
                dt1 = ChurchAttendanceModel.MostRecentAttendedSunday();
            }
            if (!dt2.HasValue)
            {
                dt2 = DateTime.Today;
            }
            var m = new ChurchAttendance2Model(dt1, dt2, skipweeks);

            return(View(m));
        }
コード例 #7
0
ファイル: ExportController.cs プロジェクト: cihejimba/bvcms
        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"));
        }
コード例 #8
0
        public ActionResult ChurchAttendance2(string dt1, string dt2, string skipweeks)
        {
            var d1 = dt1.ToDate();
            var d2 = dt2.ToDate();

            if (!d1.HasValue)
            {
                d1 = ChurchAttendanceModel.MostRecentAttendedSunday();
            }
            if (!d2.HasValue)
            {
                d2 = DateTime.Today;
            }
            var m = new ChurchAttendance2Model(d1, d2, skipweeks);

            return(View(m));
        }
コード例 #9
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));
        }
コード例 #10
0
        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));
        }
コード例 #11
0
        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));
        }