1.窗体设计:2个button(1个备份(BtnDataBackup),1个恢复(BtnDataRecovery)),1个label(labMsg);1个openFileDialog1(打开选择文件对话窗口);
2:代码
using System.IO;
private void BtnDataBackup_Click(object sender, EventArgs e) { //数据备份按钮 string dbFilePath = Application.StartupPath + @"\data\orders.db"; string dbNewFilePath=Application.StartupPath +