private void Btn_TestConnection_Click(object sender, EventArgs e)
        {
            UpdateConData();

            TestConnectionForm tConForm = new TestConnectionForm(m_ParentForm,m_SQL_Connection,  false, true, m_Title);
            if (tConForm.ShowDialog() == DialogResult.OK)
            {
            //                MessageBox.Show(this, lngConn.s_ConnectionOK.s, "OK");
            }
            else
            {

            }
        }
Exemple #2
0
 public bool CheckDataBaseConnection(Form pParentForm, string sTitle)
 {
     if (IsValidDataBaseConnectionString())
     {
         if (m_DBType == eDBType.SQLITE)
         {
             if (File.Exists(m_conData_SQLITE.DataBaseFile))
             {
                 TestConnectionForm tConForm = new TestConnectionForm(pParentForm, this, true, true, sTitle);
                 if (tConForm.ShowDialog() == DialogResult.OK)
                 {
                     tConForm.Dispose();
                     return true;
                 }
                 else
                 {
                     tConForm.Dispose();
                     return false;
                 }
             }
             else
             {
                 return false;
             }
         }
         else
         {
             TestConnectionForm tConForm = new TestConnectionForm(pParentForm, this, true, true, sTitle);
             if (tConForm.ShowDialog() == DialogResult.OK)
             {
                 tConForm.Dispose();
                 return true;
             }
             else
             {
                 tConForm.Dispose();
                 return false;
             }
         }
     }
     else
     {
         return false;
     }
 }