Ejemplo n.º 1
0
        protected override void OnClosing(CancelEventArgs e)
        {
            e.Cancel = MessageBoxHelper.AskQuestion(Properties.Resources.TXT_CONFIRM_EXIT) == false;

            if (!e.Cancel && MessageBoxHelper.AskQuestion(Properties.Resources.QTN_WOULD_YOU_LIKE_BACKUP_DATABASE))
            {
                BackupRestoreManager.BackUp();
            }
        }
Ejemplo n.º 2
0
        public LogInWindowViewModel()
        {
            LogInCommand  = new DelegateCommand <Window>(OnLogIn);
            CancelCommand = new DelegateCommand <Window>(OnCancel);

#if DEBUG
            Username = "******";
#endif

            //Back up the database, if needed
            ISettingsRepository <WorkshopSettings> generalSettings = SeedDataHelper.SeedDatabase();
            BackupRestoreManager.BackupIfRequired(generalSettings.GetWorkshopSettings());
        }
Ejemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            BackupRestoreManager m = new BackupRestoreManager();

            m.Backup("WSArchiverDB.BAK");
        }
Ejemplo n.º 4
0
 private void OnRestoreDatabase(object param)
 {
     BackupRestoreManager.Restore();
 }
Ejemplo n.º 5
0
 private void OnBackupDatabase(object param)
 {
     BackupRestoreManager.BackUp();
 }