UIB010360.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.UIB
  13. {
  14. public partial class UIB010360 : FrmBase
  15. {
  16. public UIB010360()
  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. public void DoQuery()
  30. {
  31. try
  32. {
  33. CoreClientParam ccp = new CoreClientParam();
  34. this.dataSet1.Clear();
  35. ArrayList al = new ArrayList();
  36. if (this.comboBox1.Text.ToString() == "热轧")
  37. {
  38. al.Add("UIB010360_01_HOST.SELECT");
  39. }
  40. else if (this.comboBox1.Text.ToString() == "炼钢")
  41. {
  42. al.Add("UIB010360_01_LG.SELECT");
  43. }
  44. else if (this.comboBox1.Text.ToString() == "酸轧")
  45. {
  46. al.Add("UIB010360_01_SUAN.SELECT");
  47. }
  48. else if (this.comboBox1.Text.ToString() == "连退")
  49. {
  50. al.Add("UIB010360_01_LIAN.SELECT");
  51. }
  52. al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000");
  53. al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999");
  54. ccp.ServerName = "UIB.COM.ComDBQuery";
  55. ccp.MethodName = "doSimpleQuery";
  56. ccp.ServerParams = new object[] { al };
  57. ccp.SourceDataTable = this.dataSet1.Tables[0];
  58. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  59. }
  60. catch (Exception ex)
  61. {
  62. }
  63. }
  64. private void UIB010360_Load(object sender, EventArgs e)
  65. {
  66. try
  67. {
  68. this.comboBox1.SelectedIndex = 0;
  69. }
  70. catch (Exception ex)
  71. {
  72. }
  73. }
  74. private void ultraGrid1_MouseDoubleClick(object sender, MouseEventArgs e)
  75. {
  76. }
  77. private void ultraGrid1_MouseDown(object sender, MouseEventArgs e)
  78. {
  79. try
  80. {
  81. if (this.ultraGrid1.ActiveCell.Column.Key != "DANG_WGT"
  82. && this.ultraGrid1.ActiveCell.Column.Key != "YUE_WGT")
  83. return;
  84. if (this.ultraGrid1.ActiveRow.Cells[this.ultraGrid1.ActiveCell.Column.Index].Text.ToString() == "0")
  85. return;
  86. CUIB010360 frm = new CUIB010360();
  87. frm.ob = this.ob;
  88. frm.pLine = this.comboBox1.Text.ToString();
  89. frm.ordUseTp = this.ultraGrid1.ActiveRow.Cells["ORD_USE_CD"].Text;
  90. System.DateTime dt = System.DateTime.Now;
  91. //string TimeNow = string.Format("{0:yyyyMMddHHmmssffff}", dt);
  92. string TimeNow = string.Format("{0:yyyyMM}", dt);
  93. if (this.ultraGrid1.ActiveCell.Column.Key == "DANG_WGT")//当期
  94. {
  95. frm.sTime = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd") + "000000";
  96. frm.eTime = this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd") + "999999";
  97. }
  98. else if (this.ultraGrid1.ActiveCell.Column.Key == "YUE_WGT")//月累
  99. {
  100. frm.sTime = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMM") + "00000000";
  101. frm.eTime = this.ultraDateTimeEditor2.DateTime.ToString("yyyyMM") + "31999999";
  102. }
  103. frm.ShowDialog();
  104. }
  105. catch (Exception ex)
  106. {
  107. }
  108. }
  109. }
  110. }