private CreateJobAdvertViewModel PrepareJobAdvertModel() { CreateJobAdvertViewModel createJobAdvertViewModel = new CreateJobAdvertViewModel { JobCategories = _jobCategoryService.GetAll(), JobTypes = _jobTypeService.GetAll(), ExperienceLevels = _experienceLevelService.GetAll(), Companies = _companyService.GetAll(), Recruiters = _recruiterService.Get(), Cities = _cityService.GetAll() }; return(createJobAdvertViewModel); }
public ActionResult Index(string jobCityId, string jobCategoryId) { //var temp = _jobSeekerService.GetJobSeekerBySkillAndCity(); //var companies = _companyService.GetAll(); var jobTypes = _jobTypeService.GetAll(); var jobCategories = _jobCategoryService.GetAll(); var jobCities = _cityService.GetAll(); jobCities.Insert(0, new City { Id = "All", Name = "All" }); jobCategories.Insert(0, new JobCategory { Id = "All", Name = "All" }); var jobAdverts = _jobAdvertService.GetAllByJobSeeker(jobCategoryId, jobCityId); JobSeekerSearchAdvertViewModel jobSeekerSearchAdvertViewModel = new JobSeekerSearchAdvertViewModel { ViewJobAdvertViewModel = (List <ViewJobAdvertViewModel>)jobAdverts, JobCategories = (List <JobCategory>)jobCategories, JobTypes = (List <JobType>)jobTypes, JobCities = (List <City>)jobCities }; return(View("Dashboard", jobSeekerSearchAdvertViewModel)); }
public IActionResult GetAll() { var result = _jobTypeService.GetAll(); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }