AJH.CMS.Core.Data.CatalogDataMapper.FillFromReaderByProduct C# (CSharp) Method

FillFromReaderByProduct() static private method

static private FillFromReaderByProduct ( Catalog catalog, System.Data.SqlClient.SqlDataReader reader ) : void
catalog AJH.CMS.Core.Entities.Catalog
reader System.Data.SqlClient.SqlDataReader
return void
        internal static void FillFromReaderByProduct(Catalog catalog, SqlDataReader reader)
        {
            int colIndex = 0;
            colIndex = reader.GetOrdinal(CN_CATALOG_ID);
            if (!reader.IsDBNull(colIndex))
                catalog.ID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(ECommerceDataMapperBase.CN_ECO_LAN_NAME);
            if (!reader.IsDBNull(colIndex))
                catalog.Name = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(CN_CATALOG_PARENT_CATALOG_ID);
            if (!reader.IsDBNull(colIndex))
                catalog.ParentCalalogID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_CATALOG_IS_PUBLISHED);
            if (!reader.IsDBNull(colIndex))
                catalog.IsPublished = reader.GetBoolean(colIndex);
        }