public PartialViewResult Add() { var visitTypeManager = new DataAccess.VisitTypeManager(); ViewData["VisitTypes"] = visitTypeManager.GetVisitTypes(); var officeManager = new DataAccess.OfficeMananer(); var offices = officeManager.GetOffices(IsAdmin ? 0 : UserDetail.UserId); ViewData["Offices"] = offices; var eventManager = new DataAccess.EventManager(); ViewData["Events"] = eventManager.GetActiveEvents(offices.Select(model => model.OfficeId).ToList()); var userManager = new DataAccess.FSMDetailManager(); ViewData["FSMUsers"] = userManager.FSMDetails(); var conventionManager = new DataAccess.ConventionManager(); ViewData["Convention"] = conventionManager.GetActiveConventions(); var serviceManager = new DataAccess.ServiceManager(); ViewData["Services"] = serviceManager.GetServices(); return PartialView(); }
public ActionResult Index() { BundleConfig.AddScript("~/Scripts/Audiences", "audiences.js", ControllerName); var officeManager = new DataAccess.OfficeMananer(); var offices = officeManager.GetOffices(IsAdmin ? 0 : UserDetail.UserId); ViewData["Offices"] = offices; var eventManager = new DataAccess.EventManager(); ViewData["Events"] = eventManager.GetActiveEvents(offices.Select(model => model.OfficeId).ToList()); var userManager = new DataAccess.FSMDetailManager(); ViewData["FSMUsers"] = userManager.FSMDetails(); var conventionManager = new DataAccess.ConventionManager(); ViewData["Convention"] = conventionManager.GetActiveConventions(); var serviceManager = new DataAccess.ServiceManager(); ViewData["Services"] = serviceManager.GetServices(); StartupScript = "audiences.DoPageSetting();"; return View(); }