本文整理汇总了C#中DIQueries类的典型用法代码示例。如果您正苦于以下问题:C# DIQueries类的具体用法?C# DIQueries怎么用?C# DIQueries使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DIQueries类属于命名空间,在下文中一共展示了DIQueries类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:34,代码来源:DIDataValueHelper.cs
示例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;
}
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:31,代码来源:DIDataValueHelper.cs
示例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()));
}
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:25,代码来源:ExportOnlineDatabase.cs
示例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;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:30,代码来源:CategorySchemeUtility.cs
示例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;
}
}
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:27,代码来源:CodelistUtility.cs
示例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()));
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:26,代码来源:RegistryService.cs
示例7: ImportQueries
internal ImportQueries(DIQueries DBQueries)
{
this.DBQueries = DBQueries;
// Set IUpdateQuery object, (By Default: Traditional)
this.UpdateQueries = new TraditionalUpdateQuery(this.DBQueries);
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:7,代码来源:ImportQueries.cs
示例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;
}
}
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:26,代码来源:MetadataReportUtility.cs
示例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;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:7,代码来源:ElementMapper.cs
示例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;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:26,代码来源:SDMXUtility.cs
示例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;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:27,代码来源:REST.cs
示例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;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:25,代码来源:DIDataFactory.cs
示例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;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:11,代码来源:DI6ToDI5Converter.cs
示例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;
}
}
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:25,代码来源:CategorizationUtility.cs
示例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;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:8,代码来源:BaseQueryUtility.cs
示例16: IndicatorClassificationSelections
public IndicatorClassificationSelections(DIConnection dIConnection,DIQueries dIQueries)
{
// -- DAL connection object
this.DbConnection = dIConnection;
// -- DAL query object
this.DbQueries = dIQueries;
// -- Intialize the string builder object
this._XMLString = new StringBuilder();
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:9,代码来源:IndicatorClassificationSelections.cs
示例17: IUSBuilder
public IUSBuilder(DIConnection connection, DIQueries queries)
{
this.DBConnection = connection;
this.DBQueries = queries;
this.DIIndicator = new IndicatorBuilder(connection, queries);
this.DIUnit = new UnitBuilder(connection, queries);
this.DISubgroupVal = new DI6SubgroupValBuilder(connection, queries);
DIConnection.ConnectionType = this.DBConnection.ConnectionStringParameters.ServerType;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:9,代码来源:IUSBuilder.cs
示例18: CreateListViewSource
/// <summary>
/// Returns the instance of BaseListViewSource. Based on Factory method.
/// </summary>
/// <param name="listType"></param>
/// <param name="dbConnection"></param>
/// <param name="dbQueries"></param>
/// <param name="userprefenece"></param>
/// <returns></returns>
public static BaseListViewSource CreateListViewSource(ListViewType listType, DIConnection dbConnection, DIQueries dbQueries, UserPreference userprefenece)
{
BaseListViewSource RetVal = null;
switch (listType)
{
case ListViewType.Indicator:
RetVal = new IndicatorListViewSource();
RetVal.RaiseInitializedIndicatorListViewEvent();
break;
case ListViewType.Timeperiod:
RetVal = new TimeperiodListViewSource();
RetVal.RaiseInitializedTimperiodListViewEvent();
break;
case ListViewType.Area:
RetVal = new AreaListViewSource();
RetVal.RaiseInitializedAreaListViewEvent();
break;
case ListViewType.Source:
RetVal = new DISourceListViewSource();
RetVal.RaiseInitializedDISourceListViewEvent();
break;
case ListViewType.Unit:
RetVal = new UnitListViewSource();
RetVal.RaiseInitializedUnitListViewEvent();
break;
case ListViewType.SubgroupVal:
RetVal = new SubgroupValListViewSource();
RetVal.RaiseInitializedUnitListViewEvent();
break;
case ListViewType.IC:
RetVal = new ICListViewSource();
break;
default:
break;
}
if (RetVal != null)
{
//set variables
RetVal.DBConnection = dbConnection;
RetVal.DBQueries = dbQueries;
RetVal.DIUserPreference = userprefenece;
//set columns
RetVal.SetColumnInfo();
}
return RetVal;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:65,代码来源:ListViewSourceFactory.cs
示例19: AssistantImporter
internal AssistantImporter(DIConnection targetConnection, DIQueries targetQueries, List<string> sourceDatabaseFileNamesWPath)
{
this._TargetDBConnection = targetConnection;
this._TargetDBQueries = targetQueries;
this.SourceDatabaseFileNamesWPath = sourceDatabaseFileNamesWPath;
this.AvailableIndicators = new IndicatorBuilder(this._TargetDBConnection, this._TargetDBQueries);
this.AvailableUnit= new UnitBuilder(this._TargetDBConnection, this._TargetDBQueries);
this.AvailableSubgroupVal= new DI6SubgroupValBuilder(this._TargetDBConnection, this._TargetDBQueries);
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:11,代码来源:AssistantImporter.cs
示例20: GetAreaLevels
//Returns the requires area levels
public static DataTable GetAreaLevels(DIConnection dBConnection, DIQueries dBQueries)
{
DataTable dtAreaLevel = null;
try
{
dtAreaLevel = dBConnection.ExecuteDataTable(dBQueries.Area.GetAreaLevel(FilterFieldType.None, string.Empty));
}
catch (Exception)
{
}
return dtAreaLevel;
}
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:13,代码来源:ReportLayout.cs
注:本文中的DIQueries类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论