lu
2024-12-22 f990a7fbeb2576a5d2e3e97d876fee3a54f376a1
细节
已修改13个文件
614 ■■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.cs 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectType.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.Designer.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs 112 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.Designer.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.Designer.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcBtnPrint.Designer.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.cs
@@ -29,30 +29,27 @@
            toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "");
            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.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
            Task.Delay(100);
            getPageList(1);
        }
        /// <summary>
        ///     双击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var rowGuid =
                UtilityHelper.GetCurrentDoubleRow(gridView1,
                    e, "guid");
            if (!string.IsNullOrEmpty(rowGuid))
                getModel(rowGuid, false, 999);
        }
        /// <summary>
@@ -92,7 +89,7 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 0);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
        }
 
        /// <summary>
@@ -103,7 +100,7 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim(), false, 999);
                getModel(lbGuid.Text.Trim());
            else
            {
                _filterList.Clear();
@@ -132,7 +129,8 @@
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
        }
        /// <summary>
@@ -185,7 +183,7 @@
                {
                    lbGuid.Text = _rtn.rtnData;
                    toolBarMenu1.isSetBtn = true;
                    getModel(lbGuid.Text, false, 1);
                    getModel(lbGuid.Text);
                }
            }
            catch (Exception ex)
@@ -236,15 +234,16 @@
            }
        }
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid)
        {
            bool isEdit = false;
            if (toolBarMenu1.currentAction == "add") return;
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
            var _obj = new
            {
                guid = strGuid //主建
@@ -322,7 +321,7 @@
                        JsonConvert.SerializeObject(lst));
                    var _rtn =
                        UtilityHelper.ReturnToDynamic(strJson);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
                    MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                }
@@ -376,9 +375,9 @@
                if (_rtn.rtnCode > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                        getModel(lbGuid.Text.Trim(), false, 999);
                        getModel(lbGuid.Text.Trim());
                    else
                        getPageList(1);
                        getPageList(this.pageBar1.CurrentPage);
                }
            }
            catch (Exception ex)
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs
@@ -25,10 +25,17 @@
            this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1);
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            txt_pid.EditChanged += (s, e) =>
            {
                txt_typeMemo.Text = this.txt_pid.GetMemo();
@@ -41,17 +48,7 @@
            await Task.Delay(100);
            getPageList(1);
        }
        /// <summary>
        /// 双击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
            if (!string.IsNullOrEmpty(rowGuid))
                getModel(rowGuid, false, 999);
        }
        /// <summary>
        /// 分页事件
        /// </summary>
@@ -93,7 +90,7 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 0);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
        }
        /// <summary>
@@ -121,8 +118,10 @@
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    getPageList(1);
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                        getPageList(this.pageBar1.CurrentPage);
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
@@ -140,7 +139,7 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim(), false, 999);
                getModel(lbGuid.Text.Trim());
            else
            {
                _filterList.Clear();
@@ -167,7 +166,8 @@
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
        }
        /// <summary>
        /// 新增事件
@@ -176,9 +176,9 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 1);
            lbGuid.Text = "";
            UtilityHelper.CleanValueByControl(this.panel1.Controls, true);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
            UtilityHelper.CleanValueByControl(panel1.Controls, true);
        }
        /// <summary>
@@ -285,14 +285,16 @@
        /// <param name="strGuid">主键</param>
        /// <param name="isEdit">是否可编辑</param>
        /// <param name="tabIdx">选项卡序号</param>
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid)
        {
            bool isEdit = false;
            if (toolBarMenu1.currentAction == "add") return;
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
            var _obj = new
            {
                guid = strGuid,//主建
@@ -306,7 +308,6 @@
                    dynamic dy = _rtn.rtnData;
                    lbGuid.Text = strGuid;
                    UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit);
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectType.cs
@@ -25,8 +25,17 @@
            this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
        }
@@ -36,17 +45,7 @@
            await Task.Delay(100);
            getPageList(1);
        }
        /// <summary>
        /// 双击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
            if (!string.IsNullOrEmpty(rowGuid))
                getModel(rowGuid, false, 999);
        }
        /// <summary>
        /// 分页事件
        /// </summary>
@@ -88,7 +87,7 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 0);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
        }
        /// <summary>
