소스 검색

Merge branch 'ZJX' into dev

zhangjiaxin 4 년 전
부모
커밋
5f29b8c1e3

+ 8 - 5
OTSIncAReportApp/OTSTemplateDesigner/OTSReport_TemplateDesignerRM.cs

@@ -186,9 +186,12 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             if (VerifyControlValue() == false)
                 return;
 
-            SaveControls();
+            
 
-            SaveControlsToXml();
+           if ( SaveControlsToXml())
+            {
+                SaveControls();
+            }
         }
 
 
@@ -213,7 +216,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         #endregion
 
         #region 另存到文件
-        private void SaveControlsToXml()
+        private bool SaveControlsToXml()
         {
             string path = string.Empty;
             SaveFileDialog save = new SaveFileDialog();
@@ -221,7 +224,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             save.InitialDirectory = @System.Windows.Forms.Application.StartupPath + "\\Config\\ProData";
             if (save.ShowDialog() != DialogResult.OK)
             {
-                return;
+                return false;
             }
             path = save.FileName;//赋值目录
             if (path != string.Empty)
@@ -378,7 +381,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx.ToString(), "M_KLLBXX", "b_ck_kllb_fdtx");    //放大图像
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_npxx.ToString(), "M_KLLBXX", "b_ck_kllb_npxx");    //能谱图像
             }
-
+            return true;
         }
 
         #endregion

+ 3 - 3
OTSIncAReportTemplate/OTSIncAReportTemplate.cs

@@ -61,7 +61,7 @@ namespace OTSIncAReportTemplate
             //}
 
             //方便测试代码分岐
-            bool bDebug = true;
+            bool bDebug = false;
             if (bDebug == false)
             {
                 m_arg1 = args[0].Replace("^", " ");
@@ -85,7 +85,7 @@ namespace OTSIncAReportTemplate
                 //m_arg4 = "0-983";
                 //m_arg5 = "";
 
-                m_arg1 = "E:\\ResultFile\\beijing20210708\\Sample4\\ReportTemplateDB.db";
+                m_arg1 = "C:\\Users\\admin\\Desktop\\aaa\\Sample1\\ReportTemplateDB.db";
                 m_arg2 = "./Config/ProData/ReportTemplateConfig.xml";
                 m_arg3 = "MainReport";
                 m_arg4 = "100";
@@ -221,7 +221,7 @@ namespace OTSIncAReportTemplate
             }
 
 
-            if (m_mbszclass.M_SY.b_ck_ypsm)//判断样品说明是否显示
+            if (m_mbszclass.M_SY.b_ck_jggk)//判断样品说明是否显示
             {
                 rmReport1.AddDataSet(ls_resultgrid, "ResultGrid");
                 ls_resultgrid.Dispose();

+ 8 - 12
OTSIncAReportTemplate/OTSIncAReportTemplate.csproj

@@ -49,13 +49,16 @@
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     <DebugSymbols>true</DebugSymbols>
-    <OutputPath>..\bin\x64\Debug\</OutputPath>
+    <OutputPath>..\Bin\x64\Debug\</OutputPath>
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <DebugType>full</DebugType>
     <PlatformTarget>x86</PlatformTarget>
-    <GenerateSerializationAssemblies>On</GenerateSerializationAssemblies>
+    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
     <LangVersion>7.3</LangVersion>
     <ErrorReport>prompt</ErrorReport>
+    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <DocumentationFile>
+    </DocumentationFile>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     <OutputPath>..\bin\x64\Release\</OutputPath>
@@ -95,14 +98,9 @@
     <Reference Include="System" />
     <Reference Include="System.ComponentModel.DataAnnotations" />
     <Reference Include="System.Core" />
-    <Reference Include="System.Data.SQLite, Version=1.0.114.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
-      <HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.114.0\lib\net46\System.Data.SQLite.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Data.SQLite.EF6, Version=1.0.114.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
-      <HintPath>..\packages\System.Data.SQLite.EF6.1.0.114.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
-    </Reference>
-    <Reference Include="System.Data.SQLite.Linq, Version=1.0.114.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
-      <HintPath>..\packages\System.Data.SQLite.Linq.1.0.114.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+    <Reference Include="System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\Bin\x64\Debug\ReportTemplateExe\System.Data.SQLite.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
@@ -156,8 +154,6 @@
     </PropertyGroup>
     <Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
     <Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
-    <Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.114.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.114.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
   </Target>
   <Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
-  <Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.114.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.114.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
 </Project>

+ 1 - 1
OTSIncAReportTemplate/SqLiteHelper.cs

@@ -82,7 +82,7 @@ namespace OTSSysMgrTools
                 dbCommand = new SQLiteCommand();
                 dbCommand.Connection = dbConnection;
             }
-            catch (Exception)
+            catch (Exception e)
             {
                 //Log(e.ToString());
             }