/// <summary> /// Вывод статистики выбранного производителя /// </summary> /// <param name="Id">идентификатор AccountCompany</param> /// <returns></returns> public ActionResult GetProducerInformation(int Id) { var producerId = DB.AccountCompany.Single(x => x.Id == Id).ProducerId; var firstUserId = DB.Account.First(x => x.AccountCompany.Id == Id).Id; var h = new NamesHelper(firstUserId); ViewBag.ListProducer = h.RegisterListProducer(); ViewBag.DrugList = h.GetCatalogListPromotion(); ViewBag.ReportList = DbSession.Query <Job>().Fetch(x => x.Owner).Where(x => x.Producer.Id == producerId) .OrderByDescending(x => x.CreationDate).ToList(); var model = DB.AccountCompany.Find(Id); return(PartialView("partial/producerinformation", model)); }