Browse Source

接口程序调整

章政 7 years ago
parent
commit
ae024da959

+ 14 - 4
UAS_MesDllService(4.0)/MESHelper.cs

@@ -1,7 +1,7 @@
-using Oracle.ManagedDataAccess.Client;
-using System;
+using System;
 using System.Collections.Generic;
 using System.Data;
+using System.Data.OracleClient;
 using System.Runtime.InteropServices;
 using System.Text;
 
@@ -25,6 +25,7 @@ namespace BenQGuru.eMES.DLLService
         bool SetMobileData(string iTSN, string iSN, string iSourceCode, string iMPKind, string iResult, string iErrCode, string flag, out string oErrorMessage);
         bool SetPcbaData(string iSN, string iResCode, string iOperator, string iResult, string iErrCode, out string oErrMessage);
         bool GoMo(string iMO, string iSN, string iResCode, out string oErrMessage);
+        string Test(string Test);
     }
 
     [Guid("41EAB546-6EF4-464A-895A-9C34013A5D8C")]
@@ -913,8 +914,8 @@ namespace BenQGuru.eMES.DLLService
             command.CommandType = CommandType.StoredProcedure;
             for (int i = 0; i < param.Length; i++)
             {
-                //command.Parameters.Add(new OracleParameter(ParamName[i], OracleType.VarChar, 200, ParameterDirection.InputOutput, "", DataRowVersion.Default, true, param[i]));
-                command.Parameters.Add(new OracleParameter(ParamName[i], OracleDbType.Varchar2, 200, param[i], ParameterDirection.InputOutput));
+                command.Parameters.Add(new OracleParameter(ParamName[i], OracleType.VarChar, 200, ParameterDirection.InputOutput, "", DataRowVersion.Default, true, param[i]));
+                //command.Parameters.Add(new OracleParameter(ParamName[i], OracleDbType.Varchar2, 200, param[i], ParameterDirection.InputOutput));
             }
             try
             {
@@ -958,5 +959,14 @@ namespace BenQGuru.eMES.DLLService
                 cmd.Connection.Open();
             }
         }
+
+        public string Test(string Test)
+        {
+            connection = new OracleConnection(ConnectionStrings);
+            connection.Open();
+            command = new OracleCommand("insert into AAAAA(Table_name) values('eqrekjhfbkjbd')",connection);
+            command.ExecuteNonQuery();
+            return connection.ServerVersion;
+        }
     }
 }

BIN
UAS_MesDllService(4.0)/tool/Oracle.DataAccess.dll


BIN
UAS_MesDllService(4.0)/tool/Oracle.ManagedDataAccess.dll


+ 6 - 0
UAS_MesInterface/MESHelper.cs

@@ -25,6 +25,7 @@ namespace BenQGuru.eMES.DLLService
         bool SetMobileData(string iTSN, string iSN, string iSourceCode, string iMPKind, string iResult, string iErrCode, string flag, out string oErrorMessage);
         bool SetPcbaData(string iSN, string iResCode, string iOperator, string iResult, string iErrCode, out string oErrMessage);
         bool GoMo(string iMO, string iSN, string iResCode, out string oErrMessage);
+        int Add(int a, int b);
     }
 
     [Guid("41EAB546-6EF4-464A-895A-9C34013A5D8C")]
@@ -959,5 +960,10 @@ namespace BenQGuru.eMES.DLLService
                 cmd.Connection.Open();
             }
         }
+
+        public int Add(int a, int b)
+        {
+            return a + b;
+        }
     }
 }

+ 0 - 7
UAS_MesInterface/UAS_MesDllService(3.5).csproj

@@ -41,13 +41,6 @@
     <AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=AMD64">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>tool\Oracle.DataAccess.dll</HintPath>
-    </Reference>
-    <Reference Include="Oracle.ManagedDataAccess">
-      <HintPath>tool\Oracle.ManagedDataAccess.dll</HintPath>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Data.OracleClient" />