private void p5RowUpButton_Click(object sender, EventArgs e) { int index = p5StuffGridView.FocusedRowHandle; if (index <= 0) { return; } PhysicalPage5Row row = NewP5Row(); row.No = P5Rows[index].No; row.Line = P5Rows[index].Line; row.TestItem = P5Rows[index].TestItem; row.Result = P5Rows[index].Result; row.Requirement = P5Rows[index].Requirement; p5Bookmark.Get(); P5Rows.RemoveAt(index); P5Rows.Insert(index - 1, row); ReorderP5Rows(); AppHelper.RefreshGridData(p5StuffGridView); p5Bookmark.Goto(); p5StuffGridView.MoveBy(-1); p5StuffGrid.Focus(); }
private PhysicalPage5Row NewP5Row() { PhysicalPage5Row row = new PhysicalPage5Row(); row.No = 0; row.Line = false; row.TestItem = ""; row.Result = ""; row.Requirement = ""; return(row); }
private void SetDataSetToPage5() { p5Desc1Edit.Text = MainSet.P5Description1; p5Desc2Edit.Text = MainSet.P5Description2; P5Rows.Clear(); for (int i = 0; i < P5Set.RowCount; i++) { P5Set.Fetch(i); PhysicalPage5Row p5Row = new PhysicalPage5Row(); p5Row.No = P5Set.No; p5Row.Line = P5Set.Line; p5Row.TestItem = P5Set.TestItem; p5Row.Result = P5Set.Result; p5Row.Requirement = P5Set.Requirement; P5Rows.Add(p5Row); } p5StuffNoColumn.SortOrder = ColumnSortOrder.Ascending; }