Exemple #1
0
 private void btnRestore_Click(object sender, EventArgs e)
 {
     try
     {
         BusinessManager BM = new BusinessManager();
         BOBackup        BO = new BOBackup();
         BO.RestoreLocation = txtBackupPath.Text;
         int rowsAffected = BM.BALRestoreDatabase(BO);
         MessageBox.Show("Database successfully restored", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
         txtBackupPath.Clear();
         btnRestore.Enabled = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #2
0
        public int BALRestoreDatabase(BOBackup Database)
        {
            DBManager DALObject = new DBManager();

            return(DALObject.RestoreDatabase(Database));
        }