From 43c24074d8750aacf253e311f73b8296ce4c6ddf 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 09:58:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=B9=B2=E6=B7=B7=E6=9C=BAbu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LjReport/DayWhiteEmbryo/GhWuLiaoInitDb.cs | 2 +- .../Report/DryMixer/SelectRowAction.cs | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GhWuLiaoInitDb.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GhWuLiaoInitDb.cs index 46e22b3..c961a1a 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GhWuLiaoInitDb.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/GhWuLiaoInitDb.cs @@ -49,8 +49,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo - + SelectButton_Click(new object(),new EventArgs()); diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectRowAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectRowAction.cs index d5151ac..dd234bf 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectRowAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectRowAction.cs @@ -102,19 +102,28 @@ namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer dbHelper.AddParameter("@reportId", lR_planID); DataTable table = dbHelper.ToDataTable(); - string bathNo = ""; + string bathNo = "0"; foreach (DataRow row in table.Rows) { - string a= row["批次号"].ToString().Trim(); + string a = row["批次号"].ToString().Trim(); if (a != "0") { - bathNo = a; + bathNo=a; break; } - else + } + + + + + foreach (DataRow row in table.Rows) + { + string a= row["批次号"].ToString().Trim(); + if (a == "0") { row["批次号"] = bathNo; } + row["实际重量"]= Convert.ToSingle(row["实际重量"]).ToString("#0.00"); row["实际公差"] = Convert.ToSingle(row["实际公差"]).ToString("#0.00");