public ActionResult AddKindexFeedback(KindexFeedback feedback) { if (ModelState.IsValid) { feedback.Save(); } return(RedirectToAction( nameof(KindexController.Detail), nameof(KindexController).Replace("Controller", ""), new { id = feedback.Ico, rok = feedback.Year })); }
public ActionResult AddKindexFeedback(string ico, int year) { if (string.IsNullOrWhiteSpace(ico)) { return(RedirectToAction(nameof(HomeController.Index), "Home")); } var kindexFeedback = new KindexFeedback() { Ico = ico, Year = year }; return(View(kindexFeedback)); }
public ActionResult Feedback(string id) { if (string.IsNullOrEmpty(id)) { return(NotFound()); } var feedback = KindexFeedback.GetById(id); if (feedback is null) { return(NotFound()); } return(View(feedback)); }