lu
2025-02-18 132e1a7f96a7f69a4c344f51fa1492a9a167008f
保存板面
已修改3个文件
49 ■■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/showLayOut.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs
@@ -29,7 +29,7 @@
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
            },this.GetType().FullName);
            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -4,6 +4,7 @@
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Cache;
using System.Net.Http;
@@ -13,6 +14,7 @@
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.Utils.DirectXPaint;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid;
@@ -1699,8 +1701,9 @@
        /// <param name="fileName">字段</param>
        /// <param name="icoName">图标路径</param>
        /// <param name="action"></param>
        public static void SetGridViewParameter(GridView gridView1, PictureBox picCheckBox = null, Form fm = null, string fileName = "checkStatus", string icoName = "", DelegateGetModel action = null)
        public static void SetGridViewParameter(GridView gridView1, PictureBox picCheckBox = null, Form fm = null, string fileName = "checkStatus", string icoName = "", DelegateGetModel action = null, string namespaceFullName = "")
        {
            getGridViewConfig(gridView1, namespaceFullName);
            gridView1.Appearance.HeaderPanel.ForeColor = DevExpress.LookAndFeel.DXSkinColors.ForeColors.ControlText;
            gridView1.OptionsView.ColumnAutoWidth = false;//自动调整列宽
            foreach (GridColumn column in gridView1.Columns)
@@ -1917,6 +1920,47 @@
            return regex.IsMatch(str);
        }
        private static void getGridViewConfig(GridView gridView1, string namespaceFullName)
        {
            if (string.IsNullOrEmpty(namespaceFullName)) return;
            var _obj = new
            {
                formPath = namespaceFullName,
            };
            try
            {
                string strJson = UtilityHelper.HttpPost("", "Fm/GetModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    JObject _job = JObject.Parse(strJson);
                    JArray array = new JArray();
                    foreach (var a in _job["rtnData"]["list"])
                    {
                        array.Add(a);
                    }
                    foreach (GridColumn column in gridView1.Columns)
                    {
                        JToken john = array.FirstOrDefault(t => t["controlId"].ToString().ToUpper() == column.Name.ToString().Trim().ToUpper());
                        if (john != null)
                        {
                            string controlIdx = john["controlIdx"].ToString();
                            string controlVisible = john["controlVisible"].ToString();
                            if (!string.IsNullOrEmpty(controlIdx))
                                column.VisibleIndex = int.Parse(controlIdx);
                            if (!string.IsNullOrEmpty(controlVisible))
                                column.Visible = bool.Parse(controlVisible);
                        }
                    }
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
    /// <summary>
DevApp/Gs.DevApp/UserControl/showLayOut.cs
@@ -65,7 +65,6 @@
                sb.Append(",");
                sb.Append(controlIdx);
            }
            MessageBox.Show(sb.ToString());
            var _obj = new
            {
                applyUserGuid = txt_layOut.SelectedIndex,