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

FillFromReader() static private method

static private FillFromReader ( Catalog catalog, System.Data.SqlClient.SqlDataReader reader ) : void
catalog AJH.CMS.Core.Entities.Catalog
reader System.Data.SqlClient.SqlDataReader
return void
        internal static void FillFromReader(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(CN_CATALOG_IS_DISPLAYED);
            if (!reader.IsDBNull(colIndex))
                catalog.IsDisplayed = reader.GetBoolean(colIndex);

            colIndex = reader.GetOrdinal(CN_CATALOG_IS_GALLERY_ONLY);
            if (!reader.IsDBNull(colIndex))
                catalog.IsGalleryOnly = reader.GetBoolean(colIndex);

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

            colIndex = reader.GetOrdinal(CN_CATALOG_PORTAL_ID);
            if (!reader.IsDBNull(colIndex))
                catalog.PortalID = reader.GetInt32(colIndex);

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

            colIndex = reader.GetOrdinal(ECommerceDataMapperBase.CN_ECO_LAN_LAN_ID);
            if (!reader.IsDBNull(colIndex))
                catalog.LanguageID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(ECommerceDataMapperBase.CN_ECO_LAN_DESC);
            if (!reader.IsDBNull(colIndex))
                catalog.Description = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(ECommerceDataMapperBase.CN_ECO_LAN_NAME2);
            if (!reader.IsDBNull(colIndex))
                catalog.MetaTitle = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(ECommerceDataMapperBase.CN_ECO_LAN_DESC2);
            if (!reader.IsDBNull(colIndex))
                catalog.MetaDescription = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(ECommerceDataMapperBase.CN_ECO_LAN_KEYWORD);
            if (!reader.IsDBNull(colIndex))
                catalog.MetaKeywords = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(CN_CATALOG_IS_DELETED);
            if (!reader.IsDBNull(colIndex))
                catalog.IsDeleted = reader.GetBoolean(colIndex);

            colIndex = reader.GetOrdinal(CN_CATALOG_ORDER);
            if (!reader.IsDBNull(colIndex))
                catalog.Order = reader.GetInt32(colIndex);

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

        }