// GET: Surveys/Details/5 public IActionResult Details(int id) { var userId = User.Identity.Name; var survey = surveyService.GetById(id); survey.SurveyTemplate = surveyTemplateService.GetById(survey.SurveyTemplateId); survey.SurveyTemplate.SectionGroup = survey.SurveyTemplate.SectionGroup.OrderBy(m => m.SortOrder).ToArray(); survey.Customer = customerService.GetById(survey.CustomerId); if (survey == null) { return(HttpNotFound()); } return(View(survey)); }
// GET: SurveyTemplates/Details/5 public IActionResult Details(int id) { var surveyTemplate = surveyTemplateService.GetById(id); return(View(surveyTemplate)); }