private void LoadHistory() { BackupRestoreInfo BackRes = new BackupRestoreInfo(); DataSet ds = BackRes.GetHistory(); gridControlHistory.DataSource = (DataTable)ds.Tables[0]; }
private void btnExec_Click(object sender, EventArgs e) { if (validate().Count > 0) return; if (xtraTabControl1.SelectedTabPage == xtraTabPageBackup) { if (HelpNoCategory.IsAtDBServer() == true) { BackRes = new BackupRestoreInfo(UserId, bteFileBackup.Text, mmeDesBackup.Text, 'Y'); //TrialWaitingBox.LongProcess(this, new ThreadStart(ExecBackup), -1); //WaitingMsg.LongProcess(ExecBackup); HelpWaiting.showProgressForm(this, ExecBackup); if (!Finish) FWMsgBox.showBackupError(); else { HelpMsgBox.ShowNotificationMessage("Sao lưu thành công."); this.Close(); } } else { HelpMsgBox.ShowNotificationMessage("Sao lưu không thành công. Việc sao lưu dữ liệu chỉ được thực hiện tại máy chủ dữ liệu"); } } else if (xtraTabControl1.SelectedTabPage == xtraTabPageRestore) { if (HelpNoCategory.IsAtDBServer() == true) { BackRes = new BackupRestoreInfo(UserId, bteFileRestore.Text, mmeDesRestore.Text, 'N'); //TrialWaitingBox.LongProcess(this, new ThreadStart(ExecRestore), -1); WaitingMsg.LongProcess(ExecRestore); if (!Finish) FWMsgBox.showRestoreError(); else { HelpMsgBox.ShowNotificationMessage("Phục hồi thành công. Dữ liệu lưu tại thư mục chứa db của ứng dụng với phần mở rộng .bak"); this.Close(); } } else { HelpMsgBox.ShowNotificationMessage("Phục hồi không thành công. Việc phục hồi dữ liệu chỉ được thực hiện tại máy chủ dữ liệu"); } } else if (xtraTabControl1.SelectedTabPage == xtraTabPageHistory) { LoadHistory(); } }