Пример #1
0
 void SqlServerManager_RestoreCompeleted(object sender, SqlCompletedEventArgs e)
 {
     this.Invoke(new RestoreCompeleted(OnRestoreCompeleted), new object[] { e });
 }
Пример #2
0
        private void OnRestoreCompeleted(SqlCompletedEventArgs e)
        {
            InitFrom();

            if (e.Error.Number == 3014)
                Methods.ShowStandardMsgBox(FormMessageType.Information, "موفقیت", "پایگاه داده با موفقیت بازیابی شد.");
            else
                Methods.ShowStandardMsgBox(FormMessageType.Information, "خطا", "بازیابی پایگاه داده با خطا مواجه شد." + e.Error.Message);
        }
Пример #3
0
 void SqlServerManager_BackupCompeleted(object sender, SqlCompletedEventArgs e)
 {
     this.Invoke(new BackupCompeleted(OnBackupCompeleted), new object[] { e });
 }
Пример #4
0
        private void OnBackupCompeleted(SqlCompletedEventArgs e)
        {
            InitFrom();

            if (e.Error.Number == 3014)
            {
                if (!string.IsNullOrEmpty(_registrySettingManager.FullBackUpSecondPath))
                {
                    if (File.Exists(_registrySettingManager.FullBackUpSecondPath))
                        File.Delete(_registrySettingManager.FullBackUpSecondPath);

                    File.Copy(_registrySettingManager.FullBackUpFirstPath, _registrySettingManager.FullBackUpSecondPath);
                }

                if (File.Exists(_registrySettingManager.DiffBackUpFirstPath))
                    File.Delete(_registrySettingManager.DiffBackUpFirstPath);

                if (File.Exists(_registrySettingManager.DiffBackUpSecondPath))
                    File.Delete(_registrySettingManager.DiffBackUpSecondPath);

                _registrySettingManager.LastFullBackUpTime = DateTime.Now;
                GetPersianDateTime(DateTime.Now);

                Methods.ShowStandardMsgBox(FormMessageType.Information, "موفقیت", "پشتیبان با موفقیت تهیه شد.");
            }
            else
                Methods.ShowStandardMsgBox(FormMessageType.Information, "خطا", "تهیه پشتیبان با خطا مواجه شد." + e.Error.Message);
        }