Browse Source

修改.

master
yibo 8 years ago
parent
commit
c7160a30a6
1 changed files with 21 additions and 13 deletions
  1. +21
    -13
      WeighAndGrading/GradeFrom.cs

+ 21
- 13
WeighAndGrading/GradeFrom.cs View File

@ -105,24 +105,32 @@ namespace WeighAndGrading
MessageBox.Show("请先同步数据"); MessageBox.Show("请先同步数据");
return; return;
} }
btn.Enabled = false;
try
{
btn.Enabled = false;
Application.DoEvents();
var livestockTag = btn.Tag as CTuple<long, string, short, string>;
var tech = livestockTag.Item3 == TANG_TECH ? "烫褪" : "毛剥";
var livestockTag = btn.Tag as CTuple<long, string, short, string>;
var tech = livestockTag.Item3 == TANG_TECH ? "烫褪" : "毛剥";
if (modifyDetail == null)
{
StartPrintEntity(tech, null);
AddDetail(livestockTag);
if (modifyDetail == null)
{
StartPrintEntity(tech, null);
AddDetail(livestockTag);
}
else
{
UpdateDetial(modifyDetail, livestockTag);
cancelBtn_Click(btn, EventArgs.Empty);
}
SetlblSucessVisibleTrue();
SetlblSucessVisibleFalse();
} }
else
catch { throw; }
finally
{ {
UpdateDetial(modifyDetail, livestockTag);
cancelBtn_Click(btn, EventArgs.Empty);
btn.Enabled = true;
} }
SetlblSucessVisibleTrue();
SetlblSucessVisibleFalse();
btn.Enabled = true;
} }
void UpdateDetial(GradeAndWeight_Detail detail, CTuple<long, string, short, string> btnTag) void UpdateDetial(GradeAndWeight_Detail detail, CTuple<long, string, short, string> btnTag)


Loading…
Cancel
Save