Example #1
0
 public EditTable_Form(DBTableControl dbTables, SQLTable tbl, TableDockingForm dtF,Globals.delegate_SetControls xSetControls, bool bReadOnly,NavigationButtons.Navigation xnav)
 {
     m_TableDockingForm = dtF;
     this.Icon = Properties.Resources.SmallEditIcon;
     InitializeComponent();
     this.Text = lngRPM.s_EditTable.s + tbl.lngTableName.s + " (" + tbl.TableName + ")";
     usrc_EditRow.Init(dbTables, tbl, xSetControls, bReadOnly,xnav);
 }
Example #2
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;
 }