public ActionResult Reminders(int id, bool?emailall, string apiKey) { var org = DbUtil.Db.LoadOrganizationById(id); var m = new CmsData.API.APIOrganization(DbUtil.Db); try { if (org.RegistrationTypeId == RegistrationTypeCode.ChooseVolunteerTimes) { m.SendVolunteerReminders(id, emailall ?? false); } else { m.SendEventReminders(id); } } catch (Exception ex) { return(Content(ex.Message)); } return(Content("ok")); }
public ActionResult Reminders(int id, bool? emailall) { var org = DbUtil.Db.LoadOrganizationById(id); var m = new CmsData.API.APIOrganization(DbUtil.Db); try { if (org.RegistrationTypeId == RegistrationTypeCode.ChooseVolunteerTimes) m.SendVolunteerReminders(id, emailall ?? false); else m.SendEventReminders(id); } catch (Exception ex) { return Content(ex.Message); } return Content("ok"); }