예제 #1
0
        public ActionResult DeleteUserRecruitmentAgent(SelectDeleteRecruitmentAgentViewModel recruitmentAgentViewModel)
        {
            ViewBag.RecruitmentAgentIdList = GetRecrutimentAgentIds();
            ViewBag.JobsIdList             = GetJobIds();
            ViewBag.AddressIdList          = GetAddressIds();
            if (ModelState.IsValid)
            {
                var mapper = AutoMapperConfig.Configure();

                var recruitmentAgency = mapper.Map <SelectDeleteRecruitmentAgentViewModel, RecruitmentAgency>(recruitmentAgentViewModel);
                _repositoryEndPointService.DeletetRecruitmentAgency(recruitmentAgency);
                return(View("Success"));
            }
            return(View("SelectDeleteUserRecruitmentAgent", recruitmentAgentViewModel));
        }
예제 #2
0
 public ActionResult SelectUserRecruitmentAgent(SelectDeleteRecruitmentAgentViewModel recruitmentAgentViewModel)
 {
     ViewBag.RecruitmentAgentIdList = GetRecrutimentAgentIds();
     ViewBag.JobsIdList             = GetJobIds();
     ViewBag.AddressIdList          = GetAddressIds();
     if (ModelState.IsValid)
     {
         var mapper = AutoMapperConfig.Configure();
         ModelState.Clear();
         RecruitmentAgency recruitmentAgencies = _repositoryEndPointService.GetRecruitmentAgencyById(recruitmentAgentViewModel.RecruitmentAgencyId);
         recruitmentAgentViewModel = mapper.Map <RecruitmentAgency, SelectDeleteRecruitmentAgentViewModel>(recruitmentAgencies);
         return(View("SelectDeleteUserRecruitmentAgent ", recruitmentAgentViewModel));
     }
     return(View("SelectDeleteUserRecruitmentAgent ", recruitmentAgentViewModel));
 }