public ResponseDto <PersonProductDto> Get(PersonProductGetCriteriaDto criteriaDto)
        {
            PersonProductGetCriteriaBo criteriaBo = new PersonProductGetCriteriaBo()
            {
                PersonProductId = criteriaDto.PersonProductId,

                ProductId   = criteriaDto.ProductId,
                ProductCode = criteriaDto.ProductCode,

                PersonId = criteriaDto.PersonId,

                CurrencyId = criteriaDto.CurrencyId,

                Session = Session
            };

            ResponseBo <PersonProductBo> responseBo = personProductBusiness.Get(criteriaBo);

            if (criteriaBo.ProductCode != null && criteriaBo.ProductId == null && responseBo.IsSuccess && responseBo.Bo == null)
            {
                using (ProductController productController = new ProductController(new ProductBusiness()))
                {
                    ResponseDto t_responseDto = productController.AddFromExternalSource(criteriaBo.ProductCode, Session, Session.MyPerson.Id);

                    if (t_responseDto.IsSuccess)
                    {
                        responseBo = personProductBusiness.Get(criteriaBo);
                    }
                }
            }

            ResponseDto <PersonProductDto> responseDto = responseBo.ToResponseDto <PersonProductDto, PersonProductBo>();

            if (responseBo.IsSuccess && responseBo.Bo != null)
            {
                responseDto.Dto = new PersonProductDto()
                {
                    Id = responseBo.Bo.Id,
                    PurchaseVatRate = responseBo.Bo.PurchaseVatRate,
                    SaleVatRate     = responseBo.Bo.SaleVatRate,
                    CategoryId      = responseBo.Bo.CategoryId,
                    Balance         = responseBo.Bo.Balance,

                    ProductId     = responseBo.Bo.ProductId,
                    ProductName   = responseBo.Bo.ProductName,
                    ProductTypeId = responseBo.Bo.ProductTypeId,

                    PortraitImageUniqueIdStr = responseBo.Bo.PortraitImageUniqueId == null ? null : responseBo.Bo.PortraitImageUniqueId.ToStringNull().ToUpperNull()
                                               + "." + responseBo.Bo.PortraitImageFileTypeId.ToStringNull().ToLowerNull(),

                    // itemBo.CodeList should not be null
                    // at least there must be an item that contaions product Id value.
                    CodeList = (from pc in responseBo.Bo.CodeList
                                select new ProductCodeDto
                    {
                        Code = pc.Code,
                        ProductCodeTypeId = pc.ProductCodeTypeId
                    }).ToList(),

                    // itemBo.PriceList should not be null
                    // every product must have price in every currency.
                    // if a price was not specified in given currency, bussiness will convert the price to given currency.
                    Price = new ProductPriceDto
                    {
                        PurhasePrice    = responseBo.Bo.Price.PurhasePrice,
                        SalePrice       = responseBo.Bo.Price.SalePrice,
                        OnlineSalePrice = responseBo.Bo.Price.OnlineSalePrice,

                        CurrencyId = responseBo.Bo.Price.CurrencyId,

                        FromPool = responseBo.Bo.Price.FromPool
                    }
                };
            }

            return(responseDto);
        }