public ActionResult Index() { var recentFeedback = _feedbackService.GetActiveItem(); //说明可以开启新的心理反馈 return(recentFeedback == null?RedirectToAction("History") : RedirectToAction("Current", new { id = recentFeedback.FeedbackId })); }
public ActionResult Feedback() { var model = new FeedbackViewModel(); var current = _feedbackService.GetActiveItem(); if (current == null) { return(View(model)); } model.Current = current; if (current.Status != EnumFbStatus.Underway) { return(View(model)); } var userDto = GetUserInCookie(); if (userDto != null) { model.Record = _fbDocumentService.GetDocumentsUnderFeedback(current.FeedbackId) .FirstOrDefault(fb => fb.UploaderId == userDto.UserId); } return(View(model)); }