@@ -116,8 +115,10 @@
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    getPageList(1);
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                        getPageList(this.pageBar1.CurrentPage);
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
@@ -135,7 +136,7 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim(), false, 999);
                getModel(lbGuid.Text.Trim());
            else
            {
                _filterList.Clear();
@@ -162,7 +163,8 @@
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
        }
        /// <summary>
        /// 新增事件
@@ -171,10 +173,9 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 1);
            lbGuid.Text = "";
            UtilityHelper.CleanValueByControl(this.panel1.Controls, true);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
            UtilityHelper.CleanValueByControl(panel1.Controls, true);
        }
        /// <summary>
        /// 保存事件
@@ -221,7 +222,6 @@
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.type_no",
            "asc", "", _sbSqlWhere.ToString());
@@ -265,14 +265,16 @@
        /// <param name="strGuid">主键</param>
        /// <param name="isEdit">是否可编辑</param>
        /// <param name="tabIdx">选项卡序号</param>
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid)
        {
            bool isEdit = false;
            if (toolBarMenu1.currentAction == "add") return;
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
            var _obj = new
            {
                guid = strGuid,//主建
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
@@ -31,11 +31,20 @@
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", "");
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "foneChecked", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
@@ -59,8 +68,7 @@
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    getPageList(1);
                    getPageList(this.pageBar1.CurrentPage);
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
@@ -98,18 +106,7 @@
                lbGuid, txt_sampleSizeNo, gridView1);
            toolBarMenu1.guidKey = rowGuid;
        }
        /// <summary>
        /// 双击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
            if (!string.IsNullOrEmpty(rowGuid))
                getModel(rowGuid, false, 999);
        }
        /// <summary>
        /// 分页事件
        /// </summary>
@@ -150,7 +147,7 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 0);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
        }
        /// <summary>
@@ -178,8 +175,10 @@
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    getPageList(1);
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                        getPageList(this.pageBar1.CurrentPage);
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
@@ -197,7 +196,7 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim(), false, 999);
                getModel(lbGuid.Text.Trim());
            else
            {
                _filterList.Clear();
@@ -224,7 +223,8 @@
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
        }
        /// <summary>
        /// 新增事件
@@ -233,8 +233,8 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 1);
            lbGuid.Text = "";
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
            List<GridView> gridViews = new List<GridView>();
            gridViews.Add(gvMx1);
            gridViews.Add(gvMx2);
@@ -243,6 +243,7 @@
            UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
            txt_createDate.Text = DateTime.Now.ToString("G");
            txt_fversion.Text = "1";
        }
        /// <summary>
        /// 保存事件
@@ -404,14 +405,16 @@
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid)
        {
            bool isEdit = false;
            if (toolBarMenu1.currentAction == "add") return;
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
            var _obj = new
            {
                guid = strGuid,//主建
@@ -499,7 +502,7 @@
                        JsonConvert.SerializeObject(lst));
                    var _rtn =
                        UtilityHelper.ReturnToDynamic(strJson);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
                    MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                }
@@ -538,7 +541,7 @@
                        JsonConvert.SerializeObject(lst));
                    var _rtn =
                        UtilityHelper.ReturnToDynamic(strJson);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
                    MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                }
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.Designer.cs
@@ -226,6 +226,7 @@
            // toolBarMenu1
            // 
            this.toolBarMenu1.chkParameter = "MES_SYS_LOOKUP_TYPES,check_date,check_status,check_by";
            this.toolBarMenu1.currentAction = null;
            this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top;
            this.toolBarMenu1.guidKey = null;
            this.toolBarMenu1.isSetBtn = false;
@@ -292,12 +293,12 @@
            // 
            this.gridColumn1.Caption = "审核时间";
            this.gridColumn1.FieldName = "checkDate";
            this.gridColumn1.MinWidth = 25;
            this.gridColumn1.MinWidth = 250;
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.OptionsColumn.AllowEdit = false;
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 4;
            this.gridColumn1.Width = 94;
            this.gridColumn1.Width = 250;
            // 
            // xtraTabControl1
            // 
