lg
16 小时以前 719a47b4aff725d4224b85e2b2079983cb31cf89
增加临时查询方案
已修改3个文件
125 ■■■■ 文件已修改
DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/ShowFilter.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/ShowFilter.resx 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/ShowFilter.Designer.cs
@@ -29,6 +29,7 @@
        /// </summary>
        private void InitializeComponent()
        {
            DevExpress.XtraGrid.GridLevelNode gridLevelNode1 = new DevExpress.XtraGrid.GridLevelNode();
            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
@@ -44,8 +45,8 @@
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShowFilter));
            this.panel1 = new System.Windows.Forms.Panel();
            this.btnEsc = new DevExpress.XtraEditors.SimpleButton();
            this.btnQuery = new DevExpress.XtraEditors.SimpleButton();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
@@ -87,6 +88,8 @@
            this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemComboBox3Sql = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox();
            this.gridColumn9 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.btnFa = new DevExpress.XtraEditors.SimpleButton();
            this.btnEsc = new DevExpress.XtraEditors.SimpleButton();
            this.panel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
@@ -119,23 +122,13 @@
            // panel1
            // 
            this.panel1.Controls.Add(this.btnEsc);
            this.panel1.Controls.Add(this.btnFa);
            this.panel1.Controls.Add(this.btnQuery);
            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panel1.Location = new System.Drawing.Point(0, 529);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(734, 44);
            this.panel1.TabIndex = 1;
            //
            // btnEsc
            //
            this.btnEsc.Appearance.Options.UseFont = true;
            this.btnEsc.Dock = System.Windows.Forms.DockStyle.Right;
            this.btnEsc.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16;
            this.btnEsc.Location = new System.Drawing.Point(546, 0);
            this.btnEsc.Name = "btnEsc";
            this.btnEsc.Size = new System.Drawing.Size(94, 44);
            this.btnEsc.TabIndex = 1;
            this.btnEsc.Text = "取消查询";
            // 
            // btnQuery
            // 
@@ -147,7 +140,7 @@
            this.btnQuery.Location = new System.Drawing.Point(640, 0);
            this.btnQuery.Name = "btnQuery";
            this.btnQuery.Size = new System.Drawing.Size(94, 44);
            this.btnQuery.TabIndex = 0;
            this.btnQuery.TabIndex = 3;
            this.btnQuery.Text = "确定查询";
            // 
            // xtraTabControl1
@@ -173,6 +166,9 @@
            // gcMain
            // 
            this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
            gridLevelNode1.RelationName = "Level1";
            this.gcMain.LevelTree.Nodes.AddRange(new DevExpress.XtraGrid.GridLevelNode[] {
            gridLevelNode1});
            this.gcMain.Location = new System.Drawing.Point(0, 0);
            this.gcMain.MainView = this.gridView1;
            this.gcMain.Name = "gcMain";
@@ -592,6 +588,28 @@
            this.gridColumn9.VisibleIndex = 3;
            this.gridColumn9.Width = 94;
            // 
            // btnFa
            //
            this.btnFa.Appearance.Options.UseFont = true;
            this.btnFa.Dock = System.Windows.Forms.DockStyle.Right;
            this.btnFa.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnFa.ImageOptions.Image")));
            this.btnFa.Location = new System.Drawing.Point(459, 0);
            this.btnFa.Name = "btnFa";
            this.btnFa.Size = new System.Drawing.Size(181, 44);
            this.btnFa.TabIndex = 1;
            this.btnFa.Text = "保存为临时查询方案";
            //
            // btnEsc
            //
            this.btnEsc.Appearance.Options.UseFont = true;
            this.btnEsc.Dock = System.Windows.Forms.DockStyle.Right;
            this.btnEsc.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16;
            this.btnEsc.Location = new System.Drawing.Point(365, 0);
            this.btnEsc.Name = "btnEsc";
            this.btnEsc.Size = new System.Drawing.Size(94, 44);
            this.btnEsc.TabIndex = 4;
            this.btnEsc.Text = "取消关闭";
            //
            // ShowFilter
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -638,7 +656,6 @@
        #endregion
        private System.Windows.Forms.Panel panel1;
        private DevExpress.XtraEditors.SimpleButton btnEsc;
        private DevExpress.XtraEditors.SimpleButton btnQuery;
        private DevExpress.XtraTab.XtraTabControl xtraTabControl1;
        private DevExpress.XtraTab.XtraTabPage xtraTabPage1;
