Browse Source

打印方法错误提示补充

Hcsy 8 years ago
parent
commit
51387f6bc9
1 changed files with 5 additions and 0 deletions
  1. 5 0
      UAS-MES/PublicMethod/Print.cs

+ 5 - 0
UAS-MES/PublicMethod/Print.cs

@@ -164,6 +164,11 @@ namespace UAS_MES.PublicMethod
                 dh.UpdateByCondition("label", update, "la_id = '" + LaID + "'");
             }
             doc = lbl.Documents.Open(LabelName, true);
+            if (doc == null)
+            {
+                MessageBox.Show("标签文件打开失败");
+                return false;
+            }
             //执行全部的SQL
             for (int i = 0; i < dt.Rows.Count; i++)
             {