Inheritance: IEntity
        internal static void FillFromReader(Module module, SqlDataReader reader)
        {
            int colIndex = 0;

            colIndex = reader.GetOrdinal(CN_MODULE_CREATED_BY);
            if (!reader.IsDBNull(colIndex))
                module.CreatedBy = reader.GetInt32(colIndex);

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

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

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

            colIndex = reader.GetOrdinal(CN_MODULE_DESCRIPTION);
            if (!reader.IsDBNull(colIndex))
                module.Description = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(CN_MODULE_ID);
            if (!reader.IsDBNull(colIndex))
                module.ID = reader.GetInt32(colIndex);

            colIndex = reader.GetOrdinal(CN_MODULE_IMAGE);
            if (!reader.IsDBNull(colIndex))
                module.Image = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(CN_MODULE_IS_DELETED);
            if (!reader.IsDBNull(colIndex))
                module.IsDeleted = reader.GetBoolean(colIndex);

            colIndex = reader.GetOrdinal(CN_MODULE_NAME);
            if (!reader.IsDBNull(colIndex))
                module.Name = reader.GetString(colIndex);

            colIndex = reader.GetOrdinal(CN_MODULE_PARENT_ID);
            if (!reader.IsDBNull(colIndex))
                module.ParentID = reader.GetInt32(colIndex);
        }
        internal static Module GetModule(List<Module> modules, SqlDataReader reader)
        {
            int colIndex = 0;
            colIndex = reader.GetOrdinal(CN_MODULE_ID);
            int value = reader.GetInt32(colIndex);

            Module module = modules.Where(c => c.ID == value).FirstOrDefault();
            if (module == null)
            {
                module = new Module();
                modules.Add(module);
            }
            return module;
        }