From 719a47b4aff725d4224b85e2b2079983cb31cf89 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期二, 23 十二月 2025 13:28:36 +0800
Subject: [PATCH] 增加临时查询方案

---
 DevApp/Gs.DevApp/UserControl/ShowFilter.cs |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
index 8a1957c..2a83a73 100644
--- a/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
+++ b/DevApp/Gs.DevApp/UserControl/ShowFilter.cs
@@ -1,6 +1,7 @@
 锘縰sing DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
 using DevExpress.XtraGrid.Columns;
+using DevExpress.XtraGrid.Views.Base.ViewInfo;
 using DevExpress.XtraGrid.Views.Grid;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
@@ -66,8 +67,64 @@
                 if (xtraTabControl1.SelectedTabPageIndex == 1)
                     getPageListQuery();
             };
+            #region 淇濆瓨涓存椂鏌ヨ鏂规 2025-12-23鍔犱笂
+            btnFa.Click += (s, e) =>
+            {
+                gridView1.CloseEditor();
+                gridView1.UpdateCurrentRow();
+                var sbWhere = new StringBuilder();
+                var listGv = new List<FilterEntity>();
+                for (var i = 0; i < gridView1.DataRowCount; i++)
+                {
+                    if (string.IsNullOrEmpty(gridView1.GetRowCellValue(i, "field")
+                            .ToString())
+                        || string.IsNullOrEmpty(gridView1
+                            .GetRowCellValue(i, "fieldWhere").ToString())
+                        || string.IsNullOrEmpty(gridView1
+                            .GetRowCellValue(i, "fieldValue").ToString())
+                       )
+                        continue;
+                    string _fieId, _fileIdDec;
+                    (_fieId, _fileIdDec) =
+                        _getFiled(gridView1.GetRowCellValue(i, "field").ToString());
+                    string _fileWhere, _fileWhereDec;
+                    (_fileWhere, _fileWhereDec) = _getFiled(gridView1
+                        .GetRowCellValue(i, "fieldWhere").ToString());
+                    var _fieldValue = gridView1.GetRowCellValue(i, "fieldValue")
+                        .ToString();
+                    var _fieldType = gridView1.GetRowCellValue(i, "fieldType")
+                      .ToString();
+                    //濡傛灉鏄痩ike 瑕佸姞涓婄櫨鍒嗗彿
+                    if (_fileWhere.Contains("like"))
+                    {
+                        _fileWhere = "like";
+                        _fieldValue = "%" + _fieldValue + "%";
+                    }
+                    listGv.Add(new FilterEntity(_fieId, _fileIdDec, _fileWhere,
+                        _fileWhereDec, _fieldValue, _fieldType));
+                    //鎶婅繖涓猯istGv淇濆瓨鑷虫暟鎹簱
+                }
+                var _obj = new { formPath = _fullName, list = listGv };
+                try
+                {
+                    string strJson = UtilityHelper.HttpPost("", "Fm/SetFormSearchAll", JsonConvert.SerializeObject(_obj));
+                    ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+                    if (_rtn.rtnCode > 0)
+                    {
+                        ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+                    }
+                    else
+                        ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+                }
+                catch (Exception ex)
+                {
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+                }
+            };
+            #endregion
         }
 
+
         /// <summary>
         ///     鏌ヨ闆嗗悎
         /// </summary>

--
Gitblit v1.9.3