lu
3 天以前 906f79ff500541dda3626f12c1a05f2d2e57f7a8
DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.cs
@@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Views.Grid;
@@ -12,6 +6,11 @@
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm.QC
{
@@ -29,22 +28,23 @@
            toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            toolBarMenu1.xlsInService = "XlsInJyxm";
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx( gvMx1);
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1,picCheckBox, this, "checkStatus", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) =>
           {
               Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
           }, tips);
            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            }, lbGuid);
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
        }
        /// <summary>
        ///     分页事件
@@ -55,7 +55,7 @@
        {
            getPageList(curPage);
        }
        /// <summary>
        ///     反审核
        /// </summary>
@@ -85,7 +85,7 @@
        {
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
        }
        /// <summary>
        ///     刷新事件
        /// </summary>
@@ -169,7 +169,7 @@
            var _obj = new MesSysLookupTypes
            {
                Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()),
                LookupTypeCode = txt_lookupTypeCode.Text,
                LookupTypeName = txt_lookupTypeName.Text,
@@ -190,7 +190,9 @@
                    toolBarMenu1.isSetBtn = true;
                    var gridViews = new List<GridView>();
                    gridViews.Add(gvMx1);
                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false,gridViews);
                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gridViews);
                    toolBarMenu1.currentAction = "";
                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                }
            }
            catch (Exception ex)
@@ -205,7 +207,7 @@
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            System.Text.StringBuilder _sbSqlWhere = new StringBuilder( UtilityHelper.GetSearchWhere(_filterList));
            System.Text.StringBuilder _sbSqlWhere = new StringBuilder(UtilityHelper.GetSearchWhere(_filterList));
            _sbSqlWhere.Append("and LOOKUP_TYPE_CODE = 'QCITEM'");
            var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
            var json = JsonConvert.SerializeObject(pgq);
@@ -217,7 +219,7 @@
                {
                    DataTable dt = dd.rtnData.list;
                    gcMain1.BindingContext = new BindingContext();
                    if (dt.Rows.Count > 0)
                    {
                        gcMain1.DataSource = dt;
@@ -226,7 +228,7 @@
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain1, gridView1);
                    pageBar1.TotalPages = dd.rtnData.pages;//总页
                    pageBar1.CurrentPage = curPage;//当前页
                    pageBar1.RecordCount = dd.rtnData.total;//总记录数
@@ -286,7 +288,7 @@
                    }
                    else
                    {
                        UtilityHelper.SetDefaultTable(gcMx1,gvMx1);
                        UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
                    }
                }
                else
@@ -368,7 +370,6 @@
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?"))
                return;
            var _obj = new
            {
                guid = rowGuid,
@@ -394,8 +395,6 @@
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}