コード例 #1
0
ファイル: BackupProcessor.cs プロジェクト: amolwabale/MyData
 void timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     try
     {
         timer.Interval = Helper.Add24HrsInterval;
         log.Info("Next backup will be taken on : " + DateTime.Now.AddMilliseconds(Helper.Add24HrsInterval).ToString(Helper.AppConstants.DateTimeFormat));
         var ObjBackupConfig = ProcessHandler.GetBackConfig();
         BackupHandler.BackupDatabase(ObjBackupConfig);
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
 }
コード例 #2
0
 void TestBackupWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         ImageVisibility(true);
         var ObjBackupConfig = GetBackupConfig();
         ProcessingStatus("Taking Backup @ " + ObjBackupConfig.BackupLocation);
         BackupHandler.BackupDatabase(ObjBackupConfig);
         ImageVisibility(false);
         MessageBox.Show("Test Backup successfull.", "Success");
     }
     catch (Exception)
     {
         ImageVisibility(false);
         //
     }
 }