Browse Source

报告程序修复导出报告bug

zhangjiaxin 11 months ago
parent
commit
ff95e6b473
1 changed files with 6 additions and 1 deletions
  1. 6 1
      OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Export.cs

+ 6 - 1
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Export.cs

@@ -1114,6 +1114,11 @@ namespace OTSIncAReportApp
             string fullPathR = "";
             ResultFile resfile = m_ReportApp.m_rstDataMgr.ResultFilesList[m_ReportApp.m_rstDataMgr.getSelectedIndex()];
             string str_libraryName = resfile.GetSTDName();
+            bool endsWithDb = str_libraryName.EndsWith(".db", StringComparison.OrdinalIgnoreCase);
+            if(!endsWithDb)
+            {
+                str_libraryName = str_libraryName + ".db";
+            }
             try
             {
                 fullPathM = System.IO.Directory.GetCurrentDirectory() + "\\Config\\SysData\\" + str_libraryName /*+ ".db"*/;
@@ -1149,7 +1154,7 @@ namespace OTSIncAReportApp
 
             }
             
-            if (resfile.GetSTDName() == "NoSTDDB.db" || m_mbszclass.M_SY.StandardLibraryName== "NoSTDDB.db")
+            if (str_libraryName == "NoSTDDB.db" || m_mbszclass.M_SY.StandardLibraryName== "NoSTDDB.db")
             {
                 m_mbszclass.M_SY.StandardLibraryName = "";
             }