public IActionResult Index(int?page, string SearchString, int?ForeignAgencyJobId, int?Id) { ForeignAgencyJobViewModel select = new ForeignAgencyJobViewModel { ForeignAgencyId = ForeignAgencyJobId, }; if (Id != null) { var agencyjob = _agency_job.GetForeignAgencyJobById((int)Id); var agencyjobViewModels = _mapper.Map <ForeignAgencyJobViewModel>(agencyjob); select.Price = agencyjobViewModels.Price; select.NationalityId = agencyjobViewModels.NationalityId; select.JobTypeId = agencyjobViewModels.JobTypeId; select.CurrencyId = agencyjobViewModels.CurrencyId; } var agencyList = _agency_job.GetForeignAgencyJobs().Where(x => x.ForeignAgencyId == ForeignAgencyJobId); ViewBag.Agency = agencyList; ViewBag.NationalityId = new SelectList(_nationality.GetNationalities(), "Id", "Name", select.NationalityId); ViewBag.JobTypeId = new SelectList(_jobtype.GetJobTypes(), "Id", "Name", select.JobTypeId); ViewBag.CurrencyId = new SelectList(_currency.GetCurrencies(), "Id", "Name", select.CurrencyId); return(View(select)); }
public IActionResult Add() { ViewBag.AccountTreeId = new SelectList(_Acctree.GetAccountTrees(), "Id", "DescriptionAr"); ViewBag.NationalityId = new SelectList(_nationality.GetNationalities(), "Id", "Name"); ViewBag.DelegateTypeId = new SelectList(_delegatetype.GetDelegateTypes(), "Id", "Name"); return(View()); }
public IActionResult Index(int?page) { var nationality = _nationality.GetNationalities(); ViewBag.Nationality = nationality; //if (nationality.Count() <= 10) { page = 1; } //int pageSize = 10; return(View()); }
public IActionResult Add() { EmployeeViewModel employeeviewmodel = new EmployeeViewModel(); ViewBag.NationalityId = new SelectList(_nationality.GetNationalities(), "Id", "Name"); ViewBag.GenderId = new SelectList(_gender.GetGenders(), "Id", "Name"); ViewBag.SocialStatusId = new SelectList(_socialstatus.GetSocialStatuss(), "Id", "Name"); ViewBag.ReligionId = new SelectList(_religion.GetReligions(), "Id", "Name"); ViewBag.JobTypeId = new SelectList(_jobtype.GetJobTypes(), "Id", "Name");; //ViewBag.ForeignAgencyId = new SelectList(_foreignagency.GetAgencies(), "Id", "OfficeName"); ; var test = DateTime.UtcNow.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture); return(View(employeeviewmodel)); }
public IActionResult GetNationalities() { var nationalitiesEntities = _nationalityRepository.GetNationalities(); var result = Mapper.Map <IEnumerable <NationalityNameDto> >(nationalitiesEntities); return(Ok(result)); }
public IActionResult Add() { ViewBag.NationalityId = new SelectList(_nationality.GetNationalities(), "Id", "Name"); return(View()); }