UIE041101.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. namespace Core.LZMes.Client.UIE
  12. {
  13. public partial class UIE041101 : FrmBase
  14. {
  15. public UIE041101()
  16. {
  17. InitializeComponent();
  18. }
  19. public override void ToolBar_Click(object sender, string ToolbarKey)
  20. {
  21. switch (ToolbarKey)
  22. {
  23. case "Query":
  24. this.DoQuery();
  25. break;
  26. case "Save":
  27. this.DoSave();
  28. break;
  29. }
  30. }
  31. public void DoQuery()
  32. {
  33. try
  34. {
  35. if (this.textBox1.Text.Trim() == "") return;
  36. ArrayList al = new ArrayList();
  37. al.Add("UIE041101.SELECT");
  38. al.Add(this.textBox1.Text.Trim());
  39. al.Add(this.textBox2.Text.Trim());
  40. this.dataSet1.Tables[0].Clear();
  41. CoreClientParam ccp = new CoreClientParam();
  42. ccp.ServerName = "UIB.COM.ComDBQuery";
  43. ccp.MethodName = "doSimpleQuery";
  44. ccp.ServerParams = new object[] { al };
  45. ccp.SourceDataTable = this.dataSet1.Tables[0];
  46. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  47. }
  48. catch (Exception ex)
  49. {
  50. System.Diagnostics.Debug.WriteLine(ex.ToString());
  51. }
  52. }
  53. public void DoSave()
  54. {
  55. try
  56. {
  57. if (MessageBox.Show("确定修改?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
  58. return;
  59. if (this.ultraGrid1.ActiveRow == null)
  60. return;
  61. string ordProg = "";
  62. string ordDelDate = "";
  63. string ordPlanDate="";
  64. if (this.ultraComboEditor1.Value != null)//进程状态
  65. {
  66. ordProg = this.ultraComboEditor1.Value.ToString().Trim();
  67. }
  68. if (this.ultraDateTimeEditor1.Value != null)//交货期
  69. {
  70. ordDelDate = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd");
  71. }
  72. if(this.ultraDateTimeEditor2.Value != null)//预排期
  73. {
  74. ordPlanDate=this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd");
  75. }
  76. CoreClientParam ccp = new CoreClientParam();
  77. Hashtable ht = new Hashtable();
  78. ht.Add("i1", this.ultraGrid1.ActiveRow.Cells["ORD_NO"].Text);//合同号
  79. ht.Add("i2", this.ultraGrid1.ActiveRow.Cells["ORD_SEQ"].Text);//行号
  80. ht.Add("i3", ordProg);//进程状态
  81. ht.Add("i4", this.textBox3.Text.Trim());//重量下限
  82. ht.Add("i5", this.textBox4.Text.Trim());//重量上限
  83. ht.Add("i6", ordDelDate);
  84. ht.Add("i7", this.textBox5.Text.Trim());//单重下限
  85. ht.Add("i8", this.textBox6.Text.Trim());//单重上限
  86. ht.Add("i9", ordPlanDate);
  87. ht.Add("i10", this.comboBox1.SelectedIndex.ToString());//修改类型
  88. ht.Add("o11" , "");
  89. ccp.ServerName = "UIB.COM.ComDBProcedure";
  90. ccp.MethodName = "doXmlProcedure";
  91. ccp.ServerParams = new object[] { "UIE041101.CALL", ht };
  92. this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  93. this.DoQuery();
  94. }
  95. catch (Exception ex)
  96. {
  97. System.Diagnostics.Debug.WriteLine(ex.ToString());
  98. }
  99. }
  100. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  101. {
  102. try
  103. {
  104. if (this.ultraGrid1.ActiveRow == null)
  105. return;
  106. this.ultraComboEditor1.Text = "";// this.ultraGrid1.ActiveRow.Cells["ORD_PROG_CD"].Text;//进程状态
  107. this.textBox3.Text = "";//this.ultraGrid1.ActiveRow.Cells["WGT_ACVAL_MIN"].Text;//订单重量下限
  108. this.textBox4.Text = "";//this.ultraGrid1.ActiveRow.Cells["WGT_ACVAL_MAX"].Text;//订单重量上限
  109. this.textBox5.Text = "";//this.ultraGrid1.ActiveRow.Cells["ORD_UNIT_WGT_MIN"].Text;//订单单重下限
  110. this.textBox6.Text = "";//this.ultraGrid1.ActiveRow.Cells["ORD_UNIT_WGT_MAX"].Text;//订单单重上限
  111. this.ultraDateTimeEditor1.Value = "";
  112. this.ultraDateTimeEditor2.Value = "";
  113. }
  114. catch (Exception ex)
  115. {
  116. System.Diagnostics.Debug.WriteLine(ex.ToString());
  117. }
  118. }
  119. private void UIE041101_Load(object sender, EventArgs e)
  120. {
  121. this.comboBox1.SelectedIndex = 0;
  122. }
  123. }
  124. }