public ActionResult SubmitQuestionReview(SubmitQuestionReviewViewModel review) { if (review != null) { UpdateQuestionStatus(review); if (review.NextQuestionId != 0) { return(RedirectToAction("ReviewQuestion", new { questionId = review.NextQuestionId, technologyId = review.TechnologyId, questionStatusType = review.QuestionStatusType })); } } return(null); }
private void UpdateQuestionStatus(SubmitQuestionReviewViewModel review) { var userEmailId = User.Identity.Name; var user = _containerUserService.FindUserByEmail(userEmailId); var question = _questionService.GetSingleQuestion(review.QuestionId); if (question != null) { question.Status = review.Status; _questionService.Update(question); var questionStatusDetails = new QuestionStatusDetails(); questionStatusDetails.QuestionId = review.QuestionId; questionStatusDetails.Status = review.Status; questionStatusDetails.Comment = review.Comment; questionStatusDetails.ChangedBy = user.ID; questionStatusDetails.ChangedDate = DateTime.Now; _questionService.AddQuestionStatusDetails(questionStatusDetails); } }