@@ -336,7 +337,6 @@
            this.xtraTabPage2.Controls.Add(this.tabMx);
            this.xtraTabPage2.Controls.Add(this.panel1);
            this.xtraTabPage2.Name = "xtraTabPage2";
            this.xtraTabPage2.Size = new System.Drawing.Size(1126, 570);
            this.xtraTabPage2.Text = "数据详细";
            // 
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs
@@ -1,14 +1,11 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.RichEdit.Export;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Views.Base.ViewInfo;
using DevExpress.XtraGrid.Views.Grid;
using Gs.DevApp.DevFrm.QC.Models;
using Gs.DevApp.Entity;
@@ -32,11 +29,20 @@
            toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "");
            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.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
@@ -44,20 +50,6 @@
            Task.Delay(100);
            getPageList(1);
        }
        /// <summary>
        ///     双击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var rowGuid =
                UtilityHelper.GetCurrentDoubleRow(gridView1,
                    e, "guid");
            if (!string.IsNullOrEmpty(rowGuid))
                getModel(rowGuid, false, 999);
        }
        /// <summary>
        ///     分页事件
        /// </summary>
@@ -94,7 +86,7 @@
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 0);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
        }
        /// <summary>
@@ -105,7 +97,7 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim(), false, 999);
                getModel(lbGuid.Text.Trim());
            else
                getPageList(1);
        }
@@ -125,7 +117,8 @@
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
        }
        /// <summary>
@@ -231,15 +224,16 @@
            }
        }
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid)
        {
            bool isEdit = false;
            if (toolBarMenu1.currentAction == "add") return;
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
            var _obj = new
            {
                guid = strGuid //主建
@@ -319,7 +313,7 @@
                        JsonConvert.SerializeObject(lst));
                    var _rtn =
                        UtilityHelper.ReturnToDynamic(strJson);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
                    MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                }
@@ -371,9 +365,9 @@
                if (_rtn.rtnCode > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                        getModel(lbGuid.Text.Trim(), false, 999);
                        getModel(lbGuid.Text.Trim());
                    else
                        getPageList(1);
                        getPageList(this.pageBar1.CurrentPage);
                }
            }
            catch (Exception ex)
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -29,8 +29,8 @@
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
            toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
            //toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
            //toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "qt015", "", (value) =>
            {
@@ -78,14 +78,53 @@
                MsgHelper.Warning("提示:" + ex.Message);
            }
            gcMx1.MouseClick += GcMx1_MouseClick;
            this.ucBtnPrint1.btnDesignClick += (s, e) =>
            {
                ucBtnPrint1.rptParameter = "rpt_Qtrk{}";
            };
            this.ucBtnPrint1.btnReportClick += (s, e) =>
            {
                ucBtnPrint1.guidKey = "";
                string rowGuid = lbMxGuid.Text.Trim();
                ucBtnPrint1.guidKey = rowGuid;
                if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!");
                    txt_iCount_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!");
                    txt_psnQty_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (lbMxGuid.Text.Trim().Length < 10)
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!");
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                this.ucBtnPrint1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim()
                       + "," + ""
                       + "," + ""
                       + "," + txt_iCount_1.Text.Trim()
                       + "," + txt_psnQty_1.Text.Trim()
                       + "}";
            };
        }
        private   void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
           Task.Delay(100);
            Task.Delay(100);
            getPageList(1);
        }
        /// <summary>
        /// 分页事件
        /// </summary>
@@ -121,52 +160,11 @@
        }
        private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_qtck, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            toolBarMenu1.rptParameter = "rpt_Qtrk{}";
        }
        private void ToolBarMenu1_btnReportClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_qtck, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            if (xtraTabControl1.SelectedTabPageIndex == 0)
            {
                getModel(rowGuid);
                this.toolBarMenu1.rptParameter = "return false";
                return;
            }
            if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!");
                txt_iCount_1.Focus();
                this.toolBarMenu1.rptParameter = "return false";
                return;
            }
            if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!");
                txt_psnQty_1.Focus();
                this.toolBarMenu1.rptParameter = "return false";
                return;
            }
            if (lbMxGuid.Text.Trim().Length < 10)
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!");
                this.toolBarMenu1.rptParameter = "return false";
                return;
            }
            this.toolBarMenu1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim()
                   + "," + ""
                   + "," + ""
                   + "," + txt_iCount_1.Text.Trim()
                   + "," + txt_psnQty_1.Text.Trim()
                   + "}";
        }
        /// <summary>
