public ActionResult Index() { var h = new NamesHelper(CurrentUser.Id); ViewBag.ListProducer = h.RegisterListProducer(); var model = DB.AccountCompany.Where(x => x.ProducerId.HasValue).ToList(); // TODO протестировать без производителя return(View(model)); }
public ActionResult Index() { var h = new NamesHelper(CurrentUser.Id); var ProducerList = new List <OptionElement> { new OptionElement { Text = "<Без производителя>", Value = "" } }; var ProducerListRegistration = h.RegisterListProducer(); ProducerList.AddRange(ProducerListRegistration); return(View(ProducerList)); }
/// <summary> /// Поиск промоакций по фильтру /// </summary> public ActionResult SearchResult(SearchProducerPromotion filter) { var h = new NamesHelper(CurrentUser.Id); var producerList = new List <OptionElement>() { new OptionElement { Text = "Все зарегистрированные", Value = "0" } }; producerList.AddRange(h.RegisterListProducer()); ViewBag.ProducerList = producerList; return(PartialView("Partial/Promotions", filter.Find(DB2))); }
public ActionResult Index() { var h = new NamesHelper(CurrentUser.Id); var producerList = new List <OptionElement>() { new OptionElement { Text = "Все зарегистрированные", Value = "0" } }; producerList.AddRange(h.RegisterListProducer()); ViewBag.ProducerList = producerList; return(View(new SearchProducerPromotion())); }
/// <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)); }