1459980f117361fa61dcdbc4872ab5ca1775e86c.svn-base 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using System.Collections;
  11. namespace Core.LZMes.Client.UIK
  12. {
  13. public partial class UIK010060 : FrmBase
  14. {
  15. public UIK010060()
  16. {
  17. InitializeComponent();
  18. }
  19. private void UIK010060_Load(object sender, EventArgs e)
  20. {
  21. this.ultraCalendarENDTIME.Enabled = false;
  22. this.ultraCalendarSTRATTIME.Enabled = false;
  23. }
  24. public override void ToolBar_Click(object sender, string ToolbarKey)
  25. {
  26. switch (ToolbarKey)
  27. {
  28. case "Query"://查询
  29. this.DoQuery();
  30. break;
  31. }
  32. }
  33. private void ultraCheckEditor1_CheckedChanged(object sender, EventArgs e)
  34. {
  35. if (this.ultraCheckEditor1.Checked)
  36. {
  37. this.ultraCalendarENDTIME.Enabled = true;
  38. this.ultraCalendarSTRATTIME.Enabled = true;
  39. this.ultraCheckAll.Checked = false;
  40. }
  41. if (!this.ultraCheckEditor1.Checked)
  42. {
  43. this.ultraCalendarENDTIME.Enabled = false;
  44. this.ultraCalendarSTRATTIME.Enabled = false;
  45. }
  46. }
  47. private void ultraCheckAll_CheckedChanged(object sender, EventArgs e)
  48. {
  49. try
  50. {
  51. if (this.ultraCheckAll.Checked)
  52. {
  53. this.ultraCheckEditor1.Checked = false;
  54. this.ultraCalendarSTRATTIME.Enabled = false;
  55. this.ultraCalendarENDTIME.Enabled = false;
  56. }
  57. }
  58. catch (Exception Ex)
  59. {
  60. MessageBox.Show(Ex.ToString());
  61. }
  62. }
  63. private void DoQuery()
  64. {
  65. if (this.ultraCalendarENDTIME.Enabled == false && this.ultraCalendarSTRATTIME.Enabled == false)
  66. {
  67. this.ultraCalendarENDTIME.Text = "";
  68. this.ultraCalendarSTRATTIME.Text = "";
  69. }
  70. try
  71. {
  72. string starttiem = this.ultraCalendarSTRATTIME.Text.ToString();
  73. string endtime = this.ultraCalendarENDTIME.Text.ToString();
  74. bool flag = false;
  75. CoreClientParam ccp = new CoreClientParam();
  76. //DataTable dt = new DataTable();
  77. if (this.ultraCheckEditor1.Checked == false && this.ultraCheckAll.Checked == false)
  78. {
  79. MessageBox.Show("请选择查询条件!");
  80. }
  81. else
  82. {
  83. if (this.ultraCheckAll.Checked)
  84. {
  85. this.dataSet1.Tables[0].Clear();
  86. this.ultraCheckAll.Checked = false;
  87. ccp.ServerName = "UIK.UIK01.UIK010060";
  88. ccp.MethodName = "DoQuery";
  89. ccp.ServerParams = new object[] { starttiem, endtime, flag };
  90. ccp.SourceDataTable = this.dataSet1.Tables[0];
  91. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  92. DataRowCollection drc = this.dataSet1.Tables[0].Rows;
  93. if (drc.Count <= 0)
  94. {
  95. MessageBox.Show("暂无酸洗液记录!");
  96. }
  97. this.ultraCalendarENDTIME.Enabled = false;
  98. this.ultraCalendarSTRATTIME.Enabled = false;
  99. return;
  100. }
  101. if (this.ultraCheckEditor1.Checked)
  102. {
  103. flag = true;
  104. this.dataSet1.Tables[0].Clear();
  105. ccp.ServerName = "UIK.UIK01.UIK010060";
  106. ccp.MethodName = "DoQuery";
  107. ccp.ServerParams = new object[] { starttiem, endtime, flag };
  108. ccp.SourceDataTable = this.dataSet1.Tables[0];
  109. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  110. DataRowCollection drc = this.dataSet1.Tables[0].Rows;
  111. if (drc.Count <= 0)
  112. {
  113. MessageBox.Show("暂无酸洗液记录!");
  114. }
  115. this.ultraCheckAll.Checked = false;
  116. this.ultraCalendarENDTIME.Enabled = false;
  117. this.ultraCalendarSTRATTIME.Enabled = false;
  118. return;
  119. }
  120. }
  121. }
  122. catch (Exception Ex)
  123. {
  124. MessageBox.Show(Ex.ToString());
  125. }
  126. }
  127. }
  128. }