@@ -363,9 +361,9 @@
        /// </summary>
        /// <param name="curPage">第几页</param>
        /// <param name="pageSize">每页几条</param>
        private   void getPageList(int curPage)
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "qt001", "asc", "", _sbSqlWhere.ToString());
            string json = JsonConvert.SerializeObject(pgq);
@@ -399,7 +397,7 @@
            {
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        private void getModel(string strGuid)
        {
@@ -508,7 +506,7 @@
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private   void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
        private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
        {
            _toolCk(1);
        }
@@ -519,7 +517,7 @@
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="NotImplementedException"></exception>
        private   void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
        private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
        {
            _toolCk(0);
        }
@@ -528,7 +526,7 @@
        /// 工具条事件
        /// </summary>
        /// <param name="inFieldValue"></param>
        private   void _toolCk(int _inFieldValue)
        private void _toolCk(int _inFieldValue)
        {
            string strMsg = "";
            switch (_inFieldValue)
@@ -551,7 +549,7 @@
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?"))
                return;
            var _obj = new
            {
                guid = rowGuid,
@@ -576,7 +574,7 @@
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void GcMx1_MouseClick(object sender, MouseEventArgs e)
@@ -585,7 +583,7 @@
            if (string.IsNullOrEmpty(rowGuid))
                return;
            lbMxGuid.Text = rowGuid;
            toolBarMenu1.guidKey = rowGuid;
            ucBtnPrint1.guidKey = rowGuid;
            var info = gvMx1.CalcHitInfo(e.Location);
            var view = info.View;
            var row = view.GetDataRow(info.RowHandle);
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.Designer.cs
@@ -132,6 +132,7 @@
            this.labelControl11 = new DevExpress.XtraEditors.LabelControl();
            this.lbGuid = new System.Windows.Forms.Label();
            this.picCheckBox = new System.Windows.Forms.PictureBox();
            this.ucBtnPrint1 = new Gs.DevApp.UserControl.UcBtnPrint();
            this.tabMxPage1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit();
@@ -381,6 +382,7 @@
            // 
            // panelMx1
            // 
            this.panelMx1.Controls.Add(this.ucBtnPrint1);
            this.panelMx1.Controls.Add(this.lbMxGuid);
            this.panelMx1.Controls.Add(this.txt_iCount_1);
            this.panelMx1.Controls.Add(this.labelControl14);
@@ -406,7 +408,7 @@
            // 
            // lbMxGuid
            // 
            this.lbMxGuid.Location = new System.Drawing.Point(552, 75);
            this.lbMxGuid.Location = new System.Drawing.Point(821, 14);
            this.lbMxGuid.Name = "lbMxGuid";
            this.lbMxGuid.Size = new System.Drawing.Size(58, 18);
            this.lbMxGuid.TabIndex = 229;
@@ -1341,6 +1343,15 @@
            this.picCheckBox.TabStop = false;
            this.picCheckBox.Visible = false;
            // 
            // ucBtnPrint1
            //
            this.ucBtnPrint1.guidKey = null;
            this.ucBtnPrint1.Location = new System.Drawing.Point(543, 59);
            this.ucBtnPrint1.Name = "ucBtnPrint1";
            this.ucBtnPrint1.rptParameter = null;
            this.ucBtnPrint1.Size = new System.Drawing.Size(218, 41);
            this.ucBtnPrint1.TabIndex = 231;
            //
            // Frm_MesItemTbl
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -1502,5 +1513,6 @@
        private DevExpress.XtraGrid.Columns.GridColumn gvMxDel;
        private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1;
        private System.Windows.Forms.PictureBox picCheckBox;
        private UserControl.UcBtnPrint ucBtnPrint1;
    }
}
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl.cs
@@ -27,8 +27,8 @@
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
            toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
            //toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
            //toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "tbl013", "", (value) =>
            {
@@ -85,6 +85,42 @@
            };
            gcMx1.MouseClick += GcMx1_MouseClick;
            this.ucBtnPrint1.btnDesignClick += (s, e) =>
            {
                ucBtnPrint1.rptParameter = "rpt_SCTL{}";
            };
            this.ucBtnPrint1.btnReportClick += (s, e) =>
            {
                ucBtnPrint1.guidKey = "";
                string rowGuid = lbMxGuid.Text.Trim();
                ucBtnPrint1.guidKey = rowGuid;
                if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!");
                    txt_iCount_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!");
                    txt_psnQty_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (lbMxGuid.Text.Trim().Length < 10)
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!");
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                this.ucBtnPrint1.rptParameter = "rpt_SCTL{" + lbMxGuid.Text.Trim()
                       + "," + ""
                       + "," + ""
                       + "," + txt_iCount_1.Text.Trim()
                       + "," + txt_psnQty_1.Text.Trim()
                       + "}";
            };
        }
        private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.Designer.cs
@@ -134,6 +134,7 @@
            this.txt_createBy = new DevExpress.XtraEditors.TextEdit();
            this.lb_billNo = new DevExpress.XtraEditors.LabelControl();
            this.txt_billNo = new DevExpress.XtraEditors.TextEdit();
            this.ucBtnPrint1 = new Gs.DevApp.UserControl.UcBtnPrint();
            this.tabMxPage2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.gcMx2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvMx2)).BeginInit();
