public ActionResult SupportersEdit(int id) { var m = new MissionTripEmailer { PeopleId = id }; return(View(m)); }
public ActionResult RemoveSupporter(int id, int supporterid) { var m = new MissionTripEmailer { PeopleId = id }; m.RemoveSupporter(supporterid); return(View("SupportersEdit", m)); }
public ActionResult Send(MissionTripEmailer m) { var s = m.Send(); if (s == null) { return(Content("/MissionTripEmail/Sent")); } return(Content(s)); }
public ActionResult EmailBody(int oid, int pid) { if (Util.UserPeopleId != pid) { return(Content("not authorized")); } var m = new MissionTripEmailer { PeopleId = pid, OrgId = oid }; return(View(m)); }
public ActionResult Index(int oid, int pid) { if (Util.UserPeopleId != pid && !User.IsInRole("MissionGiving")) { return(Content("not authorized")); } DbUtil.LogActivity("MissionTripEmail {0}".Fmt(pid)); var m = new MissionTripEmailer { PeopleId = pid, OrgId = oid }; return(View(m)); }
public ActionResult Index(int oid, int pid) { if (Util.UserPeopleId != pid) { return(Content("not authorized")); } DbUtil.LogActivity($"MissionTripEmail {pid}"); var m = new MissionTripEmailer { PeopleId = pid, OrgId = oid }; return(View(m)); }
public ActionResult EmailBody(int oid, int pid) { var missiongiving = User.IsInRole("MissionGiving") || User.IsInRole("Developer"); if (Util.UserPeopleId != pid && !missiongiving) { return(Content("not authorized")); } var m = new MissionTripEmailer { PeopleId = pid, OrgId = oid }; return(View(m)); }
public ActionResult AddSupporter(int id, string supporter) { int? supporterid = null; string email = null; if (supporter.AllDigits()) { supporterid = supporter.ToInt(); } else { email = supporter; } var m = new MissionTripEmailer { PeopleId = id }; ViewBag.newid = m.AddRecipient(supporterid, email); return(View("Supporters", m)); }
public ActionResult SupportersUpdate(MissionTripEmailer m) { m.UpdateRecipients(); return(View("Supporters", m)); }
public ActionResult SupportSearch(int id, string q) { var qq = MissionTripEmailer.Search(id, q).ToArray(); return(Content(JsonConvert.SerializeObject(qq))); }
public ActionResult TestSend(MissionTripEmailer m) { var s = m.TestSend(); return(Content(s)); }