public void AddRow() { if (Rows.Count >= 500) { MessageBox.Show("Test Work cannot be added any more because it is not over 500!", AppRes.Caption, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } WorkRow row = new WorkRow(); row.Index = 0; row.TestPattern = "None(-1)"; row.BiasCH = "None"; row.MeasureCH = "None"; row.InputNo = "None"; row.TestRange = 0; if (Rows.Count == 0) { Rows.Add(row); RecordIndex = 0; } else { if (RecordIndex < Rows.Count - 1) { Rows.Insert(RecordIndex + 1, row); } else { Rows.Add(row); RecordIndex++; } } ReorderIndex(); RefreshGridData(); }
public WorkRowChangeEvent(WorkRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; }