Esempio n. 1
0
        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());
            }
        }
Esempio n. 2
0
        private void button4_Click(object sender, EventArgs e)
        {
            ConnectBL conBL = new ConnectBL();
            ConnectBO conBO = new ConnectBO();

            try
            {
                conBO.db = textBox3.Text;
                conBL.CreateDb(conBO);
            }
            catch (OdbcException ex)
            {
                MessageBox.Show(ex.Errors[0].ToString());
            }
        }
Esempio n. 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            ConnectBL      conBL           = new ConnectBL();
            ConnectBO      conBO           = new ConnectBO();
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            openFileDialog1.InitialDirectory = "c:\\";
            openFileDialog1.Filter           = "All files (*.*)|*.*";
            openFileDialog1.RestoreDirectory = true;

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                conBO.path = openFileDialog1.FileName;
                conBL.Export(conBO);
                MessageBox.Show("Export Completed!");
            }
        }
Esempio n. 4
0
 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());
     }
 }