UIK080010.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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 UIK080010 : FrmBase
  14. {
  15. public UIK080010()
  16. {
  17. InitializeComponent();
  18. }
  19. #region 处理化处理
  20. private void UIK080011_Load(object sender, EventArgs e)
  21. {
  22. this.ultraDateTimeEditor1.Enabled = false;
  23. this.ultraDateTimeEditor2.Enabled = false;
  24. }
  25. #endregion
  26. #region 工具栏点击处理
  27. public override void ToolBar_Click(object sender, string ToolbarKey)
  28. {
  29. switch (ToolbarKey)
  30. {
  31. case "Query":
  32. this.DoQuery();
  33. break;
  34. }
  35. }
  36. #endregion
  37. #region 查询方法
  38. public void DoQuery() {
  39. try
  40. {
  41. string start = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000";
  42. string end = this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "595959";
  43. string number = this.textBox1.Text;
  44. bool flag = true;
  45. CoreClientParam ccp = new CoreClientParam();
  46. if (this.ultraCheckEditor1.Checked == false && this.ultraCheckEditor2.Checked == false)
  47. {
  48. MessageBox.Show("请选择查询条件!");
  49. }
  50. else
  51. {
  52. if (this.ultraCheckEditor1.Checked)
  53. {
  54. this.dataSet1.Tables[0].Clear();
  55. this.ultraCheckEditor1.Checked = false;
  56. ccp.ServerName = "UIK.UIK08.UIK080010";
  57. ccp.MethodName = "DoQuery";
  58. ccp.ServerParams = new object[] { start, end,number, flag };
  59. ccp.SourceDataTable = this.dataSet1.Tables[0];
  60. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  61. DataRowCollection drc1 = this.dataSet1.Tables[0].Rows;
  62. if (drc1.Count <= 0)
  63. {
  64. MessageBox.Show("无记录!");
  65. }
  66. this.ultraDateTimeEditor1.Enabled = false;
  67. this.ultraDateTimeEditor2.Enabled = false;
  68. this.ultraCheckEditor2.Checked = false;
  69. return;
  70. }
  71. if (this.ultraCheckEditor2.Checked)
  72. {
  73. flag = false;
  74. this.dataSet1.Tables[0].Clear();
  75. this.ultraCheckEditor2.Checked = false;
  76. ccp.ServerName = "UIK.UIK08.UIK080010";
  77. ccp.MethodName = "DoQuery";
  78. ccp.ServerParams = new object[] { start, end, number, flag };
  79. ccp.SourceDataTable = this.dataSet1.Tables[0];
  80. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  81. DataRowCollection drc1 = this.dataSet1.Tables[0].Rows;
  82. if (drc1.Count <= 0)
  83. {
  84. MessageBox.Show("无记录!");
  85. }
  86. return;
  87. }
  88. }
  89. }catch(Exception Ex){
  90. MessageBox.Show(Ex.ToString());
  91. }
  92. }
  93. #endregion
  94. #region 选框1点击处理
  95. private void ultraCheckEditor1_CheckedChanged(object sender, EventArgs e)
  96. {
  97. if (this.ultraCheckEditor1.Checked){
  98. this.ultraDateTimeEditor1.Enabled = true;
  99. this.ultraDateTimeEditor2.Enabled = true;
  100. this.ultraCheckEditor2.Checked= false;
  101. }
  102. else {
  103. this.ultraDateTimeEditor1.Enabled = false;
  104. this.ultraDateTimeEditor2.Enabled = false;
  105. }
  106. }
  107. #endregion
  108. #region 选框2点击处理
  109. private void ultraCheckEditor2_CheckedChanged(object sender, EventArgs e)
  110. {
  111. if (this.ultraCheckEditor2.Checked) {
  112. this.ultraCheckEditor1.Checked = false;
  113. this.ultraDateTimeEditor1.Enabled = false;
  114. this.ultraDateTimeEditor2.Enabled = false;
  115. }
  116. }
  117. #endregion
  118. }
  119. }