1
lu
2025-04-03 b54d247ffc912c4af1c96fe05bc6ca1630a77be0
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
@@ -6,7 +6,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -28,6 +27,7 @@
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
@@ -41,8 +41,9 @@
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            this.txt_OrgName.EditChanged += (s, e) => {
                string _orgId = txt_OrgName.GetId();
            this.txt_fSubsidiary.EditChanged += (s, e) =>
            {
                string _orgId = txt_fSubsidiary.GetId();
                if (string.IsNullOrEmpty(_orgId))
                    return;
                txt_suppId.getSuppler(_orgId);
@@ -50,21 +51,23 @@
            };
            txt_itemId.EditChanged += (s, e) =>
            {
                txt_itemNo.Text = this.txt_itemId.GetCode();
                if (!string.IsNullOrEmpty(this.txt_itemId.GetCode()))
                    txt_itemNo.Text = this.txt_itemId.GetCode();
            };
            txt_suppId.EditChanged += (s, e) =>
            {
                txtGysNo.Text = this.txt_suppId.GetCode();
                if (!string.IsNullOrEmpty(this.txt_suppId.GetCode()))
                    txt_suppNo.Text = this.txt_suppId.GetCode();
            };
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
            Task.Delay(100);
            getPageList(1);
        }
        /// <summary>
        /// 分页事件
        /// </summary>
@@ -84,7 +87,7 @@
            gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
            gridView1.ActiveFilter.Clear();
            gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
            var frm = new ShowFilter(gridView1.Columns, _filterList);
              var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
            frm.UpdateParent += Frm_UpdateParent;
            frm.ShowDialog();
        }
@@ -185,7 +188,7 @@
                return;
            }
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
            UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true);
        }
        /// <summary>
        /// 新增事件
@@ -196,7 +199,7 @@
        {
            lbGuid.Text = "";
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
            UtilityHelper.CleanValueByControl(panel1.Controls, true);
            UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true);
        }
        /// <summary>
        /// 保存事件
@@ -208,7 +211,7 @@
            toolBarMenu1.isSetBtn = false;
            string _ItemId = txt_itemId.GetId();
            string _suppNo = txt_suppId.GetId();
            string _orgId = txt_OrgName.GetId();
            string _orgId = txt_fSubsidiary.GetId();
            //if (string.IsNullOrEmpty(_orgId))
            //{
            //    Gs.DevApp.ToolBox.MsgHelper.Warning("请选择组织!");
@@ -243,7 +246,7 @@
                {
                    lbGuid.Text = _rtn.rtnData;
                    toolBarMenu1.isSetBtn = true;
                    UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false);
                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
                }
            }
            catch (Exception ex)
@@ -270,16 +273,16 @@
                if (dd.rtnCode > 0)
                {
                    DataTable dt = dd.rtnData.list;
                    gcMain.BindingContext = new BindingContext();
                    gcMain1.BindingContext = new BindingContext();
                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                    if (dt.Rows.Count > 0)
                    {
                        gcMain.DataSource = dt;
                        gcMain.ForceInitialize();
                        gridView1.BestFitColumns();
                        gcMain1.DataSource = dt;
                        gcMain1.ForceInitialize();
                        gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain, gridView1);
                        UtilityHelper.SetDefaultTable(gcMain1, gridView1);
                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                    pageBar1.TotalPages = dd.rtnData.pages;//总页
                    pageBar1.CurrentPage = curPage;//当前页
@@ -324,8 +327,7 @@
                {
                    dynamic dy = _rtn.rtnData;
                    lbGuid.Text = strGuid;
                    UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit);
                    UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
@@ -411,7 +413,5 @@
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}