diff --git a/BO/Utils/BillRpc/GradeAndWeightRpc.cs b/BO/Utils/BillRpc/GradeAndWeightRpc.cs index 09cc292..15c971b 100644 --- a/BO/Utils/BillRpc/GradeAndWeightRpc.cs +++ b/BO/Utils/BillRpc/GradeAndWeightRpc.cs @@ -237,6 +237,7 @@ namespace BO.Utils.BillRpc var delete = new DQDeleteDom(typeof(GradeAndWeight_Detail)); delete.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("IsDeleted", true), DQCondition.EQ("ID", 0))); session.ExecuteNonQuery(delete); + session.Commit(); } } @@ -247,6 +248,7 @@ namespace BO.Utils.BillRpc var delete = new DQDeleteDom(typeof(GradeAndWeight_Detail)); delete.Where.Conditions.Add(DQCondition.EQ("SID", sid)); session.ExecuteNonQuery(delete); + session.Commit(); } } diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index eb9ac35..e1bd5eb 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -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;