public override bool CheckRulesHook(DataSet ds, string tableName) { if (ds.Tables[tableName].Rows.Count > 0) { this.CurrentRow = 0; foreach (DataRow Row in ds.Tables[tableName].Rows) { if (Row.RowState != DataRowState.Unchanged && Row.RowState != DataRowState.Deleted) { OrderDetailEntity Entity = new OrderDetailEntity(); Entity.SetDataRow(Row); // Call validation methods this.ValidateDiscount(Entity.Discount); this.ValidateOrderID(Entity.OrderID); this.ValidateProductID(Entity.ProductID); this.ValidateQuantity(Entity.Quantity); this.ValidateUnitPrice(Entity.UnitPrice); } this.CurrentRow++; } } // Change this return value to indicate result of rule checking return this.ErrorProviderBrokenRuleCount == 0; }Best Regards,