private void RunRow(Parse row) { Parse cell = row.Parts; //first set input params for (int col = 0; col < columnAccessors.Length; col++) { Accessor accessor = columnAccessors[col]; ICellHandler cellHandler = CellOperation.GetHandler(this, cell, accessor.ParameterType); if (!isOutputColumn[col]) { cellHandler.HandleInput(this, cell, accessor); } cell = cell.More; } command.ExecuteNonQuery(); cell = row.Parts; //next evaluate output params for (int col = 0; col < columnAccessors.Length; col++) { Accessor accessor = columnAccessors[col]; ICellHandler cellHandler = CellOperation.GetHandler(this, cell, accessor.ParameterType); if (isOutputColumn[col]) { cellHandler.HandleCheck(this, cell, accessor); } cell = cell.More; } }
private void CheckRow(Parse row) { Parse cell = row.Parts; //first set input params foreach (DbParameterAccessor accessor in accessors) { ICellHandler cellHandler = CellOperation.GetHandler(this, cell, accessor.ParameterType); if (!accessor.IsBoundToCheckOperation) { cellHandler.HandleInput(this, cell, accessor); } cell = cell.More; } if (expectException) { try { command.ExecuteNonQuery(); Wrong(row); } catch (Exception e) { row.Parts.Last.More = new Parse("td", Gray(e.ToString()), null, null); if (errorCode.HasValue) { if (this.dbEnvironment.GetExceptionCode(e) == errorCode) { Right(row); } else { Wrong(row); } } else { Right(row); } } } else { command.ExecuteNonQuery(); //evaluate output params cell = row.Parts; foreach (DbParameterAccessor accessor in accessors) { ICellHandler cellHandler = CellOperation.GetHandler(this, cell, accessor.ParameterType); if (accessor.IsBoundToCheckOperation) { cellHandler.HandleCheck(this, cell, accessor); } cell = cell.More; } } }
private void RunRow(Parse row) { Parse cell = row.Parts; //first set input params foreach (DbParameterAccessor accessor in columnBindings) { ICellHandler cellHandler = CellOperation.GetHandler(this, cell, accessor.ParameterType); cellHandler.HandleInput(this, cell, accessor); cell = cell.More; } command.ExecuteNonQuery(); }