public ResponseBo <PersonProductGeneralBo> GetGeneral(PersonProductGeneralGetCriteriaBo criteriaBo)
        {
            ResponseBo <PersonProductGeneralBo> responseBo = new ResponseBo <PersonProductGeneralBo>();

            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("@PersonProductId", criteriaBo.PersonProductId, DbType.Int64, ParameterDirection.Input);

                    p.Add("@MyPersonId", criteriaBo.Session.MyPerson.Id, 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 <PersonProductGeneralBo>("spPersonProductGeneralGet", p, commandType: CommandType.StoredProcedure).FirstOrDefault();
                    responseBo.Message   = p.Get <string>("@Message");
                    responseBo.IsSuccess = p.Get <bool>("@IsSuccess");
                }
            }
            catch (Exception ex)
            {
                responseBo = base.SaveExLog(ex, this.GetType(), MethodBase.GetCurrentMethod().Name, null).ToResponse <PersonProductGeneralBo>();
            }

            return(responseBo);
        }
        public ResponseDto <PersonProductGeneralDto> GetGeneral(PersonProductGeneralGetCriteriaDto criteriaDto)
        {
            PersonProductGeneralGetCriteriaBo criteriaBo = new PersonProductGeneralGetCriteriaBo()
            {
                PersonProductId = criteriaDto.PersonProductId,

                Session = Session
            };

            ResponseBo <PersonProductGeneralBo> responseBo = personProductBusiness.GetGeneral(criteriaBo);

            ResponseDto <PersonProductGeneralDto> responseDto = responseBo.ToResponseDto <PersonProductGeneralDto, PersonProductGeneralBo>();

            if (responseBo.IsSuccess && responseBo.Bo != null)
            {
                responseDto.Dto = new PersonProductGeneralDto()
                {
                    DefaultCurrencyId = responseBo.Bo.DefaultCurrencyId,

                    PurchaseVatRate = responseBo.Bo.PurchaseVatRate,
                    SaleVatRate     = responseBo.Bo.SaleVatRate,

                    PurhasePrice    = responseBo.Bo.PurhasePrice,
                    SalePrice       = responseBo.Bo.SalePrice,
                    OnlineSalePrice = responseBo.Bo.OnlineSalePrice,

                    IsTemporarilyUnavaible = responseBo.Bo.IsTemporarilyUnavaible,
                    IsSaleForOnline        = responseBo.Bo.IsSaleForOnline,
                    Notes = responseBo.Bo.Notes
                };
            }

            return(responseDto);
        }