@@ -681,5 +698,7 @@
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn17;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn18;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn19;
        private DevExpress.XtraEditors.SimpleButton btnFa;
        private DevExpress.XtraEditors.SimpleButton btnEsc;
    }
}
DevApp/Gs.DevApp/UserControl/ShowFilter.cs
@@ -1,6 +1,7 @@
using 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();
                    //如果是like 要加上百分号
                    if (_fileWhere.Contains("like"))
                    {
                        _fileWhere = "like";
                        _fieldValue = "%" + _fieldValue + "%";
                    }
                    listGv.Add(new FilterEntity(_fieId, _fileIdDec, _fileWhere,
                        _fileWhereDec, _fieldValue, _fieldType));
                    //把这个listGv保存至数据库
                }
                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>
DevApp/Gs.DevApp/UserControl/ShowFilter.resx
@@ -117,4 +117,25 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  <data name="btnFa.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAwdEVYdFRpdGxlAFNhdmU7U2V0dXA7Q3VzdG9taXo7RGVzaWduO1NldHRpbmc7UHJvcGVydMKL
        g6YAAAMMSURBVDhPfZJZT1NRFEavY9TE6JOvvvkTTBRjREQQQiWIIhW0IIq00iK0DIUy1QECiMrkHINR
        VFSMGBxAtBAhOAXFEEUxGpEqtEopk0zLc6+YOMWTrIebnG/tfc/eUqSxsD4ioZBAtYndiQXojHnsNOwn
        QmclPDoDdYQZL/8dqMJTCNiSeBeQfkXSxB+k5FwtAZvicLiG6e0b4vOXQezOQbodA3T1DrDKR0NoVAZ+
        IfEi84dga1weh8/cxDdIR8/XIdo6HbR29PD41Wcetn+i+YWdFd7hhERa8Nmg/1sQFptD/slq1qiilYpP
        RLCl3S6C3Txo+0jjsy6WrdrMxm1mVqu0IiFNn2KaQJJCtfvJKavC0287XT1uJVh6/jH7ShvZW9KAtaiB
        7CIbWUdsZB6+T8ahe6QX1pOWX3tPEYVEW8WFSlau3caKNWF4eKqV0MTk5A8mJhkfn2BsinH5W2DOq5O7
        mSEFb8/AcrACrbmMmJRSdiYXKZXkS+6hUVyDo5iyT2PMPknFtQac4pFHxyZIyr0jC2ZKgZo0kg6UExyR
        Kj+QqDYuhPXKpa/9IzhEwCcolvZOO2evNlB+qY6hkTFMB27JglmSKiyZhOxTBIYlKgK7w405v47B4VH0
        qaVEGgoor7yLd6BOTOcTMaZD9PUPE7/v5g+BX0gCestR/MUeyKe7t5/k3Fpc7hG0SUd4JCayVZuDwVxC
        0/Mu1NF7edr2hlMXH8mC2ZLPBgMxycWsXa8l9dpLTJVtor3b9AmBNfc46TlnaGz9QE1TJzea3tPxwYUx
        8xh5ZTWyYJ603Cvc5uGtEWOMQmW5hV9KjdJen/sb7z46SbMWExmbi7dqFyeutHDF9pbnb5zozcV4eIWu
        FBJhkaQFgoVTLIqz1uB0jYi1HhZrPUB3jwtbcysbNSkcrWzmQv1rnnT0ErDZ+PtayogzU2epqtNnVROb
        Wc1umfTrHDvXQlb+ZdarEyiueKCwLnjPPwXyis4SzPmFuVPMX7xk6Wpf8W6+QQY8/aMK/hL85D9nhkCW
        iV+XZn8H9Gp8pM2jr30AAAAASUVORK5CYII=
</value>
  </data>
</root>