本文整理汇总了C#中DIQueries.GetSplittedValues方法的典型用法代码示例。如果您正苦于以下问题:C# DIQueries.GetSplittedValues方法的具体用法?C# DIQueries.GetSplittedValues怎么用?C# DIQueries.GetSplittedValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DIQueries
的用法示例。
在下文中一共展示了DIQueries.GetSplittedValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateNIdsFromGIds
/// <summary>
/// Update / Save NIds on the basis of GIds
/// </summary>
/// <param name="DIConnection"></param>
/// <param name="DIQueries"></param>
public void UpdateNIdsFromGIds(DIConnection DIConnection, DIQueries DIQueries)
{
IDataReader IDataReader;
StringBuilder IDValues = new StringBuilder();
string sSql = string.Empty;
string[] ColumnField = new string[0];
StringBuilder Values = new StringBuilder();
#region Indicator
if (this._IndicatorGIds.Length > 0)
{
string[] IndicatorValues = DIQueries.GetSplittedValues(this._IndicatorGIds, Delimiter.TEXT_DELIMITER);
StringBuilder IndicatorText = new StringBuilder();
for (int i = 0; i < IndicatorValues.Length; i++)
{
if (i > 0)
{
IndicatorText.Append(Delimiter.NUMERIC_DELIMITER);
}
IndicatorText.Append("'" + IndicatorValues[i] + "'");
}
if (this._ShowIUS)
{
sSql = DIQueries.IUS.GetIUSNIds(IndicatorText.ToString(), DIConnection.ConnectionStringParameters.ServerType);
}
else
{
sSql = DIQueries.Indicators.GetIndicator(FilterFieldType.GId, IndicatorText.ToString(), FieldSelection.NId);
}
IDataReader = DIConnection.ExecuteReader(sSql);
while (IDataReader.Read())
{
if (IDValues.Length > 0)
{
IDValues.Append(Delimiter.NUMERIC_DELIMITER);
}
if (this._ShowIUS == true)
{
IDValues.Append(IDataReader[Indicator_Unit_Subgroup.IUSNId]);
}
else
{
IDValues.Append(IDataReader[Indicator.IndicatorNId]);
}
}
IDataReader.Close();
this._IndicatorNIds = IDValues.ToString();
}
else
{
//-- Clear the NId, if GId is blank
this._IndicatorNIds = string.Empty;
}
#endregion
#region Unit
if (this._UnitGIds.Length > 0)
{
sSql = DIQueries.Unit.GetUnit(FilterFieldType.GId, this._UnitGIds);
IDataReader = DIConnection.ExecuteReader(sSql);
IDValues.Length = 0;
while (IDataReader.Read())
{
if (IDValues.Length > 0)
{
IDValues.Append(Delimiter.NUMERIC_DELIMITER);
}
IDValues.Append(IDataReader[Unit.UnitNId]);
}
IDataReader.Close();
this._UnitNIds = IDValues.ToString();
}
else
{
//-- Clear the NId, if GId is blank
this._UnitNIds = string.Empty;
}
#endregion
#region SubgroupVal
if (this._SubgroupValGIds.Length > 0)
{
sSql = DIQueries.Subgroup.GetSubgroupVals(FilterFieldType.GId, this._SubgroupValGIds);
IDataReader = DIConnection.ExecuteReader(sSql);
IDValues.Length = 0;
//.........这里部分代码省略.........