Beispiel #1
0
 public ActionResult AddComment(CommentViewModel commentViewModel)
 {
     if (ModelState.IsValid)
     {
         var savedSuccessfully = repo.AddComment(commentViewModel);
         if (savedSuccessfully)
         {
             return(RedirectToAction("Ticket", new { spacename = commentViewModel.Spacename, id = commentViewModel.TicketId }));
         }
         else
         {
             return(RedirectToAction("Error"));
         }
     }
     return(View(commentViewModel));
 }