FrmLog.cs 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 FrmLog : Form
  11. {
  12. public FrmLog()
  13. {
  14. InitializeComponent();
  15. InitFrm();
  16. }
  17. private void InitFrm()
  18. {
  19. List<GridColumn> GCList = new List<GridColumn>()
  20. {
  21. //SuperGridUtil.Get_GridColumn("LOG_WCSSYSTEM", "WCS系统", 80),
  22. //SuperGridUtil.Get_GridColumn("Log_Level", "消息等级", 80),
  23. //SuperGridUtil.Get_GridColumn("Log_Func", "消息函数", 150),
  24. SuperGridUtil.Get_GridColumn("DEVICE", "所属设备", 80),
  25. SuperGridUtil.Get_GridColumn("MSG", "消息", 500),
  26. //SuperGridUtil.Get_GridColumn("Log_InfoDtl", "消息详情", 500),
  27. //SuperGridUtil.Get_GridColumn("Log_AddUserName", "创建用户", 80),
  28. SuperGridUtil.Get_Datetime_GridColumn("STARTTIME", "创建时间", 130),
  29. SuperGridUtil.Get_GridColumn("UPDATETIME", "结束时间", 130),
  30. SuperGridUtil.Get_Datetime_GridColumn("TIMES", "次数", 130),
  31. //SuperGridUtil.Get_Datetime_GridColumn("Continued", "持续时间", 130)
  32. };
  33. List<LayoutControlItem> LCIList = new List<LayoutControlItem>();
  34. //LCIList.Add(LCItemUtil.Add_TextboxX("Log_Level", "消息等级:", 20, SubmitMethods, null));
  35. //LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "Log_Level like '%{0}%'" };
  36. //LCIList.Add(LCItemUtil.Add_TextboxX("Log_Func", "消息函数:", 20, SubmitMethods, null));
  37. //LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "Log_Func like '%{0}%'" };
  38. LCIList.Add(LCItemUtil.Add_TextboxX("MSG", "消息:", 20, SubmitMethods, null));
  39. LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "MSG like '%{0}%'" };
  40. LCIList.Add(LCItemUtil.Add_ButtonX("btn_QDB", "查询", 80, 30, SubmitMethods));
  41. LCIList.Add(LCItemUtil.Add_ButtonX("btn_QClear", "重置", 80, 30, SubmitMethods));
  42. uC_QueryPage1.Init_QueryPage(57, true, true, "", GCList, LCIList, QueryPageDataMethods, RefreshRoleMethods, DoubleClikMethod, null, null);
  43. uC_QueryPage1.ClearLCItemValue();
  44. CommonShow.ShowProcessing("正在处理中,请稍候...", this, (obj) =>
  45. {
  46. uC_QueryPage1.RefreshData(1, 0);
  47. }, null);
  48. }
  49. private PageData QueryPageDataMethods(int PageIndex, int PageSize)
  50. {
  51. string _SQLText = @"SELECT [MSG],[STARTTIME],[UPDATETIME],[TIMES],[DEVICE] FROM [dbo].[WCS_EXCEPTION] where MSG not like '%接口调用中%' and MSG not like '%并发管控%'";
  52. string _Orderby = "UPDATETIME desc ";
  53. PageData pd = BaseWorkflow.QueryPageData(_SQLText, _Orderby, uC_QueryPage1.GetQueryWhere(), PageIndex, PageSize);
  54. return pd;
  55. }
  56. private void SubmitMethods(string LCName)
  57. {
  58. if (LCName == "btn_QDB")
  59. {
  60. uC_QueryPage1.RefreshData();
  61. }
  62. else if (LCName == "btn_QClear")
  63. {
  64. uC_QueryPage1.ShowOpaqueLayer();
  65. uC_QueryPage1.ClearLCItemValue();
  66. uC_QueryPage1.RefreshData(1, 0);
  67. uC_QueryPage1.HideOpaqueLayer();
  68. }
  69. }
  70. private void DoubleClikMethod(DataRow dr)
  71. {
  72. }
  73. private void RefreshRoleMethods(bool ChkValue)
  74. {
  75. }
  76. }
  77. }