bug
lu
3 天以前 fa113f04a917e85af84813487f033fb6bc43a5d7
DevApp/Gs.DevApp/DevFrm/Rpt/CKTmkc.cs
@@ -1,3 +1,4 @@
using Gs.DevApp.DevFrm.BasicData;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -19,6 +20,7 @@
            InitializeComponent();
            this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnPrintClick += ToolBarMenu1_btnPrintClick;
            this.toolBarMenu1.getXmlConfig();
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "", "", (value) =>
            {
@@ -33,6 +35,24 @@
            },lbGuid);
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            //这是仓库标识卡,仅仅打印
            this.ucBtnPrint101.SetPlButton(false);
            this.ucBtnPrint101.btnPrintClick += (s, e) =>
            {
                _print101();
            };
            //加入checkbox begin
            this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); };
            this.gridView1.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain1, gridView1); };
            this.colChkInt.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            this.colChkInt.OptionsFilter.AllowAutoFilter = false;
            this.colChkInt.OptionsFilter.AllowFilter = false;
            this.colChkInt.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False;
            //加入checkbox end
        }
        private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
@@ -164,5 +184,71 @@
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        /// <summary>
        /// 这是单个打印
        /// </summary>
        private void _print101()
        {
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_itemBarcode, gridView1);
            ucBtnPrint101.guidKey = rowGuid;
            if (rowGuid.Length < 36)
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择你要打印的行!");
                this.ucBtnPrint101.rptParameter = "return false";
                return;
            }
            this.ucBtnPrint101.rptParameter = "rpt_cktm{"
                   + ""
                   + "," + ""
                   + "," + ""
                   + "," + ""
                   + "," + ""
                   + "}";
        }
        /// <summary>
        /// 这是批量打印
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnPrintClick(object sender, EventArgs e)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            gridView1.PostEditor();
            gridView1.UpdateCurrentRow();
            DataTable dt = this.gcMain1.DataSource as DataTable;
            {
                foreach (DataRow dr in dt.Rows)
                {
                    string checkBox = dr["chkInt"].ToString();
                    string _guid = dr["guid"].ToString();
                    if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox))
                    {
                        if (sb.Length > 0)
                            sb.Append("|");
                        sb.Append(_guid);
                    }
                }
            }
            if (string.IsNullOrEmpty(sb.ToString()))
            {
                Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先选择物料!");
                this.toolBarMenu1.rptParameter = "return false";
                return;
            }
            this.toolBarMenu1.rptParameter = "rpt_cktm{"
                                               + "100"
                                               + "," + ""
                                               + "," + ""
                                                + "," + ""
                                               + "," + ""
                                               + "," + sb.ToString()
                                               + "}";
            this.toolBarMenu1.guidKey = null;
        }
    }
}