| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 | using DevComponents.DotNetBar.Layout;using DevComponents.DotNetBar.SuperGrid;using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using WCS_Client.UC;using WCS_Client.Utility;namespace WCS_Client.Frm{    public partial class FrmPalletizingCode : Form    {        public FrmPalletizingCode()        {            InitializeComponent();            InitFrm();        }        private void InitFrm()        {            List<GridColumn> GCList = new List<GridColumn>()            {                SuperGridUtil.Get_GridColumn("Id", "Id", 120),                SuperGridUtil.Get_GridColumn("PalletizingNo", "码垛编号", 120),                SuperGridUtil.Get_GridColumn("PalletizingSonTrayNo", "子托盘编号", 120),                SuperGridUtil.Get_GridColumn("PalletizingSonTrayCode", "子托盘编码", 120),                SuperGridUtil.Get_GridColumn("PalletizingSonTraySize", "子托盘尺寸", 120),                SuperGridUtil.Get_GridColumn("PalletizingBoxNo", "箱子编号",120),                SuperGridUtil.Get_GridColumn("PalletizingBoxSize", "箱子尺寸", 120),                SuperGridUtil.Get_GridColumn("Notes", "备注", 120)            };            List<LayoutControlItem> LCIList = new List<LayoutControlItem>();            LCIList.Add(LCItemUtil.Add_TextboxX("PalletizingNo", "码垛编号:", 20, SubmitMethods, null));            LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "PalletizingNo like '%{0}%'" };            LCIList.Add(LCItemUtil.Add_TextboxX("PalletizingSonTrayCode", "子托盘编码:", 20, SubmitMethods, null));            LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "PalletizingSonTrayCode like '%{0}%'" };            LCIList.Add(LCItemUtil.Add_TextboxX("PalletizingSonTraySize", "子托盘尺寸:", 20, SubmitMethods, null));            LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "PalletizingSonTraySize like '%{0}%'" };            LCIList.Add(LCItemUtil.Add_TextboxX("PalletizingBoxSize", "箱子尺寸:", 20, SubmitMethods, null));            LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "PalletizingBoxSize like '%{0}%'" };            LCIList.Add(LCItemUtil.Add_ButtonX("btn_QDB", "查询", 80, 30, SubmitMethods));            LCIList.Add(LCItemUtil.Add_ButtonX("btn_QClear", "重置", 80, 30, SubmitMethods));            LCIList.Add(LCItemUtil.Add_ButtonX("addPalletizing", "添加码垛信息", 100, 30, SubmitMethods));            LCIList.Add(LCItemUtil.Add_ButtonX("updatePalletizing", "修改码垛信息", 100, 30, SubmitMethods));            uC_QueryPage1.Init_QueryPage(30, true, true, "", GCList, LCIList, QueryPageDataMethods, RefreshRoleMethods, DoubleClikMethod, null, null);            uC_QueryPage1.ClearLCItemValue();            CommonShow.ShowProcessing("正在处理中,请稍候...", this, (obj) =>            {                uC_QueryPage1.RefreshData(1, 0);            }, null);        }        private PageData QueryPageDataMethods(int PageIndex, int PageSize)        {            string _SQLText = @"SELECT * FROM [YONGGUAN_WCS].[dbo].[WCS_PalletizingCode]  where 1=1 ";            string _Orderby = "PalletizingNo asc";            PageData pd = BaseWorkflow.QueryPageData(_SQLText, _Orderby, uC_QueryPage1.GetQueryWhere(), PageIndex, PageSize);            return pd;        }        private void RefreshRoleMethods(bool ChkValue)        {        }        private void DoubleClikMethod(DataRow dr)        {            //wcs_task_no = Convert.ToInt32(dr["TASK_NO"].ToString());            //FrmWCS_TaskDIS_DTL Frm = new FrmWCS_TaskDIS_DTL(wcs_task_no);            //Frm.Show();        }        private void SubmitMethods(string LCName)        {            if (LCName == "btn_QDB")            {                uC_QueryPage1.RefreshData();            }            else if (LCName == "btn_QClear")            {                uC_QueryPage1.ShowOpaqueLayer();                uC_QueryPage1.ClearLCItemValue();                uC_QueryPage1.RefreshData(1, 0);                uC_QueryPage1.HideOpaqueLayer();            }            else if (LCName == "addPalletizing")            {                FrmAddPalletizing addp = new FrmAddPalletizing();                addp.ShowDialog();                uC_QueryPage1.RefreshData(1, 0);            }            else if (LCName == "updatePalletizing")            {                DataTable dt = this.uC_QueryPage1.SCGrid_GetChkRows();                if (dt == null || dt.Rows.Count == 0)                {                    MessageUtil.ShowTips("请选择配置信息。");                    return;                }                var frmupdate = new FrmUpdatePalletizing(dt.Rows[0]);                frmupdate.ShowDialog();                uC_QueryPage1.RefreshData(1, 0);            }        }    }}
 |