private void 导出平均年龄ToolStripMenuItem_Click(object sender, EventArgs e) { try { DataTable dt = new DataTable(); if (!m_personnerServer.ExcelPersonAge(out dt, out error)) { MessageDialog.ShowPromptMessage(error); return; } else { string[] columns = { }; ExcelHelperP.DataTableToExcel(saveFileDialog1, dt, columns); } } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); } }