7830cad6564b99b36e7da6fd342862b05e6fe1e3.svn-base 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. using Infragistics.Win.UltraWinGrid;
  12. namespace Core.LZMes.Client.QCM
  13. {
  14. public partial class QCM0106LG : FrmBase
  15. {
  16. public QCM0106LG()
  17. {
  18. InitializeComponent();
  19. }
  20. public override void ToolBar_Click(object sender, string ToolbarKey)
  21. {
  22. switch (ToolbarKey)
  23. {
  24. case "Query":
  25. this.DoQuery();
  26. break;
  27. }
  28. }
  29. private void DoQuery()
  30. {
  31. //查询
  32. try
  33. {
  34. this.dataSet1.Clear();
  35. string starttime = "";
  36. string endtime = "";
  37. starttime = this.dateTimePicker1.Value.ToString("yyyyMMdd");
  38. endtime = this.dateTimePicker2.Value.ToString("yyyyMMdd");
  39. string sbatchno = this.textBox1.Text.ToString();
  40. string prod_line = "";
  41. if (this.comboBox3.Text.ToString() == "一炼钢")
  42. {
  43. prod_line = "4001LG0";
  44. }
  45. else if (this.comboBox3.Text.ToString() == "二炼钢")
  46. {
  47. prod_line = "4001LGX";
  48. }
  49. CoreClientParam ccp = new CoreClientParam();
  50. ccp.ServerName = "QCM.QCM01.QCM0106.QueryDefect";
  51. ccp.MethodName = "QueryLG";
  52. ccp.ServerParams = new object[] { starttime, endtime, prod_line, sbatchno };
  53. ccp.SourceDataTable = this.dataSet1.Tables[0];
  54. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  55. }
  56. catch (Exception ex)
  57. {
  58. System.Diagnostics.Debug.WriteLine(ex.ToString());
  59. }
  60. }
  61. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  62. {
  63. }
  64. }
  65. }