/// <summary> /// Returns the metadata text from database /// </summary> /// <param name="elementNid"></param> /// <returns></returns> public override string GetMetadataTextFrmDB(int elementNid) { string RetVal = string.Empty; string ElementGID = string.Empty; DataTable Table; DI7MetaDataBuilder MDBuilder = null; try { Table = this.DBConnection.ExecuteDataTable(this.DBQueries.Area.GetAreaByLayer(elementNid.ToString())); foreach (DataRow Row in Table.Rows) { ElementGID = Convert.ToString(Row[Area.AreaID]); // get xml file from SDMX library RetVal = DevInfo.Lib.DI_LibSDMX.SDMXUtility.Get_MetadataReport(DI_LibSDMX.SDMXSchemaType.Two_One, ElementGID, DevInfo.Lib.DI_LibSDMX.MetadataTypes.Area, "MDAgency", this.DBQueries.LanguageCode.Replace("_", ""), this.DBConnection, this.DBQueries).InnerXml; MDBuilder = new DI7MetaDataBuilder(this.DBConnection, this.DBQueries); RetVal = MDBuilder.GetMetadataReportWCategoryName(RetVal, MetadataElementType.Area).InnerXml; break; } } catch (Exception) { RetVal = string.Empty; } return(RetVal); }
/// <summary> /// Returns the metadata text from database /// </summary> /// <param name="elementNid"></param> /// <returns></returns> public override string GetMetadataTextFrmDB(int elementNid) { string RetVal = string.Empty; string ElementGID = string.Empty; IndicatorBuilder Indicators; DI7MetaDataBuilder MDBuilder = null; try { Indicators = new IndicatorBuilder(this.DBConnection, this.DBQueries); ElementGID = Indicators.GetIndicatorInfo(FilterFieldType.NId, elementNid.ToString(), FieldSelection.Light).GID; // get xml file from SDMX library RetVal = DevInfo.Lib.DI_LibSDMX.SDMXUtility.Get_MetadataReport(DI_LibSDMX.SDMXSchemaType.Two_One, ElementGID, DevInfo.Lib.DI_LibSDMX.MetadataTypes.Indicator, "MDAgency", this.DBQueries.LanguageCode.Replace("_", ""), this.DBConnection, this.DBQueries).InnerXml; MDBuilder = new DI7MetaDataBuilder(this.DBConnection, this.DBQueries); RetVal = MDBuilder.GetMetadataReportWCategoryName(RetVal, MetadataElementType.Indicator).InnerXml; } catch (Exception) { RetVal = string.Empty; } return(RetVal); }