Explorar o código

方法顺序调整

章政 %!s(int64=7) %!d(string=hai) anos
pai
achega
79ff8006f9
Modificáronse 1 ficheiros con 38 adicións e 38 borrados
  1. 38 38
      UAS_MesInterface(4.0)/MesHelper.cs

+ 38 - 38
UAS_MesInterface(4.0)/MesHelper.cs

@@ -13,14 +13,14 @@ namespace BenQGuru.eMES.DLLService
     [InterfaceType(ComInterfaceType.InterfaceIsDual)]
     public interface IMESHelper
     {
-        [DispId(17)]
+        [DispId(16)]
         bool CheckRoutePassed(string iSN, string iResCode, out string oErrMessage);
         bool GetRcardMOInfo(string iSN, out string oMoCode, out string oErrMessage);
-        bool GetMaster(out string Master);
-        bool SetMaster(string Master);
         bool CheckUserAndResourcePassed(string iUserCode, string iResCode, string iPassWord, out string oErrMessage);
         bool GetAddressRangeByMO(string iSN, out string oWIFI, out string oBT, out string oCode1, out string oCode2, out string oCdoe3, out string oErrMessage);
         bool SetAddressInfo(string iSN, string iWIFI, string iBT, string iCode1, string iCode2, string iCode3, out string oErrorMessage);
+        bool GetMaster(out string oMaster);
+        bool SetMaster(string Master);
         bool SetTestDetail(string iSN, string iTestResult, string iResCode, string[] iTestDetail, out string oErrMessage);
         bool GetMEIOrNetCodeRange(string iSnCode, string iIMEI1, string iNetCode, out string oIMEI1, out string oIMEI2, out string oMEID, out string oNetCode, out string oPSN, out string oID1, out string oID2, out string oID3, out string oID4, out string oID5, out string oErrMessage);
         bool SetIMEIInfo(string iSnCode, string iIMEI1, out string oErrMessage);
@@ -586,6 +586,41 @@ namespace BenQGuru.eMES.DLLService
             return CS_SetFinish(iMakeCode, iSourceCode, iSN, iUserCode, iResult, out oErrMessage);
         }
 
+        [Description("获取账套信息")]
+        public bool GetMaster(out string oMaster)
+        {
+            MasterDB = (DataTable)ExecuteSql("select ms_pwd,ma_user,ma_inneraddress from master", "select");
+            oMaster = "";
+            for (int i = 0; i < MasterDB.Rows.Count; i++)
+            {
+                if (i != MasterDB.Rows.Count - 1)
+                    oMaster += MasterDB.Rows[i]["ma_user"].ToString() + "|";
+                else
+                    oMaster += MasterDB.Rows[i]["ma_user"].ToString();
+            }
+            return true;
+        }
+
+        [Description("设置账套信息")]
+        public bool SetMaster(string iMaster)
+        {
+            DataTable dt = (DataTable)ExecuteSql("select ms_pwd,ma_user,ma_inneraddress from master where ma_user='" + iMaster + "'", "select");
+            if (dt.Rows.Count > 0)
+            {
+                ConnectionStrings = "Data Source=" + dt.Rows[0]["ma_inneraddress"].ToString() + "/orcl;User ID=" + iMaster + ";PassWord=" + dt.Rows[0]["ms_pwd"].ToString() + ";";
+                try
+                {
+                    connection = new OracleConnection(ConnectionStrings);
+                }
+                catch (Exception)
+                {
+                    return false;
+                }
+                return true;
+            }
+            return false;
+        }
+
         /// <summary>
         /// 设置测试结果
         /// </summary>
@@ -1173,40 +1208,5 @@ namespace BenQGuru.eMES.DLLService
                 cmd.Connection.Open();
             }
         }
-
-        [Description("获取账套信息")]
-        public bool GetMaster(out string oMaster)
-        {
-            MasterDB = (DataTable)ExecuteSql("select ms_pwd,ma_user,ma_inneraddress from master", "select");
-            oMaster = "";
-            for (int i = 0; i < MasterDB.Rows.Count; i++)
-            {
-                if (i != MasterDB.Rows.Count - 1)
-                    oMaster += MasterDB.Rows[i]["ma_user"].ToString() + "|";
-                else
-                    oMaster += MasterDB.Rows[i]["ma_user"].ToString();
-            }
-            return true;
-        }
-
-        [Description("设置账套信息")]
-        public bool SetMaster(string iMaster)
-        {
-            DataTable dt = (DataTable)ExecuteSql("select ms_pwd,ma_user,ma_inneraddress from master where ma_user='" + iMaster + "'", "select");
-            if (dt.Rows.Count > 0)
-            {
-                ConnectionStrings = "Data Source=" + dt.Rows[0]["ma_inneraddress"].ToString() + "/orcl;User ID=" + iMaster + ";PassWord=" + dt.Rows[0]["ms_pwd"].ToString() + ";";
-                try
-                {
-                    connection = new OracleConnection(ConnectionStrings);
-                }
-                catch (Exception)
-                {
-                    return false;
-                }
-                return true;
-            }
-            return false;
-        }
     }
 }