private void button5_Click(object sender, EventArgs e)
        {
            ConnectBL BL = new ConnectBL();

            try
            {
                BL.checkConn();
                MessageBox.Show("System is connected to database!");
            }
            catch (OdbcException ex)
            {
                MessageBox.Show(ex.Errors[0].ToString());
            }
        }
 private void button1_Click(object sender, EventArgs e)
 {
     BL = new ConnectBL();
     try
     {
         Properties.Settings.Default.ip       = textBox1.Text;
         Properties.Settings.Default.port     = textBox2.Text;
         Properties.Settings.Default.Database = textBox3.Text;
         Properties.Settings.Default.user     = textBox4.Text;
         Properties.Settings.Default.pass     = textBox5.Text;
         BL.checkConn();
         frmCatering cat = new frmCatering();
         cat.Show();
         Properties.Settings.Default.Save();
         this.Hide();
     }
     catch (OdbcException ex)
     {
         MessageBox.Show(ex.Errors[0].ToString());
     }
 }