コード例 #1
0
 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();
 }
コード例 #2
0
 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();
 }