public int GetColumn(string ColumnName) { int dc = Data.GetColumn(ColumnName); if (dc < 0) { FlxMessages.ThrowException(FlxErr.ErrColumNotFound, ColumnName, Name); } return(dc); }
private static int[] GetColumnsForDistinct(VirtualDataTable aTable, string SortString) { if (SortString.Trim().Length == 0) { FlxMessages.ThrowException(FlxErr.ErrInvalidDistinctParams); } int start = 0; int count = 0; do { start = SortString.IndexOf(ReportTag.ParamDelim, start); if (start > 0) { count++; start++; } }while (start > 0); start = 0; int oldStart = 0; int[] Result = new int[count + 1]; for (int i = 0; i < count; i++) { start = SortString.IndexOf(ReportTag.ParamDelim, oldStart); Result[i] = aTable.GetColumn(SortString.Substring(oldStart, start - oldStart).Trim()); if (Result[i] < 0) { FlxMessages.ThrowException(FlxErr.ErrColumNotFound, SortString.Substring(oldStart, start - oldStart).Trim(), aTable.TableName); } if (i < count) { oldStart = start + 1; } } Result[count] = aTable.GetColumn(SortString.Substring(oldStart).Trim()); if (Result[count] < 0) { FlxMessages.ThrowException(FlxErr.ErrColumNotFound, SortString.Substring(oldStart).Trim(), aTable.TableName); } return(Result); }
private static int[] GetColIndexes(VirtualDataTable Table, string[] ColNames, bool ThrowExceptions) { int[] ColIdx = new int[ColNames.Length]; for (int i = 0; i < ColIdx.Length; i++) { int cs = Table.GetColumn(ColNames[i]); if (cs < 0) { if (ThrowExceptions) { FlxMessages.ThrowException(FlxErr.ErrColumNotFound, ColNames[i], Table.TableName); } else { return(null); } } ColIdx[i] = cs; } return(ColIdx); }
public override int GetColumn(string columnName) { return(ActualData.GetColumn(columnName)); }