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