From ff8b20f321a8b70ec3bdc208b9f383fd71718108 Mon Sep 17 00:00:00 2001
From: xiaojiao <xiaojiao@kaokeziliao.com>
Date: 星期二, 28 四月 2026 08:48:38 +0800
Subject: [PATCH] 4-28测试重入问题后全部的项目文件提交

---
 项目代码/打印机/WindowsFormsApp6/WindowsFormsApp6/Form1.cs |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/\346\211\223\345\215\260\346\234\272/WindowsFormsApp6/WindowsFormsApp6/Form1.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/\346\211\223\345\215\260\346\234\272/WindowsFormsApp6/WindowsFormsApp6/Form1.cs"
index 73b9560..59cdffd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/\346\211\223\345\215\260\346\234\272/WindowsFormsApp6/WindowsFormsApp6/Form1.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/\346\211\223\345\215\260\346\234\272/WindowsFormsApp6/WindowsFormsApp6/Form1.cs"
@@ -171,6 +171,7 @@
             Row += "'杞存壙鎵规鍙�':"+$"'{textBox1.Text}',";
             Row += "'杞存壙閲嶉噺':" + $"'{textBox2.Text}',";
             Row += "'鏃ユ湡':" + $"'{textBox3.Text}',";
+            Row += "'浜у湴':" + $"'{comboBox5.Text}',";
             Row += "}";
 
             partCode.Add(Txt_barcode1.Text, Row);
@@ -376,6 +377,10 @@
                             for (int j = sheet.Dimension.Start.Column, k = sheet.Dimension.End.Column; j <= k; j++)
                             {
                                 string tempstr = $"'{sheet.Cells[1, j].Value?.ToString()}':'{sheet.Cells[m, j].Value?.ToString()}',";
+                                if (sheet.Cells[m, j].Value == null || sheet.Cells[m, j].Value == "")
+                                {
+                                    break;
+                                }
                                 Temp_Row += tempstr;
                                 if (j == 1)
                                 {
@@ -403,6 +408,11 @@
                                 //}
                             }
                             Temp_Row += "}";
+
+                            if (Temp_Row == "{}")
+                            {
+                                break;
+                            }
                             //partCode.Add(Temp_Row);
                             partCode[value] = Temp_Row;
                         }

--
Gitblit v1.9.3