@@ -569,6 +570,7 @@
            // 
            // panelMx1
            // 
            this.panelMx1.Controls.Add(this.ucBtnPrint1);
            this.panelMx1.Controls.Add(this.lbMxGuid);
            this.panelMx1.Controls.Add(this.txt_iCount_1);
            this.panelMx1.Controls.Add(this.labelControl14);
@@ -1319,6 +1321,15 @@
            this.txt_billNo.Size = new System.Drawing.Size(215, 28);
            this.txt_billNo.TabIndex = 211;
            // 
            // ucBtnPrint1
            //
            this.ucBtnPrint1.guidKey = null;
            this.ucBtnPrint1.Location = new System.Drawing.Point(543, 59);
            this.ucBtnPrint1.Name = "ucBtnPrint1";
            this.ucBtnPrint1.rptParameter = null;
            this.ucBtnPrint1.Size = new System.Drawing.Size(218, 41);
            this.ucBtnPrint1.TabIndex = 232;
            //
            // Frm_ArrivalBarcode
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -1472,5 +1483,6 @@
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn6;
        private DevExpress.XtraEditors.LabelControl lbMxGuid;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn10;
        private UserControl.UcBtnPrint ucBtnPrint1;
    }
}
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_ArrivalBarcode.cs
@@ -20,8 +20,8 @@
            InitializeComponent();
            this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
            toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
            //toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick;
            //toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
@@ -50,6 +50,42 @@
                txtSupplierId.Text = this.txt_suppId.GetId();
            };
            gcMx1.MouseClick += GcMx1_MouseClick;
            this.ucBtnPrint1.btnDesignClick += (s, e) =>
            {
                ucBtnPrint1.rptParameter = "rpt_Arrival{}";
            };
            this.ucBtnPrint1.btnReportClick += (s, e) =>
            {
                ucBtnPrint1.guidKey = "";
                string rowGuid = lbMxGuid.Text.Trim();
                ucBtnPrint1.guidKey = rowGuid;
                if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!");
                    txt_iCount_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim()))
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!");
                    txt_psnQty_1.Focus();
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                if (lbMxGuid.Text.Trim().Length < 10)
                {
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!");
                    this.ucBtnPrint1.rptParameter = "return false";
                    return;
                }
                this.ucBtnPrint1.rptParameter = "rpt_Arrival{" + lbMxGuid.Text.Trim()
                       + "," + ""
                       + "," + ""
                       + "," + txt_iCount_1.Text.Trim()
                       + "," + txt_psnQty_1.Text.Trim()
                       + "}";
            };
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
DevApp/Gs.DevApp/UserControl/UcBtnPrint.Designer.cs
@@ -28,18 +28,18 @@
        /// </summary>
        private void InitializeComponent()
        {
            this.btnPrint = new DevExpress.XtraEditors.SimpleButton();
            this.btnReport = new DevExpress.XtraEditors.SimpleButton();
            this.btnDesign = new DevExpress.XtraEditors.SimpleButton();
            this.SuspendLayout();
            // 
            // btnPrint
            // btnReport
            // 
            this.btnPrint.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.printernetwork_16x16;
            this.btnPrint.Location = new System.Drawing.Point(115, 4);
            this.btnPrint.Name = "btnPrint";
            this.btnPrint.Size = new System.Drawing.Size(94, 29);
            this.btnPrint.TabIndex = 3;
            this.btnPrint.Text = "确定打印";
            this.btnReport.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.printernetwork_16x16;
            this.btnReport.Location = new System.Drawing.Point(115, 4);
            this.btnReport.Name = "btnReport";
            this.btnReport.Size = new System.Drawing.Size(94, 29);
            this.btnReport.TabIndex = 3;
            this.btnReport.Text = "确定打印";
            // 
            // btnDesign
            // 
@@ -48,13 +48,13 @@
            this.btnDesign.Name = "btnDesign";
            this.btnDesign.Size = new System.Drawing.Size(94, 29);
            this.btnDesign.TabIndex = 2;
            this.btnDesign.Text = "模板设置";
            this.btnDesign.Text = "打印设计";
            // 
            // UcBtnPrint
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.btnPrint);
            this.Controls.Add(this.btnReport);
            this.Controls.Add(this.btnDesign);
            this.Name = "UcBtnPrint";
            this.Size = new System.Drawing.Size(214, 36);
