public ActionResult Rockstar(FormCollection collection) { string searchText = collection["SearchQuery"].ToString().ToLower(); ProfileService svc = new ProfileService(); List<RockstarProfile> model = svc.ProfileSearch(searchText); return View(model); }
/// <summary> /// Rockstar View /// </summary> /// <returns></returns> public ActionResult Rockstar() { ProfileService svc = new ProfileService(); List<RockstarProfile> model = svc.ReadAllProfiles(); return View(model); }
public ActionResult EditProfileEntry(RockstarProfile model, HttpPostedFileBase file, HttpPostedFileBase popupFile) { ProfileService svc = new ProfileService(); svc.EditProfileRecord(model, file, popupFile); return Redirect("/Account/ProfileTool?GUID=" + AdminToolsGUID); }
/// <summary> /// Delete profile entry view /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult DeleteProfileEntry(int id) { ProfileService svc = new ProfileService(); svc.DeleteBlogRecord(id); return Redirect("/Account/ProfileTool?GUID=" + AdminToolsGUID); }
/// <summary> /// Edit profile entry view /// </summary> /// <param name="GUID"></param> /// <param name="Id"></param> /// <returns></returns> public ActionResult EditProfileEntry(string GUID, int Id) { if (!(String.IsNullOrEmpty(GUID)) && GUID.Equals(AdminToolsGUID)) { ProfileService svc = new ProfileService(); if (Id == 0) { return View(); } else { RockstarProfile model = svc.ReadProfileByID(Id); return View(model); } } else { return Redirect("/Home/Index"); } }
/// <summary> /// Profile tool view /// </summary> /// <param name="GUID"></param> /// <returns></returns> public ActionResult ProfileTool(string GUID) { if (!(String.IsNullOrEmpty(GUID)) && GUID.Equals(AdminToolsGUID)) { ProfileService svc = new ProfileService(); List<RockstarProfile> model = svc.ReadAllProfiles(); return View(model); } else { return Redirect("/Home/Index"); } }