Exemple #1
0
        public ActionResult AttendanceHelpToggle(int id)
        {
            CurrentDatabase.ToggleUserPreference("ShowAttendanceHelp");
            var m = new SettingsAttendanceModel(id, CurrentDatabase);

            return(PartialView("Settings/Attendance", m));
        }
Exemple #2
0
        public ActionResult ForNewMeeting(int orgid)
        {
            var oi = new SettingsAttendanceModel(orgid, CurrentDatabase);
            var defaultAttendCreditId = "0";

            if (oi.Schedules.Count > 0)
            {
                defaultAttendCreditId = oi.Schedules[0].AttendCredit.Value;
            }

            var useMeetingDescriptionPickList = CurrentDatabase.Setting("AttendanceUseMeetingCategory");
            var m = new NewMeetingInfo
            {
                MeetingDate     = oi.PrevMeetingDate,
                Schedule        = new CodeInfo(0, oi.SchedulesPrev()),
                AttendCredit    = new CodeInfo(defaultAttendCreditId, oi.AttendCreditList()),
                DescriptionList = useMeetingDescriptionPickList ? new CodeInfo("", MeetingCategorySelectList()) : null,
                UseMeetingDescriptionPickList = useMeetingDescriptionPickList,
                OrganizationId = orgid
            };

            ViewBag.Action       = "/CreateNewMeeting/";
            ViewBag.Method       = "POST";
            ViewBag.ForRollsheet = false;
            return(View("MeetingInfo", m));
        }
Exemple #3
0
        public ActionResult AttendanceHelpToggle(int id)
        {
            DbUtil.Db.ToggleUserPreference("ShowAttendanceHelp");
            var m = new SettingsAttendanceModel(id);

            return(PartialView("Settings/Attendance", m));
        }
        public ActionResult ForNewMeeting(int orgid)
        {
            var oi = new SettingsAttendanceModel()
            {
                Id = orgid
            };
            var defaultAttendCreditId = "0";

            if (oi.Schedules.Count > 0)
            {
                defaultAttendCreditId = oi.Schedules[0].AttendCredit.Value;
            }

            var m = new NewMeetingInfo
            {
                MeetingDate    = oi.PrevMeetingDate,
                Schedule       = new CodeInfo(0, oi.SchedulesPrev()),
                AttendCredit   = new CodeInfo(defaultAttendCreditId, oi.AttendCreditList()),
                OrganizationId = orgid
            };

            ViewBag.Action       = "/CreateNewMeeting/";
            ViewBag.Method       = "POST";
            ViewBag.ForRollsheet = false;
            return(View("MeetingInfo", m));
        }
Exemple #5
0
 public ActionResult AttendanceUpdate(SettingsAttendanceModel m)
 {
     m.Update();
     m.UpdateSchedules();
     CurrentDatabase.Refresh(RefreshMode.OverwriteCurrentValues, m.Org.OrgSchedules);
     DbUtil.LogActivity($"Update SettingsAttendance {m.Org.OrganizationName}");
     return(PartialView("Settings/Attendance", m));
 }
Exemple #6
0
        public ActionResult ForNewRollsheet(Guid id)
        {
            var filter = CurrentDatabase.OrgFilter(id);
            var oi     = new SettingsAttendanceModel(filter.Id, CurrentDatabase);
            var m      = new NewMeetingInfo()
            {
                MeetingDate  = oi.NextMeetingDate,
                Schedule     = new CodeInfo(0, oi.SchedulesNext()),
                AttendCredit = new CodeInfo(0, oi.AttendCreditList()),
            };

            ViewBag.Action       = "/Reports/RollsheetForOrg/" + id;
            ViewBag.Method       = "POST";
            ViewBag.ForRollsheet = true;
            return(View("MeetingInfo", m));
        }
        public ActionResult ForNewRallyRollsheet(int orgid)
        {
            var oi = new SettingsAttendanceModel {
                Id = orgid
            };
            var m = new NewMeetingInfo()
            {
                MeetingDate  = oi.NextMeetingDate,
                Schedule     = new CodeInfo(0, oi.SchedulesNext()),
                AttendCredit = new CodeInfo(0, oi.AttendCreditList()),
            };

            ViewBag.Action = "/Reports/RallyRollsheetForOrg/" + orgid;
            ViewBag.Method = "POST";
            return(View("MeetingInfo", m));
        }
        public ActionResult ForNewMeeting(int orgid)
        {
            var oi = new SettingsAttendanceModel()
            {
                Id = orgid
            };
            var m = new NewMeetingInfo()
            {
                MeetingDate  = oi.PrevMeetingDate,
                Schedule     = new CodeInfo(0, oi.SchedulesPrev()),
                AttendCredit = new CodeInfo(0, oi.AttendCreditList()),
            };

            ViewBag.Action = "/CreateNewMeeting/";
            ViewBag.Method = "POST";
            return(View("MeetingInfo", m));
        }
Exemple #9
0
        public ActionResult ForNewRallyRollsheet(Guid id)
        {
            var filter = DbUtil.Db.OrgFilter(id);
            var oi     = new SettingsAttendanceModel {
                Id = filter.Id
            };
            var m = new NewMeetingInfo()
            {
                MeetingDate    = oi.NextMeetingDate,
                Schedule       = new CodeInfo(0, oi.SchedulesNext()),
                AttendCredit   = new CodeInfo(0, oi.AttendCreditList()),
                OrganizationId = filter.Id
            };

            ViewBag.Action       = "/Reports/RallyRollsheetForOrg/" + filter.Id;
            ViewBag.Method       = "POST";
            ViewBag.ForRollsheet = false;
            return(View("MeetingInfo", m));
        }
Exemple #10
0
        public ActionResult AttendanceEdit(int id)
        {
            var m = new SettingsAttendanceModel(id, CurrentDatabase);

            return(PartialView("Settings/AttendanceEdit", m));
        }
Exemple #11
0
        public ActionResult Attendance(int id)
        {
            var m = new SettingsAttendanceModel(id);

            return(PartialView("Settings/Attendance", m));
        }