| | |
| | | public static System.Collections.ArrayList ProcessCases = new System.Collections.ArrayList();
|
| | |
|
| | | private string LoadFilename = "DBConfig.xml";
|
| | | private string ConnectionString = "";
|
| | | private string ConnectionString = String.Empty;
|
| | | private string traceConnectionString = String.Empty;
|
| | | private int ConnectionCount = 1;
|
| | | public static System.Data.OracleClient.OracleConnection MainConn = null;
|
| | | static SEventLog _MainLog = null;
|
| | |
| | | // Step 3: 讀取 FileInfo 標籤的屬性
|
| | | if (LocalName.Equals("DBSetting"))
|
| | | {
|
| | | ConnectionString = reader["ConnectionString"];
|
| | | ConnectionString = String.Format("Data source={0};User Id={1};Password={2};", reader["DataSource"], reader["UserId"], reader["Password"]) ;
|
| | | traceConnectionString = String.Format("{0}/{1}@{2}", reader["UserId"], reader["Password"], reader["DataSource"]);
|
| | | ConnectionCount = Int32.Parse(reader["ConnectionCount"]);
|
| | | LocalVariable.ShowError = bool.Parse(reader["ShowError"]);
|
| | | }
|
| | |
| | | if (_Conn.State.ToString().Equals("Closed"))
|
| | | _Conn.Open();
|
| | |
|
| | | ProcessEvent _ProcessEvent = new ProcessEvent(_Record,_Conn);
|
| | | ProcessEvent _ProcessEvent = new ProcessEvent(_Record, _Conn, traceConnectionString);
|
| | | _ProcessEvent.ThreadFinish += new ThreadEndEventHandler(ThreadEndEventProcess);
|
| | |
|
| | | System.Threading.ThreadStart _ThreadStart = new System.Threading.ThreadStart(_ProcessEvent.Run);
|
| | | System.Threading.Thread _Thread = new System.Threading.Thread(_ThreadStart);
|
| | | _Thread.Start();
|
| | | }
|
| | | catch (Exception e)
|
| | | catch
|
| | | {
|
| | | DBConnList.Add(_Conn);
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | private void ThreadEndEventProcess(object sender, ThreadEndEvent e)
|
| | |
| | | else
|
| | | DBConnList.Add(e.getConnection());
|
| | | }
|
| | | catch (Exception ex)
|
| | | catch
|
| | | {
|
| | | DBConnList.Add(e.getConnection());
|
| | | }
|
| | |
| | | {
|
| | | _PLog = new RecordLog(CCS.LocalVariable.CCS_ListPath + "MAIN.txt");
|
| | | _PLog.Error(message);
|
| | | }
|
| | | catch (Exception ex)
|
| | | { |
| | | }
|
| | | finally
|
| | | {
|