Beispiel #1
0
 public void AppendMetaDataBlock(MetaDataBlock paMetaDataBlock)
 {
     if (paMetaDataBlock != null)
     {
         clMetaDataBlockCollection.Add(paMetaDataBlock);
     }
 }
Beispiel #2
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);
        }
Beispiel #3
0
 public void InsertMetaDataBlock(int paIndex, MetaDataBlock paMetaDataBlock)
 {
     if (paMetaDataBlock != null)
     {
         clMetaDataBlockCollection.Insert(paIndex, paMetaDataBlock);
     }
 }
Beispiel #4
0
 public void AppendMetaDataBlock(MetaDataBlock paMetaDataBlock)
 {
     if (paMetaDataBlock != null)
     {
         for (int lcCount = 0; lcCount < paMetaDataBlock.MetaDataElementCount; lcCount++)
         {
             AddMetaDataElement(paMetaDataBlock[lcCount]);
         }
     }
 }
Beispiel #5
0
 public void ReplaceMetaDataBlock(MetaDataBlock paMetaDataBlock)
 {
     if (paMetaDataBlock != null)
     {
         if (!String.IsNullOrWhiteSpace(paMetaDataBlock.MetaDataBlockName))
         {
             RemoveMetaDataBlock(paMetaDataBlock.MetaDataBlockName);
         }
         clMetaDataBlockCollection.Add(paMetaDataBlock);
     }
 }
Beispiel #6
0
 public bool AppendMetaDataBlock(MetaDataBlock paMetaDataBlock)
 {
     if (paMetaDataBlock != null)
     {
         clMetaDataBlock.AppendMetaDataBlock(paMetaDataBlock);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #7
0
        private FormInfoManager(FormInfoRow paFormInfoRow, String paEncodedFormName, Dictionary <String, String> paFormParam)
        {
            clFormInfoRow = paFormInfoRow;
            ParseDataGroup();
            clEncodedFormName = paEncodedFormName;
            clConnectionMode  = General.ParseEnum <QueryClass.ConnectionMode>(clFormInfoRow.ConnectionMode, QueryClass.ConnectionMode.None);

            clFieldInfoManager = new FieldInfoManager(this);

            clFormParam = paFormParam;
            clFormParam.MergeDictionary(paFormInfoRow.DefaultParameters.Split(new[] { ctSecondLevelDelimiter }, StringSplitOptions.RemoveEmptyEntries)
                                        .Select(part => part.Split(new[] { ctFirstLevelDelimiter }, StringSplitOptions.None))
                                        .ToDictionary(split => split[0], split => split[1]));


            TranslateDictionary(clFormParam);
            clToolBarConfig = new MetaDataBlockCollection(ActiveRow.ToolBarConfig)[0];
        }
Beispiel #8
0
        public void Push(String paFullyQualifiedElementName, String paValue)
        {
            int           lcBlockSeparatorIndex;
            String        lcBlockName;
            MetaDataBlock lcMetaDataBlock;

            lcBlockSeparatorIndex = paFullyQualifiedElementName.Contains(ctSeparator) ? paFullyQualifiedElementName.IndexOf(ctSeparator) : paFullyQualifiedElementName.Length;

            lcBlockName = paFullyQualifiedElementName.Substring(0, lcBlockSeparatorIndex);
            paFullyQualifiedElementName = paFullyQualifiedElementName.Substring(lcBlockSeparatorIndex + 1);

            if ((lcMetaDataBlock = GetMetaDataBlock(lcBlockName)) == null)
            {
                lcMetaDataBlock = new MetaDataBlock(lcBlockName.ToUpper());
                AppendMetaDataBlock(lcMetaDataBlock);
            }

            lcMetaDataBlock.Push(paFullyQualifiedElementName, paValue);
        }
Beispiel #9
0
        public WebStateBlock()
        {
            String lcWebStateBlock;
            MetaDataBlockCollection lcMetaBlockCollection;

            if (!String.IsNullOrEmpty(lcWebStateBlock = ApplicationFrame.GetParameter(ctWebStateParam)))
            {
                lcWebStateBlock = General.Base64Decode(lcWebStateBlock, true);
                if ((lcMetaBlockCollection = new MetaDataBlockCollection(lcWebStateBlock)) != null)
                {
                    clMetaDataBlock = lcMetaBlockCollection[0];
                }
                else
                {
                    clMetaDataBlock = new MetaDataBlock();
                }
            }
            else
            {
                clMetaDataBlock = new MetaDataBlock();
            }
        }
Beispiel #10
0
 public GlobalMetaBlock()
 {
     clMetaDataBlock = new MetaDataBlock();
 }
Beispiel #11
0
 public MetaDataRow(DataRow paDataRow, Dictionary <String, String> paFormatStringList = null)
 {
     clDataRow          = paDataRow;
     clFormatStringList = paFormatStringList == null ? new Dictionary <String, String>() : paFormatStringList;
     clMetaDataBlock    = CompileReadMetadataBlockCollection(paDataRow);
 }