private void ButtonBackup_Click(object sender, EventArgs e) { try { buttonChangeFolder.Enabled = false; buttonBackup.Enabled = false; string Res = BackupOperaion.BackupDatabaseWithShirink(); Copyfile(Res); LoadTime(); if (FromMain) { this.ParentForm.Close(); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); throw; } finally { buttonChangeFolder.Enabled = true; buttonBackup.Enabled = true; } }
private void buttonBackup_Click(object sender, EventArgs e) { try { string Res = BackupOperaion.BackupDatabaseWithShirink(); Copyfile(Res); } catch (Exception ex) { MessageBox.Show(ex.ToString()); throw; } }