From 5c5df282e1f128de44bcd38adfe00d9f9d05da0a Mon Sep 17 00:00:00 2001 From: luanhui <1029149336@qq.com> Date: Fri, 17 Nov 2017 15:35:48 +0800 Subject: [PATCH] =?UTF-8?q?BindDetai=20=E7=A7=BB=E5=88=B0=E9=94=81?= =?UTF-8?q?=E5=A4=96=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeighAndGrading/GradeFrom.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index fc1a0b8..6c09a7c 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -945,6 +945,7 @@ namespace WeighAndGrading //点级别 void AddDetail(CTuple livestock) { + lock (_obj) { var currentRow = livestock.Item3 == 0 ? tangEntity : maoEntity; @@ -1001,9 +1002,14 @@ namespace WeighAndGrading // LocalGradeAndWeightBL.Insert(entity); 改成调用方法 方便加锁 LocalGradeAndWeightBLInsert(entity); // noWeightList.Enqueue(entity); // 添加的掉猪明细不加入到没有称重队列 + + + //这里绑定界面 东旭说不应该放到锁了 不知道怎么改 BindDetailGrid(); } + + if (currentRow != null) { currentRow.Already = currentRow.Already + 1; @@ -1096,13 +1102,15 @@ namespace WeighAndGrading LocalGradeAndWeightBLInsert(entity); noLivestockList.Enqueue(entity); - BindDetailGrid(); + // SetlblSucessVisibleTrue(); // SetlblSucessVisibleFalse(); } } + + BindDetailGrid(); } private void cancelBtn_Click(object sender, EventArgs e)