Commit 05a35dbd by 任天宇

优化了扫描到样品后不交接的情况下不能重置箱号的bug

新增了重置箱号和开始交接样品时停止扫描
parent 1643242b
...@@ -53,6 +53,15 @@ ...@@ -53,6 +53,15 @@
this.plRight = new System.Windows.Forms.Panel(); this.plRight = new System.Windows.Forms.Panel();
this.gbRfid = new System.Windows.Forms.GroupBox(); this.gbRfid = new System.Windows.Forms.GroupBox();
this.dgvRfidSamples = new System.Windows.Forms.DataGridView(); this.dgvRfidSamples = new System.Windows.Forms.DataGridView();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ScanedIsSelected = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.gbRightToolBar = new System.Windows.Forms.GroupBox(); this.gbRightToolBar = new System.Windows.Forms.GroupBox();
this.ckbSelectAll = new System.Windows.Forms.CheckBox(); this.ckbSelectAll = new System.Windows.Forms.CheckBox();
this.lbScanSampleMoreCount = new System.Windows.Forms.Label(); this.lbScanSampleMoreCount = new System.Windows.Forms.Label();
...@@ -68,6 +77,15 @@ ...@@ -68,6 +77,15 @@
this.plMain = new System.Windows.Forms.Panel(); this.plMain = new System.Windows.Forms.Panel();
this.gbMain = new System.Windows.Forms.GroupBox(); this.gbMain = new System.Windows.Forms.GroupBox();
this.dgvSamples = new System.Windows.Forms.DataGridView(); this.dgvSamples = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewButtonColumn();
this.SampleBizId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SamplePackageName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleOwnerName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleDealTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleDeadTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleQuantityUnit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.gbMainToolBar = new System.Windows.Forms.GroupBox(); this.gbMainToolBar = new System.Windows.Forms.GroupBox();
this.btnSetCurrentPackage = new System.Windows.Forms.Button(); this.btnSetCurrentPackage = new System.Windows.Forms.Button();
this.lbPackageSampleMissCount = new System.Windows.Forms.Label(); this.lbPackageSampleMissCount = new System.Windows.Forms.Label();
...@@ -78,24 +96,6 @@ ...@@ -78,24 +96,6 @@
this.btnClearCurrentPackage = new System.Windows.Forms.Button(); this.btnClearCurrentPackage = new System.Windows.Forms.Button();
this.lbSetPackage = new System.Windows.Forms.Label(); this.lbSetPackage = new System.Windows.Forms.Label();
this.tbSetCurrentPackage = new System.Windows.Forms.TextBox(); this.tbSetCurrentPackage = new System.Windows.Forms.TextBox();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewButtonColumn();
this.SampleBizId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SamplePackageName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleOwnerName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleDealTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleDeadTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.SampleQuantityUnit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ScanedIsSelected = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.plLeft.SuspendLayout(); this.plLeft.SuspendLayout();
this.gbInfo.SuspendLayout(); this.gbInfo.SuspendLayout();
this.gbLogin.SuspendLayout(); this.gbLogin.SuspendLayout();
...@@ -376,6 +376,74 @@ ...@@ -376,6 +376,74 @@
this.dgvRfidSamples.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvRfidSamples_RowPostPaint); this.dgvRfidSamples.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvRfidSamples_RowPostPaint);
this.dgvRfidSamples.RowStateChanged += new System.Windows.Forms.DataGridViewRowStateChangedEventHandler(this.dgvRfidSamples_RowStateChanged); this.dgvRfidSamples.RowStateChanged += new System.Windows.Forms.DataGridViewRowStateChangedEventHandler(this.dgvRfidSamples_RowStateChanged);
// //
// Column2
//
this.Column2.HeaderText = "Column2";
this.Column2.MinimumWidth = 2;
this.Column2.Name = "Column2";
this.Column2.Width = 2;
//
// ScanedIsSelected
//
this.ScanedIsSelected.DataPropertyName = "IsSelected";
this.ScanedIsSelected.HeaderText = "选中";
this.ScanedIsSelected.MinimumWidth = 50;
this.ScanedIsSelected.Name = "ScanedIsSelected";
this.ScanedIsSelected.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.ScanedIsSelected.Width = 50;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.DataPropertyName = "BizId";
this.dataGridViewTextBoxColumn1.HeaderText = "样品报告号";
this.dataGridViewTextBoxColumn1.MinimumWidth = 160;
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.Width = 160;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.DataPropertyName = "PackageName";
this.dataGridViewTextBoxColumn2.HeaderText = "箱号";
this.dataGridViewTextBoxColumn2.MinimumWidth = 100;
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.DataPropertyName = "Name";
this.dataGridViewTextBoxColumn4.HeaderText = "样品名称";
this.dataGridViewTextBoxColumn4.MinimumWidth = 150;
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.Width = 150;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.dataGridViewTextBoxColumn3.DataPropertyName = "OwnerName";
this.dataGridViewTextBoxColumn3.HeaderText = "所属部门";
this.dataGridViewTextBoxColumn3.MinimumWidth = 90;
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
//
// dataGridViewTextBoxColumn5
//
this.dataGridViewTextBoxColumn5.DataPropertyName = "DealTime";
this.dataGridViewTextBoxColumn5.HeaderText = "委托日期";
this.dataGridViewTextBoxColumn5.MinimumWidth = 100;
this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
//
// dataGridViewTextBoxColumn6
//
this.dataGridViewTextBoxColumn6.DataPropertyName = "DeadTime";
this.dataGridViewTextBoxColumn6.HeaderText = "完成日期";
this.dataGridViewTextBoxColumn6.MinimumWidth = 100;
this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
//
// dataGridViewTextBoxColumn7
//
this.dataGridViewTextBoxColumn7.DataPropertyName = "QuantityUnit";
this.dataGridViewTextBoxColumn7.HeaderText = "数量/单位";
this.dataGridViewTextBoxColumn7.MinimumWidth = 100;
this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
//
// gbRightToolBar // gbRightToolBar
// //
this.gbRightToolBar.Controls.Add(this.ckbSelectAll); this.gbRightToolBar.Controls.Add(this.ckbSelectAll);
...@@ -564,6 +632,89 @@ ...@@ -564,6 +632,89 @@
this.dgvSamples.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvSamples_RowPostPaint); this.dgvSamples.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dgvSamples_RowPostPaint);
this.dgvSamples.RowStateChanged += new System.Windows.Forms.DataGridViewRowStateChangedEventHandler(this.dgvSamples_RowStateChanged); this.dgvSamples.RowStateChanged += new System.Windows.Forms.DataGridViewRowStateChangedEventHandler(this.dgvSamples_RowStateChanged);
// //
// Column1
//
this.Column1.Frozen = true;
this.Column1.HeaderText = "Column1";
this.Column1.MinimumWidth = 2;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 2;
//
// Column3
//
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.NullValue = "交接";
this.Column3.DefaultCellStyle = dataGridViewCellStyle1;
this.Column3.Frozen = true;
this.Column3.HeaderText = "*";
this.Column3.MinimumWidth = 50;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.Column3.Text = "确认交接";
this.Column3.Width = 50;
//
// SampleBizId
//
this.SampleBizId.DataPropertyName = "BizId";
this.SampleBizId.Frozen = true;
this.SampleBizId.HeaderText = "样品报告号";
this.SampleBizId.MinimumWidth = 110;
this.SampleBizId.Name = "SampleBizId";
this.SampleBizId.ReadOnly = true;
this.SampleBizId.Width = 110;
//
// SamplePackageName
//
this.SamplePackageName.DataPropertyName = "PackageName";
this.SamplePackageName.HeaderText = "箱号";
this.SamplePackageName.MinimumWidth = 100;
this.SamplePackageName.Name = "SamplePackageName";
this.SamplePackageName.ReadOnly = true;
//
// SampleName
//
this.SampleName.DataPropertyName = "Name";
this.SampleName.HeaderText = "样品名称";
this.SampleName.MinimumWidth = 150;
this.SampleName.Name = "SampleName";
this.SampleName.ReadOnly = true;
this.SampleName.Width = 150;
//
// SampleOwnerName
//
this.SampleOwnerName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.SampleOwnerName.DataPropertyName = "OwnerName";
this.SampleOwnerName.HeaderText = "所属部门";
this.SampleOwnerName.MinimumWidth = 90;
this.SampleOwnerName.Name = "SampleOwnerName";
this.SampleOwnerName.ReadOnly = true;
//
// SampleDealTime
//
this.SampleDealTime.DataPropertyName = "DealTime";
this.SampleDealTime.HeaderText = "委托日期";
this.SampleDealTime.MinimumWidth = 100;
this.SampleDealTime.Name = "SampleDealTime";
this.SampleDealTime.ReadOnly = true;
//
// SampleDeadTime
//
this.SampleDeadTime.DataPropertyName = "DeadTime";
this.SampleDeadTime.HeaderText = "完成日期";
this.SampleDeadTime.MinimumWidth = 100;
this.SampleDeadTime.Name = "SampleDeadTime";
this.SampleDeadTime.ReadOnly = true;
//
// SampleQuantityUnit
//
this.SampleQuantityUnit.DataPropertyName = "QuantityUnit";
this.SampleQuantityUnit.HeaderText = "数量/单位";
this.SampleQuantityUnit.MinimumWidth = 100;
this.SampleQuantityUnit.Name = "SampleQuantityUnit";
this.SampleQuantityUnit.ReadOnly = true;
//
// gbMainToolBar // gbMainToolBar
// //
this.gbMainToolBar.Controls.Add(this.btnSetCurrentPackage); this.gbMainToolBar.Controls.Add(this.btnSetCurrentPackage);
...@@ -675,157 +826,6 @@ ...@@ -675,157 +826,6 @@
this.tbSetCurrentPackage.TabIndex = 78; this.tbSetCurrentPackage.TabIndex = 78;
this.tbSetCurrentPackage.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbSetCurrentPackage_KeyDown); this.tbSetCurrentPackage.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbSetCurrentPackage_KeyDown);
// //
// Column1
//
this.Column1.Frozen = true;
this.Column1.HeaderText = "Column1";
this.Column1.MinimumWidth = 2;
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 2;
//
// Column3
//
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.NullValue = "交接";
this.Column3.DefaultCellStyle = dataGridViewCellStyle1;
this.Column3.Frozen = true;
this.Column3.HeaderText = "*";
this.Column3.MinimumWidth = 50;
this.Column3.Name = "Column3";
this.Column3.ReadOnly = true;
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.Column3.Text = "确认交接";
this.Column3.Width = 50;
//
// SampleBizId
//
this.SampleBizId.DataPropertyName = "BizId";
this.SampleBizId.Frozen = true;
this.SampleBizId.HeaderText = "样品报告号";
this.SampleBizId.MinimumWidth = 110;
this.SampleBizId.Name = "SampleBizId";
this.SampleBizId.ReadOnly = true;
this.SampleBizId.Width = 110;
//
// SamplePackageName
//
this.SamplePackageName.DataPropertyName = "PackageName";
this.SamplePackageName.HeaderText = "箱号";
this.SamplePackageName.MinimumWidth = 100;
this.SamplePackageName.Name = "SamplePackageName";
this.SamplePackageName.ReadOnly = true;
//
// SampleName
//
this.SampleName.DataPropertyName = "Name";
this.SampleName.HeaderText = "样品名称";
this.SampleName.MinimumWidth = 150;
this.SampleName.Name = "SampleName";
this.SampleName.ReadOnly = true;
this.SampleName.Width = 150;
//
// SampleOwnerName
//
this.SampleOwnerName.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.SampleOwnerName.DataPropertyName = "OwnerName";
this.SampleOwnerName.HeaderText = "所属部门";
this.SampleOwnerName.MinimumWidth = 90;
this.SampleOwnerName.Name = "SampleOwnerName";
this.SampleOwnerName.ReadOnly = true;
//
// SampleDealTime
//
this.SampleDealTime.DataPropertyName = "DealTime";
this.SampleDealTime.HeaderText = "委托日期";
this.SampleDealTime.MinimumWidth = 100;
this.SampleDealTime.Name = "SampleDealTime";
this.SampleDealTime.ReadOnly = true;
//
// SampleDeadTime
//
this.SampleDeadTime.DataPropertyName = "DeadTime";
this.SampleDeadTime.HeaderText = "完成日期";
this.SampleDeadTime.MinimumWidth = 100;
this.SampleDeadTime.Name = "SampleDeadTime";
this.SampleDeadTime.ReadOnly = true;
//
// SampleQuantityUnit
//
this.SampleQuantityUnit.DataPropertyName = "QuantityUnit";
this.SampleQuantityUnit.HeaderText = "数量/单位";
this.SampleQuantityUnit.MinimumWidth = 100;
this.SampleQuantityUnit.Name = "SampleQuantityUnit";
this.SampleQuantityUnit.ReadOnly = true;
//
// Column2
//
this.Column2.HeaderText = "Column2";
this.Column2.MinimumWidth = 2;
this.Column2.Name = "Column2";
this.Column2.Width = 2;
//
// ScanedIsSelected
//
this.ScanedIsSelected.DataPropertyName = "IsSelected";
this.ScanedIsSelected.HeaderText = "选中";
this.ScanedIsSelected.MinimumWidth = 50;
this.ScanedIsSelected.Name = "ScanedIsSelected";
this.ScanedIsSelected.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.ScanedIsSelected.Width = 50;
//
// dataGridViewTextBoxColumn1
//
this.dataGridViewTextBoxColumn1.DataPropertyName = "BizId";
this.dataGridViewTextBoxColumn1.HeaderText = "样品报告号";
this.dataGridViewTextBoxColumn1.MinimumWidth = 160;
this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
this.dataGridViewTextBoxColumn1.Width = 160;
//
// dataGridViewTextBoxColumn2
//
this.dataGridViewTextBoxColumn2.DataPropertyName = "PackageName";
this.dataGridViewTextBoxColumn2.HeaderText = "箱号";
this.dataGridViewTextBoxColumn2.MinimumWidth = 100;
this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
//
// dataGridViewTextBoxColumn4
//
this.dataGridViewTextBoxColumn4.DataPropertyName = "Name";
this.dataGridViewTextBoxColumn4.HeaderText = "样品名称";
this.dataGridViewTextBoxColumn4.MinimumWidth = 150;
this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
this.dataGridViewTextBoxColumn4.Width = 150;
//
// dataGridViewTextBoxColumn3
//
this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.dataGridViewTextBoxColumn3.DataPropertyName = "OwnerName";
this.dataGridViewTextBoxColumn3.HeaderText = "所属部门";
this.dataGridViewTextBoxColumn3.MinimumWidth = 90;
this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
//
// dataGridViewTextBoxColumn5
//
this.dataGridViewTextBoxColumn5.DataPropertyName = "DealTime";
this.dataGridViewTextBoxColumn5.HeaderText = "委托日期";
this.dataGridViewTextBoxColumn5.MinimumWidth = 100;
this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
//
// dataGridViewTextBoxColumn6
//
this.dataGridViewTextBoxColumn6.DataPropertyName = "DeadTime";
this.dataGridViewTextBoxColumn6.HeaderText = "完成日期";
this.dataGridViewTextBoxColumn6.MinimumWidth = 100;
this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
//
// dataGridViewTextBoxColumn7
//
this.dataGridViewTextBoxColumn7.DataPropertyName = "QuantityUnit";
this.dataGridViewTextBoxColumn7.HeaderText = "数量/单位";
this.dataGridViewTextBoxColumn7.MinimumWidth = 100;
this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
//
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -836,7 +836,7 @@ ...@@ -836,7 +836,7 @@
this.Controls.Add(this.plLeft); this.Controls.Add(this.plLeft);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmMain"; this.Name = "FrmMain";
this.Text = "样品入库交接客户端 1.0(23.6.07)"; this.Text = "样品入库交接客户端 1.1(23.7.7)";
this.Load += new System.EventHandler(this.FrmMain_Load); this.Load += new System.EventHandler(this.FrmMain_Load);
this.plLeft.ResumeLayout(false); this.plLeft.ResumeLayout(false);
this.gbInfo.ResumeLayout(false); this.gbInfo.ResumeLayout(false);
......
...@@ -185,7 +185,7 @@ namespace Kivii.Client.SampleInbounds ...@@ -185,7 +185,7 @@ namespace Kivii.Client.SampleInbounds
//设置回调方法 //设置回调方法
reader.AnalyCallback = AnalyData; reader.AnalyCallback = AnalyData;
reader.GetFrequencyRegion(currentSetting.btReadId); reader.GetFrequencyRegion(currentSetting.btReadId);
Thread.Sleep(500); Thread.Sleep(50);
currentInventoryBuffer.ClearInventoryPar(); currentInventoryBuffer.ClearInventoryPar();
currentInventoryBuffer.btRepeat = Convert.ToByte(1);//设置每条命令盘存次数 1次 currentInventoryBuffer.btRepeat = Convert.ToByte(1);//设置每条命令盘存次数 1次
...@@ -295,7 +295,7 @@ namespace Kivii.Client.SampleInbounds ...@@ -295,7 +295,7 @@ namespace Kivii.Client.SampleInbounds
btnScanRfid.BackColor = Color.PapayaWhip; btnScanRfid.BackColor = Color.PapayaWhip;
btnScanRfid.ForeColor = Color.Chocolate; btnScanRfid.ForeColor = Color.Chocolate;
})); }));
Thread.Sleep(400); Thread.Sleep(50);
disConnectReader(); disConnectReader();
outputMessage("停止扫描"); outputMessage("停止扫描");
return; return;
...@@ -857,6 +857,10 @@ namespace Kivii.Client.SampleInbounds ...@@ -857,6 +857,10 @@ namespace Kivii.Client.SampleInbounds
if (_currentScanSamples == null) _currentScanSamples = new List<Sample>(); if (_currentScanSamples == null) _currentScanSamples = new List<Sample>();
foreach (var record in resp.Results) foreach (var record in resp.Results)
{ {
this.Invoke(new Action(delegate
{
dgvRfidSamples.DataSource = null;
}));
if (_currentScanSamples.Exists(o => o.Kvid == record.Kvid)) if (_currentScanSamples.Exists(o => o.Kvid == record.Kvid))
{ {
_currentScanSamples.RemoveAll(o => o.Kvid == record.Kvid); _currentScanSamples.RemoveAll(o => o.Kvid == record.Kvid);
...@@ -864,10 +868,6 @@ namespace Kivii.Client.SampleInbounds ...@@ -864,10 +868,6 @@ namespace Kivii.Client.SampleInbounds
} }
this.Invoke(new Action(delegate this.Invoke(new Action(delegate
{ {
dgvRfidSamples.DataSource = null;
}));
this.Invoke(new Action(delegate
{
dgvRfidSamples.DataSource = _currentScanSamples; dgvRfidSamples.DataSource = _currentScanSamples;
})); }));
} }
...@@ -1080,6 +1080,12 @@ namespace Kivii.Client.SampleInbounds ...@@ -1080,6 +1080,12 @@ namespace Kivii.Client.SampleInbounds
private void btnClearCurrentPackage_Click(object sender, EventArgs e) private void btnClearCurrentPackage_Click(object sender, EventArgs e)
{ {
btnRealTimeInventory_Stop();
this.Invoke(new Action(delegate
{
dgvSamples.DataSource = null;
dgvRfidSamples.DataSource = null;
}));
_currentPackage = null; _currentPackage = null;
_currentPackageSamples = null; _currentPackageSamples = null;
_currentScanSamples = null; _currentScanSamples = null;
...@@ -1100,9 +1106,6 @@ namespace Kivii.Client.SampleInbounds ...@@ -1100,9 +1106,6 @@ namespace Kivii.Client.SampleInbounds
//cbSetCurrentPackageOwner.DisplayMember = "OwnerName"; //cbSetCurrentPackageOwner.DisplayMember = "OwnerName";
//cbSetCurrentPackageOwner.ValueMember = "OwnerKvid"; //cbSetCurrentPackageOwner.ValueMember = "OwnerKvid";
//cbSetCurrentPackageOwner.Enabled = false; //cbSetCurrentPackageOwner.Enabled = false;
dgvSamples.DataSource = null;
dgvRfidSamples.DataSource = null;
btnRealTimeInventory_Stop();
outputMessage($"箱号已重设!"); outputMessage($"箱号已重设!");
} }
...@@ -1189,7 +1192,7 @@ namespace Kivii.Client.SampleInbounds ...@@ -1189,7 +1192,7 @@ namespace Kivii.Client.SampleInbounds
MessageBox.Show("读写器未连接,请查看是否读写器设备!"); MessageBox.Show("读写器未连接,请查看是否读写器设备!");
return; return;
} }
Thread.Sleep(200); Thread.Sleep(50);
} }
if (currentInventoryBuffer.bLoopInventory) if (currentInventoryBuffer.bLoopInventory)
{ {
...@@ -1203,6 +1206,10 @@ namespace Kivii.Client.SampleInbounds ...@@ -1203,6 +1206,10 @@ namespace Kivii.Client.SampleInbounds
private void btnSampleAssign_Click(object sender, EventArgs e) private void btnSampleAssign_Click(object sender, EventArgs e)
{ {
if (currentInventoryBuffer.bLoopInventory)
{
btnRealTimeInventory_Stop();
}
if (cbAssignOperatorName.Text.IsNullOrEmpty()) if (cbAssignOperatorName.Text.IsNullOrEmpty())
{ {
MessageBox.Show("请先设置好交接人信息", "设置"); MessageBox.Show("请先设置好交接人信息", "设置");
......
...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; ...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.6.2023.6050")] [assembly: AssemblyVersion("5.4.2023.7050")]
[assembly: AssemblyFileVersion("5.6.2023.6050")] [assembly: AssemblyFileVersion("5.4.2023.7050")]
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