private void ExportExcelbutton_Click(object sender, EventArgs e) { var saveFile = DialogClass.SaveFile("2003Excel文件|*.xls", "请选择保存文件路径"); if (string.IsNullOrEmpty(saveFile)) { return; } var modelFile = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Excels", System.Configuration.ConfigurationManager.AppSettings["Statistic"]); try { ExcelParameterManager.ExportExcel(modelFile, saveFile, this.dataGridView1); } catch (Exception ex) { MessageBox.Show("发生错误:" + ex.Message); return; } MessageBox.Show("成果导出!"); }
private void button2_Click(object sender, EventArgs e) { this.SaveFileBox.Text = DialogClass.SaveFile("MBD文件|*.mdb", "合成mdb文件"); }