d0bf1349b303c085d2cd2e70b21f9cfe1bd7dfa4.svn-base 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. public partial class UIM010270 : FrmBase
  13. {
  14. public UIM010270()
  15. {
  16. InitializeComponent();
  17. }
  18. public override void ToolBar_Click(object sender, string ToolbarKey)
  19. {
  20. switch (ToolbarKey)
  21. {
  22. case "Query":
  23. this.DoQuery();
  24. break;
  25. case "Save":
  26. //this.DoSave();
  27. break;
  28. case "Exit":
  29. this.Close();
  30. break;
  31. }
  32. }
  33. private void DoQuery()
  34. {
  35. string dlivTp = "";
  36. if (ddlTransport.SelectedIndex > -1 && ddlTransport.Value != null)
  37. {
  38. dlivTp = ddlTransport.Value.ToString().Trim();
  39. }
  40. string ordNo = txtOrdNo.Text.ToString();
  41. string specStlGrd = txtSpecStlGrd.Text.ToString();
  42. int hasTot = 0;
  43. if (checkBox1.Checked == true)
  44. {
  45. hasTot = 1;
  46. }
  47. dataSet1.Tables[0].Clear();
  48. CoreClientParam ccp = new CoreClientParam();
  49. ccp.ServerName = "UIM.UIM010270";
  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. this.dataSet2.Clear();
  63. maskedTextBox1.Text = planWgtSum.ToString();
  64. maskedTextBox2.Text = actWgtSum.ToString();
  65. }
  66. private void ultraGrid1_DoubleClickCell(object sender, Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs e)
  67. {
  68. Infragistics.Win.UltraWinGrid.UltraGrid uGrid = (Infragistics.Win.UltraWinGrid.UltraGrid)sender;
  69. string ordNo = uGrid.ActiveRow.Cells["ORD_NO"].Text.Trim();
  70. string ordSeq = uGrid.ActiveRow.Cells["ORD_SEQ"].Text.Trim();
  71. dataSet2.Tables[0].Clear();
  72. CoreClientParam ccp = new CoreClientParam();
  73. ccp.ServerName = "UIM.UIM010270";
  74. ccp.MethodName = "queryCoilResultByOrd";
  75. ccp.ServerParams = new object[] { ordNo, ordSeq };
  76. ccp.SourceDataTable = this.dataSet2.Tables[0];
  77. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  78. }
  79. }
  80. }