Esempio n. 1
0
 public static void ExecCommand(string command)
 {
     try
     {
         if (_con != null)
         {
             _con.ExecCommand(command);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Exception from Semaphore.Infrastructure.Manager.ExecCommand()" + ex.Message);
     }
 }
Esempio n. 2
0
 public static void ExecCommand(string command)
 {
     try
     {
         if (_con != null)
         {
             _con.ExecCommand(command);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Exception from MyLetterManager.PriorityManager.ExecCommand()" + ex.Message);
     }
 }
Esempio n. 3
0
 private void SplitAndExecSubQueries(string query)
 {
     try
     {
         string[] subQueries = query.Split(';');
         foreach (var item in subQueries)
         {
             _con.ExecCommand(item);
         }
     }
     catch (Exception ex)
     {
         Loger.AddRecordToLog(ex.Message);
     }
 }
Esempio n. 4
0
 private static void InsertToDB(OracleConnect con, Record rec, int count)
 {
     try
     {
         string query = "INSERT INTO SUVD.XML_DATA (ID, PROJECT_ID, ID_IN_XML, BLOCK_TITLE, BLOCK_NAME, ITEM_TITLE, ITEM_NAME, ITEM_VALUE, NUM)" +
                        " VALUES(XML_SEQUENCE.NEXTVAL, " +
                        rec.ProjectID + ", " +
                        rec.IdInXml + ", '" +
                        rec.BlockName + "', '" +
                        rec.BlockVariableName + "', '" +
                        rec.ItemName + "', '" +
                        rec.ItemVariableName + "', '" +
                        rec.ItemValue + "', '" +
                        rec.Num + "')";
         con.ExecCommand(query);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.TargetSite + "\n" + ex.Message);
         FileHandler.WriteToFile(ex.TargetSite + "\n" + ex.Message);
     }
 }
Esempio n. 5
0
        private static void TruncateTable()
        {
            string query = GetQuery(3); // "truncate table let_app";

            _con.ExecCommand(query);
        }