Commit b3cb78a0 by 陶然

升级增加退样限制受理时间不在2023-06-25之后的不可以使用此系统退样

parent a0e202c1
...@@ -272,6 +272,11 @@ namespace Kivii.Client.SamplePackages ...@@ -272,6 +272,11 @@ namespace Kivii.Client.SamplePackages
return; return;
} }
var record = resp.Results[0]; var record = resp.Results[0];
if (record.DealTime == null || record.DealTime.Value < DateTime.Parse("2023-06-25"))
{
MessageBox.Show("此样品受理时间不在2023-06-25之后,请使用老样品系统退样", "Rfid读取样品");
return;
}
samplePackaging(record); samplePackaging(record);
} }
catch (Exception ex) catch (Exception ex)
...@@ -582,7 +587,20 @@ namespace Kivii.Client.SamplePackages ...@@ -582,7 +587,20 @@ namespace Kivii.Client.SamplePackages
}); });
task.Error(err => task.Error(err =>
{ {
btnLogout.Enabled = true; initControls();
lbLogStatus.Text = "未登录";
lbLogStatus.ForeColor = Color.Red;
_client.Dispose();
_client = null;
initUserInfo();
if (ReaderInstance != null && ReaderInstance.State == ApplicationConnectionState.Connected)
{
ReaderInstance.CloseSpecComPort();
ReaderInstance = null;
btnScanRfid.Text = "开始扫描";
btnScanRfid.BackColor = Color.PapayaWhip;
btnScanRfid.ForeColor = Color.Chocolate;
}
MessageBox.Show(err.Message, "Logout Error"); MessageBox.Show(err.Message, "Logout Error");
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment