本文整理汇总了C#中DIQueries类的典型用法代码示例。如果您正苦于以下问题:C# DIQueries类的具体用法?C# DIQueries怎么用?C# DIQueries使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DIQueries类属于命名空间,在下文中一共展示了DIQueries类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MergeTextualandNumericDataValueColumn
/// <summary>
/// Rename Data_value and TextualValue column into OrgData_value and OrgTextualValue
/// and merge both column value into new column Data_Value
/// </summary>
/// <param name="dbConnection"></param>
/// <param name="dbQueries"></param>
public static void MergeTextualandNumericDataValueColumn(DIConnection dbConnection, DIQueries dbQueries)
{
try
{
if (!ISColumnExists(dbConnection, Constants.Data.Orginal_Data_valueColumn, dbQueries.TablesName.Data))
{
//1. Rename Textual_Data_Value & Data_value to orgTextual_Data_value & orgData_Value respectively
RenameOriganalDataTableColumnInDatabase(dbConnection, dbQueries, Data.TextualDataValue, Constants.Data.Orginal_Textual_Data_valueColumn, " Memo");
RenameOriganalDataTableColumnInDatabase(dbConnection, dbQueries, Data.DataValue, Constants.Data.Orginal_Data_valueColumn, " Double ");
System.Threading.Thread.Sleep(100);
//2. Create new column Data_Value of memo data type
string SqlQuery = "ALTER Table " + dbQueries.TablesName.Data + " Add Column " + Data.DataValue + " Memo NULL";
dbConnection.ExecuteNonQuery(SqlQuery);
System.Threading.Thread.Sleep(10);
//3. Merge all data values into Data_Value column
SqlQuery = "UPDATE " + dbQueries.TablesName.Data + " SET " + Data.DataValue + "=" + Constants.Data.Orginal_Data_valueColumn;
dbConnection.ExecuteNonQuery(SqlQuery);
SqlQuery = "UPDATE " + dbQueries.TablesName.Data + " SET " + Data.DataValue + "=" + Constants.Data.Orginal_Textual_Data_valueColumn + " WHERE " + Data.IsTextualData + "=" + true;
dbConnection.ExecuteNonQuery(SqlQuery);
}
}
catch (Exception ex)
{
throw ex;
}
}
示例2: SeparateTextualandNemericData
//-- Check orgTextual_Data_value exists or not. If column exists then move textual & numeric values into their respective column.
public static void SeparateTextualandNemericData(DIConnection dbConnection, DIQueries dbQueries)
{
string SqlQuery = string.Empty;
try
{
if (ISColumnExists(dbConnection, Constants.Data.Orginal_Data_valueColumn, dbQueries.TablesName.Data))
{
//--Update Textual value true if data value is not Numeric
SqlQuery = "UPDATE " + dbQueries.TablesName.Data + " SET " + Data.IsTextualData + " = 1 WHERE NOT ISNUMERIC(" + Data.DataValue + ")";
dbConnection.ExecuteNonQuery(SqlQuery);
//-- move orgData_Value values into Data_Value
SqlQuery = "UPDATE " + dbQueries.TablesName.Data + " Set " + Constants.Data.Orginal_Data_valueColumn + "=" + Data.DataValue + " WHERE " + Data.IsTextualData + " = 0";
dbConnection.ExecuteNonQuery(SqlQuery);
//--move orgTextual_Data_value into Textual_Data_value if ISTextual is true
SqlQuery = "UPDATE " + dbQueries.TablesName.Data + " Set " + Constants.Data.Orginal_Textual_Data_valueColumn + " = " + Data.DataValue + " WHERE " + Data.IsTextualData + "<>0";
dbConnection.ExecuteNonQuery(SqlQuery);
//2. Remove Data_Value column and rename orgTextual_Data_Value and orgData_Value to Textual_Data_Value and Data_value"
DIDataValueHelper.RemoveDataValueAndRenameOrgColumns(dbConnection, dbQueries);
}
}
catch (Exception ex)
{
throw ex;
}
}
示例3: ExportOnlineDatabase
internal ExportOnlineDatabase(UserSelection userSelection, DIConnection sourceDBConnection, DIQueries sourceDBQueries)
{
if (sourceDBConnection != null && userSelection != null)
{
this.UserSelection = userSelection;
//-- Assign NIDs in userSelection.
if (userSelection.ShowIUS)
{
this.IUSNIDs = userSelection.IndicatorNIds;
}
else
{
this.IndicatorNIDs = userSelection.IndicatorNIds;
}
this.AreaNIDs = userSelection.AreaNIds;
this.TimePeriodNIDs = userSelection.TimePeriodNIds;
this.SourceNIDs = userSelection.SourceNIds;
this.ApplyMRD = userSelection.DataViewFilters.MostRecentData;
this.SourceDBConnection = sourceDBConnection;
this.SourceDBQueries = sourceDBQueries; //new DIQueries(this.SourceDBConnection.DIDataSetDefault(), this.SourceDBConnection.DILanguageCodeDefault(this.SourceDBConnection.DIDataSetDefault()));
}
}
示例4: CategorySchemeUtility
internal CategorySchemeUtility(CategorySchemeTypes categorySchemeType, bool completeOrSummaryFlag, string agencyId, string language, Header header, string outputFolder, Dictionary<string, string> DictIndicator, Dictionary<string, string> DictIndicatorMapping, DIConnection DIConnection, DIQueries DIQueries)
: base(agencyId, language, header, outputFolder)
{
this._categorySchemeType = categorySchemeType;
this._completeOrSummaryFlag = completeOrSummaryFlag;
this._diConnection = DIConnection;
this._diQueries = DIQueries;
if (string.IsNullOrEmpty(language))
{
this.Language = this._diQueries.LanguageCode.Substring(1);
this._multiLanguageHandlingRequired = true;
}
else
{
if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
{
this.Language = language;
this._multiLanguageHandlingRequired = false;
}
else
{
this.Language = this._diQueries.LanguageCode.Substring(1);
this._multiLanguageHandlingRequired = false;
}
}
this._dictIndicator = DictIndicator;
this._dictIndicatorMapping = DictIndicatorMapping;
}
示例5: CodelistUtility
internal CodelistUtility(CodelistTypes codelistType, bool completeOrSummaryFlag, string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries)
: base(agencyId, language, header, outputFolder)
{
this._codelistType = codelistType;
this._completeOrSummaryFlag = completeOrSummaryFlag;
this._diConnection = DIConnection;
this._diQueries = DIQueries;
if (string.IsNullOrEmpty(language))
{
this.Language = this._diQueries.LanguageCode.Substring(1);
this._multiLanguageHandlingRequired = true;
}
else
{
if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
{
this.Language = language;
this._multiLanguageHandlingRequired = false;
}
else
{
this.Language = this._diQueries.LanguageCode.Substring(1);
this._multiLanguageHandlingRequired = false;
}
}
}
示例6: RegistryService
public RegistryService()
{
int DBNIdOut;
if (this.Context.Request.QueryString["p"] != null && !string.IsNullOrEmpty(this.Context.Request.QueryString["p"]) &&
int.TryParse(this.Context.Request.QueryString["p"], out DBNIdOut))
{
DBNId = DBNIdOut;
}
else
{
Global.GetAppSetting();
DBNId = Convert.ToInt32(Global.GetDefaultDbNId());
}
if (Global.IsDSDUploadedFromAdmin(DBNId))
{
this.DIConnection = Global.GetDbConnection(this.Get_AssociatedDB_NId(DBNId.ToString()));
}
else
{
this.DIConnection = Global.GetDbConnection(DBNId);
}
this.DIQueries = new DIQueries(this.DIConnection.DIDataSetDefault(), this.DIConnection.DILanguageCodeDefault(this.DIConnection.DIDataSetDefault()));
}
示例7: ImportQueries
internal ImportQueries(DIQueries DBQueries)
{
this.DBQueries = DBQueries;
// Set IUpdateQuery object, (By Default: Traditional)
this.UpdateQueries = new TraditionalUpdateQuery(this.DBQueries);
}
示例8: MetadataReportUtility
internal MetadataReportUtility(string agencyId, string language, Header header, DIConnection DIConnection, DIQueries DIQueries)
{
this._agencyId = agencyId;
this._header = header;
this._diConnection = DIConnection;
this._diQueries = DIQueries;
if (string.IsNullOrEmpty(language))
{
this._language = this._diQueries.LanguageCode.Substring(1);
this._multiLanguageHandlingRequired = true;
}
else
{
if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
{
this._language = language;
this._multiLanguageHandlingRequired = false;
}
else
{
this._language = this._diQueries.LanguageCode.Substring(1);
this._multiLanguageHandlingRequired = false;
}
}
}
示例9: ElementMapper
public ElementMapper(DIConnection dbConnection, DIQueries dbQueries, Dictionary<TemplateMergeControlType, MergeTableInfo> mappedTables)
{
this.DBConnection = dbConnection;
this.DBQueries = dbQueries;
this.TemplateQueries = new MergeTemplateQueries(this.DBQueries.DataPrefix, this.DBQueries.LanguageCode);
this.MappedTables = mappedTables;
}
示例10: Generate_Categorization
public static List<ArtefactInfo> Generate_Categorization(SDMXSchemaType schemaType, string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries,string IcType)
{
List<ArtefactInfo> RetVal;
CategorizationUtility CategorizationUtility;
RetVal = null;
CategorizationUtility = null;
try
{
CategorizationUtility = new CategorizationUtility(agencyId, language, header, outputFolder, DIConnection, DIQueries);
// RetVal = CategorizationUtility.Generate_Artefact();
RetVal = CategorizationUtility.Generate_CompleteArtefact(IcType);
CategorizationUtility.Save_Artefacts(RetVal);
}
catch (Exception ex)
{
RetVal = null;
throw ex;
}
finally
{
}
return RetVal;
}
示例11: GetDataQueryResponseJSON
public string GetDataQueryResponseJSON(string dbNId, string language, string key)
{
string ResponseString;
XmlDocument QueryDocument;
ResponseString = string.Empty;
QueryDocument = null;
try
{
this.DIConnection = Global.GetDbConnection(Convert.ToInt32(dbNId));
this.DIQueries = new DIQueries(this.DIConnection.DIDataSetDefault(), this.DIConnection.DILanguageCodeDefault(this.DIConnection.DIDataSetDefault()));
QueryDocument = this.Get_Query(key, Constants.WSQueryStrings.ResponseFormatTypes.JSON, Constants.WSQueryStrings.SDMXFormatTypes.StructureSpecificTS, language);
ResponseString = DATAUtility.Get_Data(QueryDocument, DataTypes.JSON, DIConnection, DIQueries);
}
catch (Exception ex)
{
Global.CreateExceptionString(ex, null);
throw ex;
}
finally
{
}
return ResponseString;
}
示例12: CreateInstance
public static DIData CreateInstance(DIImportFileType importFileType, List<string> sourceFileNamesWPath,
string tempFolderPath, DIConnection dbConnection, DIQueries dbQueries)
{
DIData RetVal = null;
switch (importFileType)
{
case DIImportFileType.DataEntrySpreasheet:
break;
case DIImportFileType.Database:
break;
case DIImportFileType.Template:
break;
case DIImportFileType.SDMXXml:
RetVal = new SDMX.SDMXXml(sourceFileNamesWPath, tempFolderPath, dbConnection, dbQueries);
break;
default:
break;
}
if (RetVal != null)
{
RetVal.ImportFileType = importFileType;
}
return RetVal;
}
示例13: DI6ToDI5Converter
/// <summary>
/// Constructor
/// </summary>
/// <param name="fileNameWPath"></param>
public DI6ToDI5Converter(string fileNameWPath)
{
this.DBConnection = new DIConnection(DIServerType.MsAccess, string.Empty, string.Empty, fileNameWPath, string.Empty, string.Empty);
this.DBQueries = new DIQueries(this.DBConnection.DIDataSetDefault(), this.DBConnection.DILanguageCodeDefault("UT_"));
this.FilenameWPath = fileNameWPath;
}
示例14: CategorizationUtility
internal CategorizationUtility(string agencyId, string language, Header header, string outputFolder, DIConnection DIConnection, DIQueries DIQueries)
: base(agencyId, language, header, outputFolder)
{
this._diConnection = DIConnection;
this._diQueries = DIQueries;
if (string.IsNullOrEmpty(language))
{
this.Language = this._diQueries.LanguageCode.Substring(1);
this._multiLanguageHandlingRequired = true;
}
else
{
if (this._diConnection.IsValidDILanguage(this._diQueries.DataPrefix, language))
{
this.Language = language;
this._multiLanguageHandlingRequired = false;
}
else
{
this.Language = this._diQueries.LanguageCode.Substring(1);
this._multiLanguageHandlingRequired = false;
}
}
}
示例15: BaseQueryUtility
internal BaseQueryUtility(Dictionary<string, string> dictUserSelections, DataReturnDetailTypes dataReturnDetailType, string agencyId, DIConnection DIConnection, DIQueries DIQueries)
{
this._dictUserSelections = dictUserSelections;
this._dataReturnDetailType = dataReturnDetailType;
this._agencyId = agencyId;
this._diConnection = DIConnection;
this._diQueries = DIQueries;
}