Exemplo n.º 1
0
 public ActionResult OrgMembers(int id, string search)
 {
     var ret = AuthenticateDeveloper();
     if (ret.StartsWith("!"))
         return Content($"<OrgMembers error=\"{ret.Substring(1)}\" />");
     var api = new APIOrganization(DbUtil.Db);
     DbUtil.LogActivity("APIOrg OrgMembers " + id);
     return Content(api.OrgMembers(id, search), "text/xml");
 }
Exemplo n.º 2
0
        public void EmailReminders(int orgId)
        {
            var org = db.LoadOrganizationById(orgId);
            var m   = new API.APIOrganization(db);

            if (org.RegistrationTypeId == RegistrationTypeCode.ChooseVolunteerTimes)
            {
                m.SendVolunteerReminders(orgId, false);
            }
            else
            {
                m.SendEventReminders(orgId);
            }
        }
Exemplo n.º 3
0
 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);
     }
 }
Exemplo n.º 4
0
        public void EmailReminders(object orgId)
        {
            var oid = orgId.ToInt();
            var org = db.LoadOrganizationById(oid);
            var m   = new API.APIOrganization(db);

            Util.IsInRoleEmailTest = TestEmail;
            if (org.RegistrationTypeId == RegistrationTypeCode.ChooseVolunteerTimes)
            {
                m.SendVolunteerReminders(oid, false);
            }
            else
            {
                m.SendEventReminders(oid);
            }
        }
Exemplo n.º 5
0
 public APIOrganization.Organization GetOrganization(object orgId)
 {
     var api = new APIOrganization(db);
     return api.GetOrganization(orgId.ToInt());
 }
Exemplo n.º 6
0
 public void EmailReminders(int orgId)
 {
     var org = db.LoadOrganizationById(orgId);
     var m = new API.APIOrganization(db);
     if (org.RegistrationTypeId == RegistrationTypeCode.ChooseVolunteerTimes)
         m.SendVolunteerReminders(orgId, false);
     else
         m.SendEventReminders(orgId);
 }
Exemplo n.º 7
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");
 }
Exemplo n.º 8
0
 public ActionResult OrgMembers2(int id)
 {
     var ret = AuthenticateDeveloper();
     if (ret.StartsWith("!"))
         return Content("<OrgMembers error=\"{0}\" />".Fmt(ret.Substring(1)));
     var api = new APIOrganization(DbUtil.Db);
     DbUtil.LogActivity("APIOrg OrgMembers2 " + id);
     //            return Content(api.OrgMembersPython(id), "text/xml");
     return Content(api.OrgMembers2(id, null), "text/xml");
 }