本文整理汇总了C#中Ict.Petra.Shared.MReporting.TParameterList.SwitchColumn方法的典型用法代码示例。如果您正苦于以下问题:C# TParameterList.SwitchColumn方法的具体用法?C# TParameterList.SwitchColumn怎么用?C# TParameterList.SwitchColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ict.Petra.Shared.MReporting.TParameterList
的用法示例。
在下文中一共展示了TParameterList.SwitchColumn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SwitchColumn
/// <summary>
/// This procedure will switch the two columns
/// </summary>
/// <param name="AColumnParameters">List with the current columns</param>
/// <param name="AFrom">Index of the column to move</param>
/// <param name="ATo">Index of the new position of the column to move</param>
/// <returns>void</returns>
public static void SwitchColumn(ref TParameterList AColumnParameters, int AFrom, int ATo)
{
System.Int32 MaxDisplayColumns;
System.Int32 Counter;
System.Int32 ReferencedColumn;
AColumnParameters.SwitchColumn(AFrom, ATo);
/* switch the referenced columns in calculation */
MaxDisplayColumns = AColumnParameters.Get("MaxDisplayColumns").ToInt();
for (Counter = 0; Counter <= MaxDisplayColumns - 1; Counter += 1)
{
if (AColumnParameters.Exists("FirstColumn", Counter))
{
ReferencedColumn = AColumnParameters.Get("FirstColumn", Counter).ToInt();
if (ReferencedColumn == AFrom)
{
ReferencedColumn = ATo;
}
else if (ReferencedColumn == ATo)
{
ReferencedColumn = AFrom;
}
AColumnParameters.Add("FirstColumn", new TVariant(ReferencedColumn), Counter);
}
if (AColumnParameters.Exists("SecondColumn", Counter))
{
ReferencedColumn = AColumnParameters.Get("SecondColumn", Counter).ToInt();
if (ReferencedColumn == AFrom)
{
ReferencedColumn = ATo;
}
else if (ReferencedColumn == ATo)
{
ReferencedColumn = AFrom;
}
AColumnParameters.Add("SecondColumn", new TVariant(ReferencedColumn), Counter);
}
}
}