dogchang70
2016-01-15 81c46add6b31e0f347da357feaff7ebbdb6a2c36
CCSTrace/CCS/CCSMain.cs
@@ -23,7 +23,8 @@
        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;
@@ -168,7 +169,8 @@
                            // 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"]);
                            }
@@ -283,19 +285,17 @@
                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)
@@ -310,7 +310,7 @@
                else
                    DBConnList.Add(e.getConnection());
            }
            catch (Exception ex)
            catch
            {
                DBConnList.Add(e.getConnection());
            }
@@ -422,9 +422,6 @@
            {
                _PLog = new RecordLog(CCS.LocalVariable.CCS_ListPath + "MAIN.txt");
                _PLog.Error(message);
            }
            catch (Exception ex)
            {
            }
            finally
            {