Example #1
0
        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 }));
        }
Example #2
0
        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));
        }
Example #3
0
        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));
        }