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

FillFromReader() static private method

static private FillFromReader ( XSLTemplate xslTemplate, System.Data.SqlClient.SqlDataReader reader ) : void
xslTemplate AJH.CMS.Core.Entities.XSLTemplate
reader System.Data.SqlClient.SqlDataReader
return void
        internal static void FillFromReader(XSLTemplate xslTemplate, SqlDataReader reader)
        {
            int colIndex = 0;

            int days = 0, seconds = 0;
            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_CREATION_DAY);
            if (!reader.IsDBNull(colIndex))
                days = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_CREATION_SEC);
            if (!reader.IsDBNull(colIndex))
                seconds = reader.GetInt32(colIndex);

            xslTemplate.CreationDate = CMSCoreHelper.GetDateTime(days, seconds);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_DESCRIPTION);
            if (!reader.IsDBNull(colIndex))
                xslTemplate.Description = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_DETAILS);
            if (!reader.IsDBNull(colIndex))
                xslTemplate.Details = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_ID);
            if (!reader.IsDBNull(colIndex))
                xslTemplate.ID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_IS_DELETED);
            if (!reader.IsDBNull(colIndex))
                xslTemplate.IsDeleted = reader.GetBoolean(colIndex);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_LANGUAGE_ID);
            if (!reader.IsDBNull(colIndex))
                xslTemplate.LanguageID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_MODULE_ID);
            if (!reader.IsDBNull(colIndex))
                xslTemplate.ModuleID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_NAME);
            if (!reader.IsDBNull(colIndex))
                xslTemplate.Name = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_PORTAL_ID);
            if (!reader.IsDBNull(colIndex))
                xslTemplate.PortalID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_XSLTEMPLATE_CREATED_BY);
            if (!reader.IsDBNull(colIndex))
                xslTemplate.CreatedBy = reader.GetInt32(colIndex);
        }