// TODO #4 - populate the other List<SelectListItem> // collections needed in the view public NewJobViewModel() { jobData jobData = jobData.GetInstance(); foreach (Employer field in jobData.Employers.ToList()) { Employers.Add(new SelectListItem { Value = field.ID.ToString(), Text = field.Value }); } foreach (Location field in jobData.Locations.ToList()) { Locations.Add(new SelectListItem { Value = field.ID.ToString(), Text = field.Value }); } foreach (CoreCompetency field in jobData.CoreCompetencies.ToList()) { CoreCompetencies.Add(new SelectListItem { Value = field.ID.ToString(), Text = field.Value }); } foreach (PositionType field in jobData.PositionTypes.ToList()) { PositionTypes.Add(new SelectListItem { Value = field.ID.ToString(), Text = field.Value }); } }
static ListController() { jobData = jobData.GetInstance(); }
static JobController() { jobData = jobData.GetInstance(); }
static SearchController() { jobData = jobData.GetInstance(); }