Beispiel #1
0
        public ResponseDto <List <AddressLocalityDto> > GetLocalityList(AddressGetLocalityListCriteriaDto criteriaDto)
        {
            AddressGetLocalityListCriteriaBo criteriaBo = new AddressGetLocalityListCriteriaBo()
            {
                DistrictId = criteriaDto.DistrictId,

                Session = Session
            };

            ResponseBo <List <AddressLocalityBo> > responseBo = addressBusiness.GetLocalityList(criteriaBo);

            ResponseDto <List <AddressLocalityDto> > responseDto = responseBo.ToResponseDto <List <AddressLocalityDto>, List <AddressLocalityBo> >();

            if (responseBo.IsSuccess && responseBo.Bo != null)
            {
                responseDto.Dto = new List <AddressLocalityDto>();
                foreach (AddressLocalityBo itemBo in responseBo.Bo)
                {
                    responseDto.Dto.Add(new AddressLocalityDto()
                    {
                        Id         = itemBo.Id,
                        DistrictId = itemBo.DistrictId,
                        Name       = itemBo.Name
                    });
                }
            }

            return(responseDto);
        }