示例#1
0
        public void PopulateSbUs()
        {
            var hierarchyController = new HierarchyController();
            var strategicBusinessUnitViewModels = hierarchyController.GetAllStrategicBusinessUnits();

            ViewData["strategicBusinessUnits"] = strategicBusinessUnitViewModels;
        }
示例#2
0
        public void PopulateDepots()
        {
            var hierarchyController = new HierarchyController();
            IEnumerable<DepotViewModel> depotViewModels = hierarchyController.GetAllDepots();

            ViewData["depotViewModels"] = depotViewModels;
        }
示例#3
0
        public void PopulateObUs()
        {
            var hierarchyController = new HierarchyController();
            IEnumerable<OperationalBusinessUnitViewModel> operataionalBusinessUnitViewModels = hierarchyController.GetAllOperationalBusinessUnits();

            ViewData["operationalBusinessUnits"] = operataionalBusinessUnitViewModels;
        }
示例#4
0
        public void PopulateBUs()
        {
            var hierarchyController = new HierarchyController();
            IEnumerable<BusinessUnitViewModel> businessUnitViewModels = hierarchyController.GetAllBusinessUnits();

            ViewData["businessUnits"] = businessUnitViewModels;
        }
示例#5
0
        public void PopulateCompanies()
        {
            var hierarchyController = new HierarchyController();
            IEnumerable<CompanyViewModel> companyViewModels = hierarchyController.GetAllCompanies();

            ViewData["companies"] = companyViewModels;
        }
示例#6
0
        public void PopulateBranchs()
        {
            var hierarchyController = new HierarchyController();
            IEnumerable<BranchViewModel> branchViewModels = hierarchyController.GetAllBranchs();

            ViewData["branchViewModels"] = branchViewModels;
        }
示例#7
0
        public ActionResult Index()
        {
            User user = new User();

            user = (User)Session["user"];

            HoursViewModel hoursViewModel = new HoursViewModel
                {
                    UserName = user.LastName + ", " + user.FirstName
                };

            HierarchyController hierarchyController = new HierarchyController();

            LocationController locationController = new LocationController();

            IQueryable<CountryViewModel> countryViewModels = hierarchyController.GetAllCountries();
            ViewData["countries"] = countryViewModels;

            IQueryable<LocationViewModel> locationViewModels = locationController.GetAllLocations();
            ViewData["locations"] = locationViewModels;

            IQueryable<EntityViewModel> entityViewModels = hierarchyController.GetAllEntitiesWithDetails();
            ViewData["entityViewModels"] = entityViewModels;

            return View(hoursViewModel);
        }
示例#8
0
        public void PopulateLocationStatuss()
        {
            HierarchyController hierarchyController = new HierarchyController();
            IQueryable<LocationStatusViewModel> statuss = hierarchyController.GetAllLocationStatuss();

            ViewData["locationStatuss"] = statuss;
        }
示例#9
0
 public ActionResult LocationRead([DataSourceRequest] DataSourceRequest request)
 {
     HierarchyController hierarchyController = new HierarchyController();
     return Json(hierarchyController.GetAllLocations().ToDataSourceResult(request));
 }
        public ActionResult Index()
        {
            User user = new User();

            user = (User) Session["user"];

            IncidentViewModel incidentViewModel = new IncidentViewModel
                {
                    UserName = user.LastName + ", " + user.FirstName
                };

            string safetyUsers = ConfigurationManager.AppSettings.Get("SafetyUsers");

            string[] safetyUserList = safetyUsers.Split(Convert.ToChar("|"));

            foreach (string safetyUser in safetyUserList.Where(safetyUser => user.UserName == safetyUser))
            {
                incidentViewModel.AccessToSafetyIncidentApplication = true;
            }

            HierarchyController hierarchyController = new HierarchyController();
            LocationController locationController = new LocationController();

            IQueryable<CountryViewModel> countryViewModels = hierarchyController.GetAllCountries();
            ViewData["countries"] = countryViewModels;

            IQueryable<EntityViewModel> entityViewModels = hierarchyController.GetAllEntitiesWithDetails();
            ViewData["entityViewModels"] = entityViewModels;

            IQueryable<LocationViewModel> locationViewModels = locationController.GetAllLocationsWithStatus();
            ViewData["locations"] = locationViewModels;

            PopulateStatuss();
            PopulateSiteCategories();
            PopulateUnsafeActs();
            PopulateCauseCategories();
            PopulateCauses();
            PopulateTypes();
            PopulateOutcomes();
            PopulateEmployeeTypes();

            return View(incidentViewModel);
        }