This commit is contained in:
GukSang.Jin
2026-02-05 15:19:07 +08:00
parent b648d0b83c
commit 09568c2c18
9 changed files with 614 additions and 217 deletions

View File

@@ -104,15 +104,20 @@ namespace 全自动水压检测仪
// 组合条码用于兼容性(可选)
string barcode = $"{contactNumber}-{itemNumber}";
bool isAny = _repository.GetScanDataBylldh_jh(uiTextBox2.Text, uiTextBox11.Text).Any();
if (isAny)
{
MessageBox.Show("联络单号-件号重复");
return;
}
try
{
_repository.InsertScanItems(new ScanData
{
barcode = barcode,
ContactNumber = contactNumber,
ItemNumber = itemNumber,
// EngravingNumber = engravingNumber,
Quantity = quantity,
//Quantity = quantity,
diffpressure = diffpressure,
exit_temperature = exit_temperature,
dwelltime = dwelltime,
@@ -200,7 +205,7 @@ namespace 全自动水压检测仪
if (uiDataGridView1 != null && !uiDataGridView1.IsDisposed)
{
// 先解绑再重新绑定
uiDataGridView1.DataSource = null;
uiDataGridView1.DataSource = new List<ScanData>();
uiDataGridView1.DataSource = data;