/// <summary> /// 新增备份 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnBack_Click(object sender, EventArgs e) { backRestoreEnd = false; btnBack.Enabled = false; button3.Enabled = false; SortpanalBar.Visible = true; UIBLL.DataBaseBackRestoreManager manager = new DataBaseBackRestoreManager(); manager.BackEndEvent += new DataBaseBackRestoreManager.DelBackRestorStateArg(manager_BackEndEvent); manager.CreateLocalBackVesion(); }
/// <summary> /// 还原 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ItemRestore_Click(object sender, EventArgs e) { UIModels.DataBaseBackInfo _ItemInfo = null; if (this._RecordListView.SelectedObjects != null && this._RecordListView.SelectedObjects.Count > 0) { _ItemInfo = (DataBaseBackInfo)this._RecordListView.SelectedObjects[0]; } else { MessageBox.Show("请选中项后再试!"); } ConfirmFrm confirm = new ConfirmFrm("提示", "您确定要还原到所选的版本?", "确定", "取消", 3); if (confirm.ShowDialog() == DialogResult.OK) { backRestoreEnd = false; btnBack.Enabled = false; button3.Enabled = false; SortpanalBar.Visible = true; UIBLL.DataBaseBackRestoreManager manager = new DataBaseBackRestoreManager(); manager.RestoreEndEvent += new DataBaseBackRestoreManager.DelBackRestorStateArg(manager_RestoreEndEvent); manager.RestoreByLocalVesion(_ItemInfo); } }