|
|
|
@ -550,17 +550,17 @@ namespace WeighAndGrading |
|
|
|
row.DefaultCellStyle.BackColor = Color.Red; |
|
|
|
} |
|
|
|
InitScrollBar2(); |
|
|
|
if (lastSelectID.HasValue) |
|
|
|
{ |
|
|
|
foreach (DataGridViewRow row in historyGrid.Rows) |
|
|
|
{ |
|
|
|
if ((long)row.Cells["H_SID"].Value == lastSelectID) |
|
|
|
{ |
|
|
|
historyGrid.CurrentCell = row.Cells[row.Cells.Count - 1]; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//if (lastSelectID.HasValue)
|
|
|
|
//{
|
|
|
|
// foreach (DataGridViewRow row in historyGrid.Rows)
|
|
|
|
// {
|
|
|
|
// if ((long)row.Cells["H_SID"].Value == lastSelectID)
|
|
|
|
// {
|
|
|
|
// historyGrid.CurrentCell = row.Cells[row.Cells.Count - 1];
|
|
|
|
// break;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
try |
|
|
|
{ |
|
|
|
if (rightRoll != -1) |
|
|
|
@ -1465,13 +1465,13 @@ namespace WeighAndGrading |
|
|
|
private long? maxLockID; |
|
|
|
|
|
|
|
GradeAndWeight_Detail lastCheckItem, mCurrentSlectItem; |
|
|
|
long? lastSelectID = null; |
|
|
|
//long? lastSelectID = null;
|
|
|
|
private void historyGrid_CellClick(object sender, DataGridViewCellEventArgs e) |
|
|
|
{ |
|
|
|
if (e.RowIndex < 0) |
|
|
|
return; |
|
|
|
var currentRow = historyGrid.CurrentRow.DataBoundItem as GradeAndWeight_Detail; |
|
|
|
lastSelectID = currentRow.SID; |
|
|
|
// lastSelectID = currentRow.SID;
|
|
|
|
|
|
|
|
mCurrentSlectItem = currentRow; |
|
|
|
|
|
|
|
|