private void btnBak_Click(object sender, EventArgs e) { string fileName = ""; SaveFileDialog saveFile = new SaveFileDialog(); saveFile.DefaultExt = ".bak"; saveFile.ShowDialog(); fileName = saveFile.FileName; if (fileName == "") { return; } baseinfo.BackUp(fileName); MessageBox.Show("数据库备份--成功!", "成功提示", MessageBoxButtons.OK, MessageBoxIcon.Information); }