1
Fork 0

added passback from addbackupwizard to reuse form, and added edit button handler

This commit is contained in:
Jake Howard 2015-01-12 11:23:26 +00:00
parent 90ea4ec576
commit 391d4485de

View file

@ -12,6 +12,7 @@ namespace Saviour_Backup_System
{
public partial class backupViewer : Form
{
private Int64 selectedDriveCreationDate = 0;
public backupViewer() {
InitializeComponent();
}
@ -34,5 +35,20 @@ namespace Saviour_Backup_System
}
private void button2_Click(object sender, EventArgs e){ dataGridView.SelectAll(); }
public void passBack(string backupName, string BackupLocation, bool automatic, bool compression, int previousBackups)
{
databaseTools.updateDriveRecord(backupName, BackupLocation, automatic, compression, previousBackups, selectedDriveCreationDate);
setup.ABW.Close();
}
private void editButton_Click(object sender, EventArgs e)
{
selectedDriveCreationDate = (Int64)dataGridView.SelectedRows[0].Cells[1].Value;
setup.ABW = new addBackupWizard();
setup.ABW.createButton.Text = "Update";
setup.ABW.drivesDropdown.Enabled = false;
setup.ABW.ShowDialog();
}
}
}