private void PrintRecord() { string tempFile = AppConfig.GetTempDirectory() + Database.GetGlobalKey() + ".xls"; ExportBackbound.ExportRecord(recordView, tempFile); if (System.IO.File.Exists(tempFile)) { System.Diagnostics.Process.Start(tempFile); } }
private void ExportRecord() { SaveFileDialog fileDialog = new SaveFileDialog(); fileDialog.Title = "导出Excel"; fileDialog.Filter = "Excel (*.xls)|*.xls"; DialogResult dialogResult = fileDialog.ShowDialog(this); if (dialogResult == DialogResult.OK) { ExportBackbound.ExportRecord(recordView, fileDialog.FileName); if (System.IO.File.Exists(fileDialog.FileName)) { System.Diagnostics.Process.Start(fileDialog.FileName); //保存v } } }