Ejemplo n.º 1
0
        private void UpdateMetadataInfoByCategoryType(MetadataElementType categoryType, MetadataCategoryBuilder metadataCategoryBuilder, DIQueries queries)
        {
            List <string> TargetNids;
            DataTable     SrcCategoryTable       = null;
            StringBuilder Metadata_Category_Info = new StringBuilder();

            SrcCategoryTable = this._DBConnection.ExecuteDataTable(queries.MetadataReport.GetAllMetadataReportsByCategoryType(categoryType));
            TargetNids       = DICommon.GetCommaSeperatedListOfGivenColumn(SrcCategoryTable, MetadataReport.TargetNid, false, string.Empty);

            //for every target like for indicator one there is many metadata category may be definition, Classification, Method of Computation
            foreach (string targetNid in TargetNids)
            {
                Metadata_Category_Info.Remove(0, Metadata_Category_Info.Length);

                //Step 1 Create metadata Info in xml format
                this.CreateMetadataXML(SrcCategoryTable.Select(MetadataReport.TargetNid + "='" + targetNid + "'"), ref Metadata_Category_Info, metadataCategoryBuilder, DIQueries.MetadataElementTypeText[categoryType].Trim("'".ToCharArray()));

                //Step 2 Update metadata Info in xml format
                this.UpdateMetadataInfo(queries, targetNid, categoryType, Metadata_Category_Info.ToString());
            }
        }