public void Backup() { if (CloseOk) { DeleteOldestAutoBackup(); } var backup = new BackupRestore { DirectoryName = DirectoryName, BackupPath = DirectoryName + "\\" + FileName + ".Bak" }; backup.BackUpDb(); OkBackUp = backup.BackUpOk; }