Browse Source

BindDetai 移到锁外面

master
luanhui 8 years ago
parent
commit
5c5df282e1
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      WeighAndGrading/GradeFrom.cs

+ 9
- 1
WeighAndGrading/GradeFrom.cs View File

@ -945,6 +945,7 @@ namespace WeighAndGrading
//点级别
void AddDetail(CTuple<long, string, short, string> 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)


Loading…
Cancel
Save