Пример #1
0
        private int GetRowIndex(ITestControl testTable, int rowCount, string[] columnCaptions,
                                string[] cellValues)
        {
            var gridHelper = new GridControlHelper(testTable);
            int rowIndex   = -1;

            if (cellValues.Length > 0)
            {
                string[,] tableValues = null;
                List <IGridColumn> columnList = gridHelper.GetColumnIndexes(columnCaptions, false);
                rowIndex = gridHelper.SearchRowIndex(columnList, cellValues, rowCount, ref tableValues);
                if (rowIndex == -1)
                {
                    throw new AdapterOperationException(
                              string.Format("The record with the '{0}' value was not found. Checked values: {1}",
                                            string.Join(", ", cellValues), GridControlHelper.GetFormatTableValues(tableValues)));
                }
            }

            return(rowIndex);
        }
Пример #2
0
        private int GetRowIndex(ITestControl testTable, int rowCount, string[] columnCaptions,
            string[] cellValues){
            var gridHelper = new GridControlHelper(testTable);
            int rowIndex = -1;
            if (cellValues.Length > 0){
                string[,] tableValues = null;
                List<IGridColumn> columnList = gridHelper.GetColumnIndexes(columnCaptions, false);
                rowIndex = gridHelper.SearchRowIndex(columnList, cellValues, rowCount, ref tableValues);
                if (rowIndex == -1)
                    throw new AdapterOperationException(
                        string.Format("The record with the '{0}' value was not found. Checked values: {1}",
                            string.Join(", ", cellValues), GridControlHelper.GetFormatTableValues(tableValues)));
            }

            return rowIndex;
        }