private async Task FillLists() { var country = await _countryCrudService.GetListAllAsync("Id", false, new string[] { }); var degreeLevel = await _degreeLevelCrudService.GetListAllAsync("Id", false, new string[] { }); var subjectMajor = await _subjectMajorCrudService.GetListAllAsync("Id", false, new string[] { }); var maritalState = await _maritalStateCrudService.GetListAllAsync("Id", false, new string[] { }); var whichAreaApply = await _whichAreaApplyCrudService.GetListAllAsync("Id", false, new string[] { }); var seniority = await _seniorityCrudService.GetListAllAsync("Id", false, new string[] { }); ViewBag.Country = new SelectList(country.Data, "Id", "Name", 220); ViewBag.DegreeLevel = new SelectList(degreeLevel.Data, "Id", "Name"); ViewBag.SubjectMajor = new SelectList(subjectMajor.Data, "Id", "Name"); ViewBag.WhichAreaApply = new SelectList(whichAreaApply.Data, "Id", "Name"); ViewBag.MaritalState = new SelectList(maritalState.Data, "Id", "Name"); ViewBag.Seniority = new SelectList(seniority.Data, "Id", "Name"); var fromDate = new List <FromDateViewModel>(); for (int i = DateTime.Now.Year - 40; i <= DateTime.Now.Year; i++) { fromDate.Insert(0, new FromDateViewModel() { Year = i }); } ViewBag.DateFrom = new SelectList(fromDate, "Year", "Year"); }
private async Task FillLists(JobApplication job) { var country = await _countryCrudService.GetListAllAsync("Id", false, new string[] { }); var degreeLevel = await _degreeLevelCrudService.GetListAllAsync("Id", false, new string[] { }); var subjectMajor = await _subjectMajorCrudService.GetListAllAsync("Id", false, new string[] { }); var maritalState = await _maritalStateCrudService.GetListAllAsync("Id", false, new string[] { }); var whichAreaApply = await _whichAreaApplyCrudService.GetListAllAsync("Id", false, new string[] { }); var seniority = await _seniorityCrudService.GetListAllAsync("Id", false, new string[] { }); ViewBag.Country = new SelectList(country.Data, "Id", "Name", job.CurrentLocationCountry); ViewBag.DegreeLevel = new SelectList(degreeLevel.Data, "Id", "Name"); ViewBag.SubjectMajor = new SelectList(subjectMajor.Data, "Id", "Name"); ViewBag.WhichAreaApply = new SelectList(whichAreaApply.Data, "Id", "Name", job.WhichAreaApply); ViewBag.MaritalState = new SelectList(maritalState.Data, "Id", "Name", job.MaritalState); ViewBag.Seniority = new SelectList(seniority.Data, "Id", "Name"); }
public async Task <IActionResult> Index() { var result = await _homeSlideCrudService.GetListAllAsync("Sort", false, new string[] { }); return(View(result)); }