Exemple #1
0
 public static bool InsertInDataBase_WithImportText(Globals.delegate_SetControls SetControls, SQLTable m_tbl,DBTableControl dbTables, StringBuilder sDataBaseUsed, bool bRefresh_m_DataTable_Form)
 {
     bool bRet = false;
     List<string> Lines = m_tbl.GetInputControlsData();
     if (Lines != null)
     {
         if (Lines.Count > 0)
         {
             string ErrorMsg = "";
             if (SQLcmd_InsertLines(Lines, dbTables, sDataBaseUsed, ref ErrorMsg))
             {
                 bRet = true;
                 //System.Data.OleDb.OleDbDataAdapter adp=new System.Data.OleDb.OleDbDataAdapter();
                 if (bRefresh_m_DataTable_Form)
                 {
                     if (SetControls != null)
                     {
                         SetControls(m_tbl);
                     }
                 }
             }
             else
             {
                 if (!DBConnectionControl40.DynSettings.bPreviewSQLBeforeExecution)
                 {
                     MessageBox.Show(ErrorMsg);
                 }
             }
         }
     }
     return bRet;
 }