AJH.CMS.Core.Data.ProductPriceDataMapper.FillFromReader C# (CSharp) Method

FillFromReader() static private method

static private FillFromReader ( ProductPrice ProductPrice, SqlDataReader reader ) : void
ProductPrice ProductPrice
reader SqlDataReader
return void
        internal static void FillFromReader(ProductPrice ProductPrice, SqlDataReader reader)
        {
            int colIndex = 0;
            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_ID);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.ID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_CURRENCY_ID);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.CurrencyID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_COUNTRY_ID);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.CountryID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_FROM_DAY);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.FromDay = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_FROM_SEC);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.FromSecond = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_TO_DAY);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.ToDay = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_TO_SEC);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.ToSecond = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_START_AT);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.StartAt = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_VALUE);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.Value = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_DISCOUNT_VALUE);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.DiscountValue = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_DISCOUNT_TYPE);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.DiscountType = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_PRODUCT_ID);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.DiscountType = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_IS_DELETED);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.DiscountType = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_PRODUCT_PRICE_IS_DELETED);
            if (!reader.IsDBNull(colIndex))
                ProductPrice.IsDeleted = reader.GetBoolean(colIndex);

        }