Browse Source

不重启打印程序

callm 1 year ago
parent
commit
e5ad1cdcec
1 changed files with 15 additions and 15 deletions
  1. 15 15
      UAS_MES_LGDZ/FunctionCode/Make/Make_CustomLabelPrint.cs

+ 15 - 15
UAS_MES_LGDZ/FunctionCode/Make/Make_CustomLabelPrint.cs

@@ -177,13 +177,13 @@ namespace UAS_MES_NEW.Make
                             }
                             }
                         }
                         }
                         string filechangetime = PrintFile.LastWriteTime.ToString();
                         string filechangetime = PrintFile.LastWriteTime.ToString();
-                        if (filechangetime != filelastwritetime)
-                        {
-                            engine = new Engine(true);
-                            filechangetime = PrintFile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
-                            string update = "la_lastwritetime = to_date((regexp_substr('" + filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
-                            dh.UpdateByCondition("label", update, "la_id = '" + listA.Rows[PrintLabel.SelectedIndex]["la_id"].ToString() + "'");
-                        }
+                        //if (filechangetime != filelastwritetime)
+                        //{
+                        //    engine = new Engine(true);
+                        //    filechangetime = PrintFile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
+                        //    string update = "la_lastwritetime = to_date((regexp_substr('" + filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
+                        //    dh.UpdateByCondition("label", update, "la_id = '" + listA.Rows[PrintLabel.SelectedIndex]["la_id"].ToString() + "'");
+                        //}
                         format = engine.Documents.Open(@"C:\打印标签\" + listA.Rows[PrintLabel.SelectedIndex]["la_url"].ToString());
                         format = engine.Documents.Open(@"C:\打印标签\" + listA.Rows[PrintLabel.SelectedIndex]["la_url"].ToString());
                         if (format == null)
                         if (format == null)
                         {
                         {
@@ -307,14 +307,14 @@ namespace UAS_MES_NEW.Make
                     return;
                     return;
                 }
                 }
                 string filechangetime = PrintFile.LastWriteTime.ToString();
                 string filechangetime = PrintFile.LastWriteTime.ToString();
-                if (filechangetime != filelastwritetime)
-                {
-                    engine = new Engine(true);
-                    BaseUtil.WriteLbl();
-                    filechangetime = PrintFile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
-                    string update = "la_lastwritetime = to_date((regexp_substr('" + filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
-                    dh.UpdateByCondition("label", update, "la_id = '" + listA.Rows[PrintLabel.SelectedIndex]["la_id"].ToString() + "'");
-                }
+                //if (filechangetime != filelastwritetime)
+                //{
+                //    engine = new Engine(true);
+                //    BaseUtil.WriteLbl();
+                //    filechangetime = PrintFile.LastWriteTime.ToString("yyyy-MM-dd HH:mm:ss");
+                //    string update = "la_lastwritetime = to_date((regexp_substr('" + filechangetime + "','\\d+.+\\d+')),'yyyy-mm-dd hh24:mi:ss')";
+                //    dh.UpdateByCondition("label", update, "la_id = '" + listA.Rows[PrintLabel.SelectedIndex]["la_id"].ToString() + "'");
+                //}
                 format = engine.Documents.Open(listA.Rows[PrintLabel.SelectedIndex]["la_url"].ToString());
                 format = engine.Documents.Open(listA.Rows[PrintLabel.SelectedIndex]["la_url"].ToString());
                 sb = new StringBuilder();
                 sb = new StringBuilder();
                 //将值赋到format对应的变量
                 //将值赋到format对应的变量