UIB010370.cs 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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 Infragistics.Win.UltraWinGrid;
  10. using CoreFS.CA06;
  11. using System.Collections;
  12. namespace Core.LZMes.Client.UIB
  13. {
  14. public partial class UIB010370 : FrmBase
  15. {
  16. public UIB010370()
  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. case "Save":
  28. this.DoSave();
  29. break;
  30. }
  31. }
  32. private void DoQuery()
  33. {
  34. this.dataSet1.Tables[0].Clear();
  35. ArrayList list = new ArrayList();
  36. list.Add("UIB030370_01.SELECT");
  37. CoreClientParam ccp = new CoreClientParam();
  38. ccp.ServerName = "UIB.COM.ComDBQuery";
  39. ccp.MethodName = "doSimpleQuery";
  40. ccp.ServerParams = new object[] { list };
  41. ccp.SourceDataTable = this.dataSet1.Tables[0];
  42. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  43. Console.WriteLine(this.dataSet1.Tables[0].ToString());
  44. }
  45. private void DoSave()
  46. {
  47. try
  48. {
  49. string ord_no = string.Empty;
  50. string ord_seq = string.Empty;
  51. string stl = string.Empty;
  52. string thk = string.Empty;
  53. string wth = string.Empty;
  54. string regID= this.UserInfo.GetUserName(); ;
  55. Hashtable paramHsmp = new Hashtable();
  56. this.ultraGrid1.UpdateData();
  57. Infragistics.Win.UltraWinGrid.RowsCollection rs = this.ultraGrid1.Rows;
  58. if (rs.Count > 0)
  59. {
  60. for (int i = 0; i < rs.Count; i++)
  61. {
  62. if (rs[i].Cells["CHK"].Text.Trim() == "FALSE")
  63. {
  64. continue;
  65. }
  66. else
  67. {
  68. paramHsmp = new Hashtable();
  69. ord_no = rs[i].Cells["ORD_NO"].Text;
  70. ord_seq = rs[i].Cells["ORD_SEQ"].Text;
  71. stl = rs[i].Cells["C_SPEC_STL_GRD"].Text;
  72. thk = rs[i].Cells["C_ORD_THK"].Text;
  73. wth = rs[i].Cells["C_ORD_WTH"].Text;
  74. paramHsmp.Add("i1", ord_no);
  75. paramHsmp.Add("i2", ord_seq);
  76. paramHsmp.Add("i3", stl);
  77. paramHsmp.Add("i4", thk);
  78. paramHsmp.Add("i5", wth);
  79. paramHsmp.Add("i6", regID);
  80. paramHsmp.Add("o7", "");
  81. CoreClientParam ccp = new CoreClientParam();
  82. ccp.ServerName = "UIB.COM.ComDBProcedure";
  83. ccp.MethodName = "doXmlProcedure";
  84. ccp.ServerParams = new Object[] { "UIB010370_01.CALL", paramHsmp };
  85. this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  86. //提示
  87. //ArrayList all = ccp.ReturnObject as ArrayList;
  88. //if (all[0].ToString() != "YY")//确认是否存在问题
  89. //{
  90. // MessageBox.Show(all[0].ToString(), "提示");
  91. // return;
  92. //}
  93. }
  94. }
  95. this.DoQuery();
  96. }
  97. }
  98. catch (Exception Ey)
  99. {
  100. MessageBox.Show(Ey.ToString());
  101. }
  102. }
  103. }
  104. }