public ActionResult AddSupport(UserSupportModel model) { try { if (!ModelState.IsValid) { return(View(model)); } RepoSupport repoSupport = new RepoSupport(); var result = repoSupport.AddSupportQuery(model); if (result) { TempData["success"] = "Query save successfully"; return(RedirectToAction("AddSupport", "Home")); } else { TempData["error"] = "Query failled to saved!"; return(View(model)); } } catch (Exception ee) { TempData["error"] = ee.Message; return(RedirectToAction("AddSupport", "Home")); } }
public ActionResult GetPublicSupportPartialView() { RepoSupport repoSupport = new RepoSupport(); return(View(repoSupport.GetSupportsList())); }