public ResponseDto <List <ProductCodeListDto> > GetList(ProductCodeGetListCriteriaDto criteriaDto)
        {
            ProductCodeGetListCriteriaBo criteriaBo = new ProductCodeGetListCriteriaBo()
            {
                ProductId = criteriaDto.ProductId,

                Session = Session
            };

            ResponseBo <List <ProductCodeListBo> > responseBo = productCodeBusiness.GetList(criteriaBo);

            ResponseDto <List <ProductCodeListDto> > responseDto = responseBo.ToResponseDto <List <ProductCodeListDto>, List <ProductCodeListBo> >();

            if (responseBo.IsSuccess && responseBo.Bo != null)
            {
                responseDto.Dto = new List <ProductCodeListDto>();
                foreach (ProductCodeListBo itemBo in responseBo.Bo)
                {
                    responseDto.Dto.Add(new ProductCodeListDto()
                    {
                        Id = itemBo.Id,

                        Code = itemBo.Code,
                        ProductCodeTypeId = itemBo.ProductCodeTypeId,

                        CreateDateNumber = itemBo.CreateDate.ToNumberFromDateTime(),
                        UpdateDateNumber = itemBo.UpdateDate.ToNumberFromDateTimeNull()
                    });
                }
            }

            return(responseDto);
        }
        public ResponseBo <List <ProductCodeListBo> > GetList(ProductCodeGetListCriteriaBo criteriaBo)
        {
            ResponseBo <List <ProductCodeListBo> > responseBo = new ResponseBo <List <ProductCodeListBo> >();

            try
            {
                using (SqlConnection conn = DbAccess.Connection.GetConn())
                {
                    var p = new DynamicParameters();
                    p.Add("@Message", dbType: DbType.String, direction: ParameterDirection.Output, size: 255);
                    p.Add("@IsSuccess", dbType: DbType.Boolean, direction: ParameterDirection.Output);

                    p.Add("@ProductId", criteriaBo.ProductId, DbType.Int64, ParameterDirection.Input);

                    p.Add("@OperatorRealId", criteriaBo.Session.RealPerson.Id, DbType.Int64, ParameterDirection.Input);
                    p.Add("@LanguageId", criteriaBo.Session.RealPerson.LanguageId, DbType.Int32, ParameterDirection.Input);

                    responseBo.Bo        = conn.Query <ProductCodeListBo>("spProductCodeList", p, commandType: CommandType.StoredProcedure).ToList();
                    responseBo.Message   = p.Get <string>("@Message");
                    responseBo.IsSuccess = p.Get <bool>("@IsSuccess");
                }
            }
            catch (Exception ex)
            {
                responseBo = base.SaveExLog(ex, this.GetType(), MethodBase.GetCurrentMethod().Name, criteriaBo).ToResponse <List <ProductCodeListBo> >();
            }

            return(responseBo);
        }