a526e82351aae3e1bf95d33925e4272bb7d29849.svn-base 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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.UIJ
  11. {
  12. public partial class UIJ060030 : FrmBase
  13. {
  14. public UIJ060030()
  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. /// <summary>
  34. /// 查询需要回退的发运明细
  35. /// </summary>
  36. private void DoQuery()
  37. {
  38. string dlivDirNo = this.textBox1.Text.Trim();
  39. this.dataSet1.Tables[0].Clear();
  40. CoreClientParam ccp = new CoreClientParam();
  41. ccp.ServerName = "UIJ.UIJ06.UIJ060030";
  42. ccp.MethodName = "queryShipRetRs";
  43. ccp.ServerParams = new Object[] { dlivDirNo };
  44. ccp.SourceDataTable = this.dataSet1.Tables[0];
  45. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  46. }
  47. private void DoUpdate()
  48. {
  49. if (DialogResult.Yes != MessageBox.Show("请确保需要回退的数据为异常指示号!", "提示", MessageBoxButtons.YesNo))
  50. {
  51. return;
  52. }
  53. string dlivDirNo = this.textBox1.Text.Trim();
  54. if (dlivDirNo == "")
  55. {
  56. MessageBox.Show("指示号不能为空");
  57. return;
  58. }
  59. CoreClientParam ccp = new CoreClientParam();
  60. ccp.ServerName = "UIJ.UIJ06.UIJ060030";
  61. ccp.MethodName = "update";
  62. ccp.ServerParams = new object[] { dlivDirNo };
  63. ccp.SourceDataTable = this.dataSet1.Tables[0];
  64. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  65. }
  66. /// <summary>
  67. /// 查询异常明细
  68. /// </summary>
  69. private void query1()
  70. {
  71. string dlivDirNo = this.textBox1.Text.Trim();
  72. this.dataSet1.Tables[0].Clear();
  73. CoreClientParam ccp = new CoreClientParam();
  74. ccp.ServerName = "UIJ.UIJ06.UIJ060030";
  75. ccp.MethodName = "queryShipRetRsNoCarNo";
  76. ccp.ServerParams = new Object[] { dlivDirNo };
  77. ccp.SourceDataTable = this.dataSet1.Tables[0];
  78. this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
  79. }
  80. /// <summary>
  81. /// 明细回退
  82. /// </summary>
  83. private void DoSave()
  84. {
  85. string dlivDirNo = "";
  86. DataRowCollection drs = this.dataSet1.Tables[0].Rows;
  87. if (drs.Count < 1)
  88. {
  89. MessageBox.Show("没有查询到可以回退的发运明细,请确认后再进行回退操作!");
  90. return;
  91. }
  92. dlivDirNo = drs[0]["DLIV_DIRNO"].ToString();
  93. String regId = this.UserInfo.GetUserID();
  94. CoreClientParam ccp = new CoreClientParam();
  95. ccp.ServerName = "UIJ.UIJ06.UIJ060030";
  96. ccp.MethodName = "returnShipResult";
  97. ccp.ServerParams = new Object[] { dlivDirNo, regId };
  98. ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
  99. if (ccp.ReturnCode != 0)
  100. return;
  101. this.DoQuery();
  102. }
  103. private void label2_Click(object sender, EventArgs e)
  104. {
  105. this.query1();
  106. }
  107. private void button1_Click(object sender, EventArgs e)
  108. {
  109. this.DoUpdate();
  110. }
  111. }
  112. }