Esempio n. 1
0
 private void bttConnect_Click(object sender, EventArgs e)
 {
     if (cbbDatabaseName.SelectedIndex == -1)
     {
         MessageBox.Show("Please choose any database in your server.");
         return;
     }
     if (string.Compare(cbbDatabaseName.SelectedItem.ToString(), "Notary_Contract") == 0)
     {
         this.Hide();
         DialogResult res = MessageBox.Show(db.KiemTraKetNoi(ref err) ? "Connected" : "Fail\n" + err);
         if (res == DialogResult.OK)
         {
             Frm_Main main = new Frm_Main();
             main.Show();
         }
     }
     else
     {
         MessageBox.Show("You need to choose a compatible database for your project.");
     }
 }
Esempio n. 2
0
 public void Frm_Main_Load(object sender, EventArgs e)
 {
     MessageBox.Show(db.KiemTraKetNoi(ref err) ? "Connected" : "Fail\n" + err);
 }