| | |
| | | using Yw.Model; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraPrinting; |
| | | using Yw.Model; |
| | | |
| | | namespace Yw.WinFrmUI |
| | | { |
| | |
| | | this.colCalcuHeadLoss.Visible = true; |
| | | this.colSet.Visible = false; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public GridView GetGridView() |
| | | { |
| | | return this.gridView1; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public void ExportToXlsx() |
| | | { |
| | | var filePath = FileDialogHelper.SaveFile("导出Excel文件", "Excel文件|*.xlsx"); |
| | | if (string.IsNullOrEmpty(filePath)) |
| | | { |
| | | return; |
| | | } |
| | | var options = new XlsxExportOptions |
| | | { |
| | | ExportMode = XlsxExportMode.SingleFile, // 导出模式 |
| | | ShowGridLines = true, // 显示网格线 |
| | | TextExportMode = TextExportMode.Value, // 导出文本模式 |
| | | SheetName = "空压机" // 工作表名称 |
| | | }; |
| | | this.gridView1.ExportToXlsx(filePath, options); |
| | | } |
| | | |
| | | } |
| | | } |