public NonEmployeeViewModel(CompanyDefaultsViewModel model)
 {
     if (model != null)
     {
         CompanyId = model.CompanyId;
     }
     FormName = "addNewNonEmployeeForm";
 }
        public ActionResult Index(long companyId)
        {

            var hazards = _companyDefaultService.GetAllHazardsForCompany(companyId);
            var peopleAtRisk = _companyDefaultService.GetAllPeopleAtRiskForCompany(companyId);
            var nonEmployees = _nonEmployeeService.GetAllNonEmployeesForCompany(companyId);
            var suppliers = _suppliersService.GetForCompany(companyId);
            var sites = _siteService.Search(new SearchSitesRequest
                                                {
                                                    CompanyId = companyId,
                                                    AllowedSiteIds = CurrentUser.GetSitesFilter()
                                                }).Select(AutoCompleteViewModel.ForSite).AddDefaultOption();


            var viewModel = new CompanyDefaultsViewModel(new List<Defaults>(),
                                                         suppliers,
                                                         new List<Defaults>(),
                                                         nonEmployees,
                                                         hazards,
                                                         peopleAtRisk) {CompanyId = companyId};
            viewModel.Sites = sites;

            return View(viewModel);
        }