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());
            }
        }
        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!");
            }
        }
Exemple #3
0
 public void Import(ConnectBO BO)
 {
     oDAL = new DataAccessLayer();
     oDAL.Restore(BO.path);
 }
Exemple #4
0
 public void CreateDb(ConnectBO BO)
 {
     oDAL = new DataAccessLayer();
     oDAL.addParameter("_database", DbType.String, BO.db);
     oDAL.executeQuery("createDatabase");
 }
Exemple #5
0
 public void Export(ConnectBO BO)
 {
     oDAL = new DataAccessLayer();
     oDAL.Backup(BO.path);
 }