Exemple #1
0
        public ResponseDto <List <AddressDistrictDto> > GetDistrictList(AddressGetDistrictListCriteriaDto criteriaDto)
        {
            AddressGetDistrictListCriteriaBo criteriaBo = new AddressGetDistrictListCriteriaBo()
            {
                CityId = criteriaDto.CityId,

                Session = Session
            };

            ResponseBo <List <AddressDistrictBo> > responseBo = addressBusiness.GetDistrictList(criteriaBo);

            ResponseDto <List <AddressDistrictDto> > responseDto = responseBo.ToResponseDto <List <AddressDistrictDto>, List <AddressDistrictBo> >();

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

            return(responseDto);
        }