Пример #1
0
        private MetaDataBlock CompileReadMetadataBlockCollection(DataRow paDataRow)
        {
            String        lcColumnName;
            MetaDataBlock lcMetaBlock;

            lcMetaBlock = new MetaDataBlock();

            if (paDataRow != null)
            {
                for (int lcCount = 0; lcCount < paDataRow.Table.Columns.Count; lcCount++)
                {
                    lcColumnName = paDataRow.Table.Columns[lcCount].ColumnName;

                    if ((paDataRow.Table.Columns[lcCount].DataType == typeof(String)) && (MetaDataBlockCollection.IsMetaBlockString(paDataRow[lcColumnName].ToString())))
                    {
                        lcMetaBlock.AppendMetaBlock(paDataRow[lcColumnName].ToString(), lcColumnName);
                    }
                    else
                    {
                        lcMetaBlock.AddMetaDataElement(lcColumnName, GetDisplayString(paDataRow[lcColumnName], GetFormatString(lcColumnName)), false);
                    }
                }
            }

            return(lcMetaBlock);
        }
Пример #2
0
        public bool AddMetaDataElement(String paVariableName, MetaDataElement paMetaDataElement)
        {
            MetaDataElement lcMetaDataElement;


            if (paMetaDataElement != null)
            {
                lcMetaDataElement = paMetaDataElement.CopyObject();
                lcMetaDataElement.InsertNewElement(0, paMetaDataElement.Name);
                lcMetaDataElement.SetElementName(paVariableName);
                clMetaDataBlock.AddMetaDataElement(lcMetaDataElement);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #3
0
 public void StoreWebStateVariable(String paVariableName, String paValue)
 {
     clMetaDataBlock.AddMetaDataElement(paVariableName, paValue);
 }