From 4a8e833157577464f03b5e794488915ea48183ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E5=8F=AB=E9=94=84=E5=A4=B4?= Date: Wed, 10 Jan 2024 10:01:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Report/GelDoser/SelectRowAction.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/GelDoser/SelectRowAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/GelDoser/SelectRowAction.cs index 2c210ae..5c600c0 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/GelDoser/SelectRowAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/GelDoser/SelectRowAction.cs @@ -109,16 +109,22 @@ t1.actValue as 实际重量,t1.actToler as 实际公差 dbHelper.AddParameter("@reportId", lR_planID); DataTable table = dbHelper.ToDataTable(); - string bathNo = ""; + string bathNo = "0"; - foreach (DataRow item in table.Rows) + foreach (DataRow row in table.Rows) { - string a = item["批次号"].ToString().Trim(); + string a = row["批次号"].ToString().Trim(); if (a != "0") { - bathNo = a; + bathNo = a; break; } - else + } + + + foreach (DataRow item in table.Rows) + { + string a = item["批次号"].ToString().Trim(); + if (a == "0") { item["批次号"] = bathNo; }