MBtn_SCANN.cs 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using DevComponents.DotNetBar.Layout;
  2. using DevComponents.DotNetBar.SuperGrid;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.Windows.Forms;
  6. using WCS_Client.UC;
  7. using WCS_Client.Utility;
  8. namespace WCS_Client.Frm
  9. {
  10. public partial class MBtn_SCANN : Form
  11. {
  12. public MBtn_SCANN()
  13. {
  14. InitializeComponent();
  15. InitFrm();
  16. }
  17. private void InitFrm()
  18. {
  19. List<GridColumn> GCList = new List<GridColumn>()
  20. {
  21. SuperGridUtil.Get_GridColumn("DEVICECODE", "扫码输送线", 100),
  22. SuperGridUtil.Get_GridColumn("CONTENT", "结果", 200),
  23. SuperGridUtil.Get_GridColumn("UPDATETIME", "扫码时间", 150)
  24. };
  25. List<LayoutControlItem> LCIList = new List<LayoutControlItem>();
  26. LCIList.Add(LCItemUtil.Add_TextboxX("DEVICECODE", "输送线:", 20, SubmitMethods, null));
  27. LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "DEVICECODE like '%{0}%'" };
  28. LCIList.Add(LCItemUtil.Add_ButtonX("btn_QDB", "查询", 80, 30, SubmitMethods));
  29. LCIList.Add(LCItemUtil.Add_ButtonX("btn_QClear", "刷新", 80, 30, SubmitMethods));
  30. uC_QueryPage1.Init_QueryPage(30, true, true, "", GCList, LCIList, QueryPageDataMethods, RefreshRoleMethods, DoubleClikMethod, null, null);
  31. uC_QueryPage1.ClearLCItemValue();
  32. CommonShow.ShowProcessing("正在处理中,请稍候...", this, (obj) =>
  33. {
  34. uC_QueryPage1.RefreshData(1, 0);
  35. }, null);
  36. }
  37. private PageData QueryPageDataMethods(int PageIndex, int PageSize)
  38. {
  39. string _SQLText = @"SELECT [DEVICECODE],[CONTENT],[UPDATETIME] FROM [dbo].[WCS_BCR80] where CONTENT != ' ' ";
  40. string _Orderby = "UPDATETIME desc ";
  41. PageData pd = BaseWorkflow.QueryPageData(_SQLText, _Orderby, uC_QueryPage1.GetQueryWhere(), PageIndex, PageSize);
  42. return pd;
  43. }
  44. private void SubmitMethods(string LCName)
  45. {
  46. if (LCName == "btn_QDB")
  47. {
  48. uC_QueryPage1.RefreshData();
  49. }
  50. else if (LCName == "btn_QClear")
  51. {
  52. uC_QueryPage1.ShowOpaqueLayer();
  53. uC_QueryPage1.ClearLCItemValue();
  54. uC_QueryPage1.RefreshData(1, 0);
  55. uC_QueryPage1.HideOpaqueLayer();
  56. }
  57. //if (LCName == "btn_QDB")
  58. //{
  59. // uC_QueryPage1.RefreshData();
  60. //}
  61. }
  62. private void DoubleClikMethod(DataRow dr)
  63. {
  64. }
  65. private void RefreshRoleMethods(bool ChkValue)
  66. {
  67. }
  68. }
  69. }