Эх сурвалжийг харах

XML数据库地址格式配置

章政 7 жил өмнө
parent
commit
56f139604a

+ 5 - 5
UAS_XmlAnalysor/App.config

@@ -11,22 +11,22 @@
     <userSettings>
         <UAS_XmlAnalysor.Properties.Settings>
             <setting name="FolderPath" serializeAs="String">
-                <value/>
+                <value />
             </setting>
             <setting name="BackUpFolderPath" serializeAs="String">
-                <value/>
+                <value />
             </setting>
             <setting name="Source" serializeAs="String">
-                <value/>
+                <value />
             </setting>
             <setting name="Master" serializeAs="String">
-                <value/>
+                <value />
             </setting>
             <setting name="AutoStart" serializeAs="String">
                 <value>False</value>
             </setting>
             <setting name="MES" serializeAs="String">
-                <value>Data Source=117.25.180.218/orcl;User ID=MES;PassWord=select!#%*(</value>
+                <value>Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=UAS_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.17.158.219)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</value>
             </setting>
         </UAS_XmlAnalysor.Properties.Settings>
     </userSettings>

+ 2 - 2
UAS_XmlAnalysor/Form1.cs

@@ -48,7 +48,7 @@ namespace UAS_XmlAnalysor
             stw.StartPosition = FormStartPosition.CenterScreen;
             stw.ShowDialog();
             List<string> CacheInf = new List<string>();
-            dt = (DataTable)dh.ExecuteSql("select ms_pwd,ma_user,ma_address from master", "select");
+            dt = (DataTable)dh.ExecuteSql("select ms_pwd,ma_user,ma_address,ma_inneraddress from master", "select");
             Master.DataSource = dt;
             Master.DisplayMember = "ma_user";
             Master.ValueMember = "ma_user";
@@ -108,7 +108,7 @@ namespace UAS_XmlAnalysor
             {
                 if (Master.Text == dt.Rows[i]["ma_user"].ToString())
                 {
-                    DataHelper.DBConnectionString = "Data Source=" + dt.Rows[i]["ma_address"] + ";User ID=" + dt.Rows[i]["ma_user"] + ";PassWord=" + dt.Rows[i]["ms_pwd"]; ;
+                    DataHelper.DBConnectionString = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=" + dt.Rows[i]["ma_user"].ToString() + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + dt.Rows[i]["ma_inneraddress"].ToString() + ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
                     dh = new DataHelper();
                 }
             }

+ 3 - 1
UAS_XmlAnalysor/Properties/Settings.Designer.cs

@@ -90,7 +90,9 @@ namespace UAS_XmlAnalysor.Properties {
         
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("Data Source=117.25.180.218/orcl;User ID=MES;PassWord=select!#%*(")]
+        [global::System.Configuration.DefaultSettingValueAttribute("Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=UAS_MES;Pooling=f" +
+            "alse;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.17." +
+            "158.219)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));")]
         [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
         public string MES {
             get {

+ 1 - 1
UAS_XmlAnalysor/Properties/Settings.settings

@@ -18,7 +18,7 @@
       <Value Profile="(Default)">False</Value>
     </Setting>
     <Setting Name="MES" Roaming="true" Type="System.String" Scope="User">
-      <Value Profile="(Default)">Data Source=117.25.180.218/orcl;User ID=MES;PassWord=select!#%*(</Value>
+      <Value Profile="(Default)">Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=UAS_MES;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.17.158.219)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));</Value>
     </Setting>
   </Settings>
 </SettingsFile>

+ 15 - 1
UAS_XmlAnalysor/UAS_XmlAnalysor.csproj

@@ -85,7 +85,6 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Deployment" />
     <Reference Include="System.Drawing" />
-    <Reference Include="System.Net.Http" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
   </ItemGroup>
@@ -97,6 +96,12 @@
     <Compile Include="Form1.Designer.cs">
       <DependentUpon>Form1.cs</DependentUpon>
     </Compile>
+    <Compile Include="Form2.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form2.Designer.cs">
+      <DependentUpon>Form2.cs</DependentUpon>
+    </Compile>
     <Compile Include="LoadingCircle.cs">
       <SubType>Component</SubType>
     </Compile>
@@ -114,6 +119,9 @@
     <EmbeddedResource Include="Form1.resx">
       <DependentUpon>Form1.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Form2.resx">
+      <DependentUpon>Form2.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -150,6 +158,12 @@
   <ItemGroup>
     <None Include="Resources\xml_48px_1124003_easyicon.net.ico" />
   </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\UAS_AutoPass\UAS_AutoPass.csproj">
+      <Project>{00071CA1-0410-4E55-BC92-2FF6B160C3AC}</Project>
+      <Name>UAS_AutoPass</Name>
+    </ProjectReference>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.