コード例 #1
0
        public ActionResult EventReminders(Guid id)
        {
            var m = new APIOrganization(CurrentDatabase);

            try
            {
                m.SendEventReminders(id);
            }
            catch (Exception ex)
            {
                return(Content(ex.Message));
            }
            return(Content("ok"));
        }
コード例 #2
0
ファイル: Email.cs プロジェクト: suraninoman/bvcms
 public void EmailReminders(object orgId)
 {
     using (var db2 = NewDataContext())
     {
         var oid = orgId.ToInt();
         var org = db2.LoadOrganizationById(oid);
         var m   = new APIOrganization(db2);
         Util.IsInRoleEmailTest = TestEmail;
         if (org.RegistrationTypeId == RegistrationTypeCode.ChooseVolunteerTimes)
         {
             m.SendVolunteerReminders(oid, false);
         }
         else
         {
             m.SendEventReminders(oid);
         }
     }
 }
コード例 #3
0
        public ActionResult Reminders(int id, bool?emailall)
        {
            var org = DbUtil.Db.LoadOrganizationById(id);
            var m   = new APIOrganization(DbUtil.Db);

            try
            {
                if (org.RegistrationTypeId == RegistrationTypeCode.ChooseVolunteerTimes)
                {
                    m.SendVolunteerReminders(id, emailall ?? false);
                }
                else
                {
                    var qid = DbUtil.Db.QueryInCurrentOrg().QueryId;
                    m.SendEventReminders(qid);
                }
            }
            catch (Exception ex)
            {
                return(Content(ex.Message));
            }
            return(Content("ok"));
        }