Пример #1
0
        public ActionResult AddIssueComment(int id)
        {
            Comment viewModel = new Comment();

            try
            {
                viewModel.Issue_Id = id;
            }
            catch (Exception ex)
            {
                return Error(ex);
            }

            return View(viewModel);
        }
Пример #2
0
        public ActionResult AddIssueComment(Comment comment)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    comment.AddedBy = GetLoggedUser();

                    repo.AddComment(comment);

                    return RedirectToAction("Details", new { id = comment.Issue_Id });
                }
            }
            catch (Exception ex)
            {
                return Error(ex);
            }

            return View();
        }