public IActionResult GetSectorExperienceYearGender() { GetSectorExperienceYearGenderDto data = new GetSectorExperienceYearGenderDto(); var sector = _sectorService.GetList(); if (!sector.Success) { return(Ok(new ErrorDataResult <GetSectorExperienceYearGenderDto>())); } var experience = _experienceService.GetList(); if (!experience.Success) { return(Ok(new ErrorDataResult <GetSectorExperienceYearGenderDto>())); } var gender = _genderService.GetList(); if (!gender.Success) { return(Ok(new ErrorDataResult <GetSectorExperienceYearGenderDto>())); } try { data.Sectors = _mapper.Map <List <SectorDto> >(sector.Data); data.Experiences = _mapper.Map <List <ExperienceDto> >(experience.Data); data.Genders = _mapper.Map <List <GenderDto> >(gender.Data); } catch (System.Exception) { //todo:log ex return(Ok(new ErrorDataResult <GetSectorExperienceYearGenderDto>())); } return(Ok(new SuccessDataResult <GetSectorExperienceYearGenderDto>(data))); }
public ActionResult Register() { var model = new AccountViewModel { Genders = _genderService.GetList(), Cities = _cityService.GetList() }; return(View(model)); }
public ActionResult MyAccount() { var personId = HttpContext.Session.GetInt32("personId"); var locker = Security.Security.CreatLocker(); var model = new UserUpdateListViewModel { Person = _personService.GetById((int)personId), //personId !! User = _userService.GetById((int)personId), //personId !! Genders = _genderService.GetList(), Cities = _cityService.GetList() }; string decryptKey = locker.Decrypt(model.Person.Password); model.Person.Password = decryptKey; return(View(model)); }
public IHttpActionResult GetList(string ids) { return(Ok(_service.GetList(ids))); }