7ddf27ab0083159dd8a541634d8f0818bfb4a35b.svn-base 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. namespace Core.LZMes.Client.UIM
  11. {
  12. /// <summary>
  13. /// 轧后库可发量查询
  14. /// </summary>
  15. public partial class UIM010280 : FrmBase
  16. {
  17. public UIM010280()
  18. {
  19. InitializeComponent();
  20. }
  21. public override void ToolBar_Click(object sender, string ToolbarKey)
  22. {
  23. switch (ToolbarKey)
  24. {
  25. case "Query":
  26. this.DoQuery();
  27. break;
  28. case "Save":
  29. //this.DoSave();
  30. break;
  31. }
  32. }
  33. private void DoQuery()
  34. {
  35. string dlivTp = "";
  36. if (-1 < ultraComboEditor1.SelectedIndex)
  37. {
  38. dlivTp = ultraComboEditor1.Value.ToString().Trim();
  39. }
  40. string ordNo = textBox1.Text.ToString();
  41. string specStlGrd = textBox2.Text.ToString();
  42. int hasTot = 0;
  43. if (checkBox1.Checked)
  44. {
  45. hasTot = 1;
  46. }
  47. dataSet1.Tables[0].Clear();
  48. CoreClientParam ccp = new CoreClientParam();
  49. ccp.ServerName = "UIM.UIM010280";
  50. ccp.MethodName = "queryOrdResultForSale";
  51. ccp.ServerParams = new object[] { dlivTp, ordNo, specStlGrd, hasTot };
  52. ccp.SourceDataTable = this.dataSet1.Tables[0];
  53. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  54. double planWgtSum = 0;
  55. double actWgtSum = 0;
  56. DataRowCollection drs = dataSet1.Tables[0].Rows;
  57. for (int i = 0; i < drs.Count; i++)
  58. {
  59. planWgtSum += double.Parse(drs[i]["PLAN_WGT"].ToString());
  60. actWgtSum += double.Parse(drs[i]["ACT_WGT"].ToString());
  61. }
  62. maskedTextBox1.Text = planWgtSum.ToString();
  63. maskedTextBox2.Text = actWgtSum.ToString();
  64. }
  65. private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
  66. {
  67. Infragistics.Win.UltraWinGrid.UltraGrid uGrid = (Infragistics.Win.UltraWinGrid.UltraGrid)sender;
  68. string ordNo = uGrid.ActiveRow.Cells["ORD_NO"].Text.Trim();
  69. string ordSeq = uGrid.ActiveRow.Cells["ORD_SEQ"].Text.Trim();
  70. int hasTot = 0;
  71. if (checkBox1.Checked)
  72. {
  73. hasTot = 1;
  74. }
  75. dataSet2.Tables[0].Clear();
  76. CoreClientParam ccp = new CoreClientParam();
  77. ccp.ServerName = "UIM.UIM010280";
  78. ccp.MethodName = "queryCoilResultByOrd";
  79. ccp.ServerParams = new object[] { ordNo, ordSeq, hasTot };
  80. ccp.SourceDataTable = this.dataSet2.Tables[0];
  81. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  82. }
  83. }
  84. }