Esempio n. 1
0
        private void UpdateXsltMetadata()
        {
            DataTable MapTable     = null;
            string    MetadataText = string.Empty;

            // Get Area_Map Metadata Table
            MapTable = this.DBConnection.ExecuteDataTable(this.DBQueries.Xslt.GetXSLT(FilterFieldType.Search, XSLT.XSLTText + " IS NOT NULL OR " + XSLT.XSLTText + " <> '' "));

            foreach (DataRow Row in MapTable.Rows)
            {
                MetadataText = Convert.ToString(Row[XSLT.XSLTText]);
                if (!string.IsNullOrEmpty(MetadataText))
                {
                    MetadataText = MetadataConverter.ConvertXml(MetadataText);

                    // Update IndicatorClassificationInfo(Metadata)
                    this.DBConnection.ExecuteNonQuery(DevInfo.Lib.DI_LibDAL.Queries.Xslt.Update.UpdateXSLT(this.DBQueries.DataPrefix, DICommon.RemoveQuotes(MetadataText), Convert.ToString(Row[XSLT.XSLTFile])));
                }
            }
        }
Esempio n. 2
0
        private void ConvertICMetadata()
        {
            DataTable ICTable = null;
            string    ICInfo  = string.Empty;

            // Get Indicator Metadata Table
            ICTable = this.DBConnection.ExecuteDataTable(this.DBQueries.IndicatorClassification.GetICForSearch(FilterFieldType.Search, IndicatorClassifications.ICInfo + " IS NOT NULL AND " + IndicatorClassifications.ICInfo + " <> '' ", FieldSelection.Heavy));

            // Update each Indicator Row where Metadata exists
            foreach (DataRow Row in ICTable.Rows)
            {
                ICInfo = Convert.ToString(Row[IndicatorClassifications.ICInfo]);
                if (!string.IsNullOrEmpty(ICInfo))
                {
                    ICInfo = MetadataConverter.ConvertXml(ICInfo);

                    // Update IndicatorClassificationInfo(Source Metadata)
                    this.DBConnection.ExecuteNonQuery(DALQueries.IndicatorClassification.Update.UpdateICInfo(this.DBQueries.DataPrefix, this.DBQueries.LanguageCode, DICommon.RemoveQuotes(ICInfo), ICType.Source, Convert.ToInt32(Row[IndicatorClassifications.ICNId])));
                }
            }
        }