/// <summary> /// Подробнее /// </summary> /// <param name="Id">идентификатор промоакции</param> public ActionResult View(long id) { var model = DB2.Promotions.Find(id); var h = new NamesHelper(CurrentUser.Id); ViewBag.ProducerName = h.GetProducerList().Single(x => x.Value == model.ProducerId.ToString()).Text; ViewBag.RegionList = h.GetPromotionRegionNames((ulong)model.RegionMask); ViewBag.DrugList = h.GetDrugInPromotion(model.Id); ViewBag.SupplierList = h.GetSupplierList(model.PromotionsToSupplier.ToList().Select(x => (decimal)x.SupplierId).ToList()); ViewBag.History = DB2.PromotionHistory.Where(x => x.Promotion.Id == model.Id).ToList(); return(View(model)); }