ningshuxia
2025-03-20 d1807075581920a8c94a409b11a9c88dd869be1e
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/06-elbow/HydroElbowListCtrl.cs
@@ -1,4 +1,6 @@
using Yw.Model;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraPrinting;
using Yw.Model;
namespace Yw.WinFrmUI
{
@@ -359,6 +361,7 @@
        {
            this.groupForHead.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            this.colDbLocked.Visible = false;
            this.colBeginGroup.Visible = false;
            this.colName.Visible = true;
            this.colCode.Visible = true;
            this.colModelType.Visible = true;
@@ -384,6 +387,7 @@
        {
            this.groupForHead.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            this.colDbLocked.Visible = true;
            this.colBeginGroup.Visible = true;
            this.colName.Visible = true;
            this.colCode.Visible = true;
            this.colModelType.Visible = true;
@@ -409,6 +413,7 @@
        {
            this.groupForHead.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            this.colDbLocked.Visible = true;
            this.colBeginGroup.Visible = true;
            this.colName.Visible = true;
            this.colCode.Visible = true;
            this.colModelType.Visible = true;
@@ -434,6 +439,7 @@
        {
            this.groupForHead.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always;
            this.colDbLocked.Visible = true;
            this.colBeginGroup.Visible = true;
            this.colName.Visible = true;
            this.colCode.Visible = true;
            this.colModelType.Visible = true;
@@ -458,6 +464,7 @@
        {
            this.groupForHead.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
            this.colDbLocked.Visible = true;
            this.colBeginGroup.Visible = true;
            this.colName.Visible = true;
            this.colCode.Visible = true;
            this.colModelType.Visible = true;
@@ -475,6 +482,34 @@
            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);
        }
    }
}