public ActionResult Search(string searchTerm) { var searchResults = JustGivingLogic.SearchCharities(searchTerm); return(PartialView("_CharityPartials", new CharityListVM { Charities = searchResults, ShowSelector = true, ShowJustGivingLink = false, ShowSocial = false })); }
public ActionResult MakePayment(string ContribID) { var ContribIDInt = GenericLogic.GetInt(ContribID); if (ContribIDInt.HasValue) { var contrib = db.PledgeContributors.FirstOrDefault(pc => pc.ID == ContribIDInt); var URL = JustGivingLogic.GetPaymentURL(contrib, Url, Request); return(Redirect(URL)); } return(null); }
public ActionResult userSearchPrompt(string SearchString) { SearchString = SearchString.ToLower(); var ImageURL = Url.Action("GetImage", "Image"); var ActivitiesURL = Url.Content("~/Images/Activities/"); var result = new { teams = from t in db.Teams where t.Name.ToLower().Contains(SearchString) select new { t.Name, Url = ImageURL + "?ImageID=" + t.ImageID + "&Thumb=true" }, activities = from act in Enum.GetNames(typeof(PledgeActivity.ActivityTypes)) where act.ToLower().Contains(SearchString) select new { Name = act.Replace("_", " "), Url = ActivitiesURL + act + ".png" }, charities = from c in JustGivingLogic.SearchCharities(SearchString) select new { c.Name, Url = c.JustGivingCharityImageURL } }; Response.StatusCode = (int)HttpStatusCode.OK; return(Json(result, JsonRequestBehavior.AllowGet)); }