@@ -64,7 +64,7 @@
        #endregion
        private DevExpress.XtraEditors.SimpleButton btnPrint;
        private DevExpress.XtraEditors.SimpleButton btnReport;
        private DevExpress.XtraEditors.SimpleButton btnDesign;
    }
}
DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs
@@ -1,4 +1,10 @@
using DevExpress.XtraEditors;
using DevExpress.Utils.VisualEffects;
using DevExpress.XtraBars;
using DevExpress.XtraEditors;
using Gs.DevApp.DevFrm.Rpt;
using Gs.DevApp.DevFrm.Sys;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -16,6 +22,105 @@
        public UcBtnPrint()
        {
            InitializeComponent();
            btnReport.Click += BtnReport_ItemClick;
            btnDesign.Click += BtnDesign_ItemClick;
        }
        /// <summary>
        ///     关键字,一般是主键
        /// </summary>
        public string guidKey { get; set; }
        /// <summary>
        ///     报表,在数据库中要唯一,如:存储过程名{入参1名|入参值,入参2名|入参值}
        /// </summary>
        public string rptParameter { get; set; }
        /// <summary>
        /// 设置报表
        /// </summary>
        public event EventHandler btnDesignClick;
        /// <summary>
        /// 报表
        /// </summary>
        public event EventHandler btnReportClick;
        private void BtnReport_ItemClick(object sender, EventArgs e)
        {
            if (btnReportClick != null)
                btnReportClick(this, e);
            else
                return;
            if (rptParameter == "return false")
                return;
            if (string.IsNullOrEmpty(rptParameter))
            {
                MsgHelper.ShowError("没有指定报表参数,请联系技术开发人员!");
                return;
            }
            var _bl = false;
            _bl = _ckRptService();
            if (_bl)
            {
                var frm = new RptPreview(guidKey, rptParameter);
                frm.ShowDialog();
                return;
            }
            MsgHelper.ShowError("没有设计模板,请先设计模板!");
        }
        private void BtnDesign_ItemClick(object sender, EventArgs e)
        {
            if (btnDesignClick != null)
                btnDesignClick(this, e);
            else
                return;
            if (string.IsNullOrEmpty(rptParameter))
            {
                MsgHelper.ShowError("没有指定报表参数,请联系技术开发人员!");
                return;
            }
            var _bl = false;
            _bl = _ckRptService();
            //如果已经有模板了,直接打开设置模板
            if (_bl)
            {
                var frm = new EasyRptDesign(guidKey, rptParameter);
                frm.ShowDialog();
                return;
            }
            //否则向导设计模板
            var rptWizard = new ShowRptWizard(guidKey, rptParameter);
            rptWizard.ShowDialog();
        }
        private bool _ckRptService()
        {
            try
            {
                var _obj = new
                {
                    guid = guidKey,
                    rptParameter,
                    isDesign = 1
                };
                var strJson = UtilityHelper.HttpPost("", "Report/GetRptData",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0) return true;
                return false;
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
                return true;
            }
            return false;
        }
    }
}