From 04999ba6c983f4ca44abe266d03f14f5d6a56043 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Sat, 18 Nov 2017 04:15:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BO/Utils/BillRpc/GradeAndWeightRpc.cs | 2 ++ WeighAndGrading/GradeFrom.cs | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) 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;