using DevComponents.DotNetBar.Layout; using DevComponents.DotNetBar.SuperGrid; using System.Collections.Generic; using System.Data; using System.Windows.Forms; using WCS_Client.UC; using WCS_Client.Utility; namespace WCS_Client.Frm { public partial class MBtn_SCANN : Form { public MBtn_SCANN() { InitializeComponent(); InitFrm(); } private void InitFrm() { List GCList = new List() { SuperGridUtil.Get_GridColumn("DEVICECODE", "扫码输送线", 100), SuperGridUtil.Get_GridColumn("CONTENT", "结果", 200), SuperGridUtil.Get_GridColumn("UPDATETIME", "扫码时间", 150) }; List LCIList = new List(); LCIList.Add(LCItemUtil.Add_TextboxX("DEVICECODE", "输送线:", 20, SubmitMethods, null)); LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "DEVICECODE like '%{0}%'" }; LCIList.Add(LCItemUtil.Add_ButtonX("btn_QDB", "查询", 80, 30, SubmitMethods)); LCIList.Add(LCItemUtil.Add_ButtonX("btn_QClear", "刷新", 80, 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 [DEVICECODE],[CONTENT],[UPDATETIME] FROM [dbo].[WCS_BCR80] where CONTENT != ' ' "; string _Orderby = "UPDATETIME desc "; PageData pd = BaseWorkflow.QueryPageData(_SQLText, _Orderby, uC_QueryPage1.GetQueryWhere(), PageIndex, PageSize); return pd; } 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(); } //if (LCName == "btn_QDB") //{ // uC_QueryPage1.RefreshData(); //} } private void DoubleClikMethod(DataRow dr) { } private void RefreshRoleMethods(bool ChkValue) { } } }