public ActionResult View(int id) { if (id == 0) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var dataItem = dataItemService.GetDataItem(id); if (dataItem == null) { return(HttpNotFound()); } var relatedItems = dataItemService.GetRelatedDataItems(dataItem).ToList(); ViewBag.RelatedItems = relatedItems; if (TempData["fromMenu"] != null) { ViewBag.fromMenu = TempData["fromMenu"]; TempData.Keep("fromMenu"); } return(View(dataItem)); }
public ActionResult View(int id) { if (id == 0) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var dataItem = dataItemService.GetDataItem(id); if (dataItem == null) { return(HttpNotFound()); } TempData["fromMenu"] = true; TempData.Keep("fromMenu"); return(View(dataItem)); }