private void button1_Click(object sender, EventArgs e) { OpenSQLFile.InitialDirectory = Environment.CurrentDirectory + "\\Connections\\Backup"; DialogResult dr = OpenSQLFile.ShowDialog(); if (dr == DialogResult.OK) { string fin = OpenSQLFile.FileName; //Connections.DataConnections.DataConnectionClass.Backup_DB.RestoreDBBackup(fin); } }
/// <summary> /// Restore database from backup file /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { OpenSQLFile.InitialDirectory = Environment.CurrentDirectory + "\\Connections\\Backup"; DialogResult dr = OpenSQLFile.ShowDialog(); if (dr == DialogResult.OK) { Connections.DataConnections.DataConnectionClass.AuditLogConnClass.AddRecordToAudit("recovered or restored the database"); string fin = OpenSQLFile.FileName; Connections.DataConnections.DataConnectionClass.Backup_DB.RestoreDBBackup(fin); } }