Exemplo n.º 1
0
        public void Edit(FeedbackViewModel feedback)
        {
            var feedbackModel = feedbackService.GetFeedback(feedback.FeedbackId);

            feedbackModel.Text = feedback.Text;
            feedbackService.EditFeedback(feedbackModel);
        }
Exemplo n.º 2
0
 public IActionResult EditFeedback(FeedbackViewModel feedbackViewModel)
 {
     try
     {
         _feedbackService.EditFeedback(feedbackViewModel);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View("ExceptionView"));
     }
 }
        public IActionResult Edit(FeedbackViewModel feedbackViewModel)
        {
            try
            {
                _feedbackService.EditFeedback(feedbackViewModel);
                return(RedirectToAction("Index"));
            }

            catch (ResourceNotFoundException e)
            {
                return(View("ResourceNotFound"));
            }
            catch (Exception e)
            {
                ViewBag.Message = e.Message;
                return(View("ExceptionPage"));
            }
        }