Ejemplo n.º 1
0
        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"));
        }
Ejemplo n.º 2
0
 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");
 }