예제 #1
0
파일: Program.cs 프로젝트: fil-dv/XmlParser
        static void Main(string[] args)
        {
            OracleConnect con = new OracleConnect("User ID=import_user;password=sT7hk9Lm;Data Source=CD_WORK");

            con.OpenConnect();
            ReadDataToList(con);
        }
예제 #2
0
 public static void CreateConnect()
 {
     try
     {
         _con = new OracleConnect(AppSettings.DbConnectionString);
         _con.OpenConnect();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Exception from Semaphore.Infrastructure.Manager.CreateConnect()" + ex.Message);
     }
 }
예제 #3
0
 public static void CreateConnect()
 {
     try
     {
         _con = new OracleConnect(AppSettings.DbConnectionString);
         _con.OpenConnect();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Exception from MyLetterManager.LetterManager.CreateConnect()" + ex.Message);
     }
 }
예제 #4
0
        void InitData()
        {
            try
            {
                _con = new OracleConnect("User ID=IMPORT_USER;password=sT7hk9Lm;Data Source=CD_WORK");
                _con.OpenConnect();

                string query = File.ReadAllText(@"sql\CleanDubles.sql", Encoding.Default);

                SplitAndExecSubQueries(query);
                query = File.ReadAllText(@"sql\AddrToSplit.sql", Encoding.Default);
                OracleDataReader reader = _con.GetReader(query);
                _list = new List <string>();
                while (reader.Read())
                {
                    string str = reader[0].ToString() + " ; " + reader[1].ToString().Replace(";", ",");
                    _list.Add(str);
                }
                reader.Close();
                Cleaner();
                FillData();
                SetThreadCount();
                SetNumericUpDownValue();
                if (Mediator.IsIncomParam)
                {
                    button_path.Enabled           = false;
                    button_start.Enabled          = false;
                    numericUpDown_threads.Enabled = false;
                    SetThreadCount();
                    StartSplit();
                }
            }
            catch (Exception ex)
            {
                Loger.AddRecordToLog(ex.Message);
            }
        }