using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA06; namespace Core.LZMes.Client.UIJ { public partial class UIJ030060 : FrmBase { public UIJ030060() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; case "Save": this.DoSave(); break; case "Exit": this.Close(); break; } } /// /// 查询需要回退的发运明细 /// private void DoQuery() { string dlivDirNo = this.textBox1.Text.Trim(); this.dataSet1.Tables[0].Clear(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIJ.UIJ03.UIJ030050"; ccp.MethodName = "queryShipRetAll"; ccp.ServerParams = new Object[] { dlivDirNo }; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } /// /// 明细回退 /// private void DoSave() { string dlivDirNo = ""; DataRowCollection drs = this.dataSet1.Tables[0].Rows; if (drs.Count < 1) { MessageBox.Show("没有查询到可以回退的发运明细,请确认后再进行回退操作!"); return; } dlivDirNo = drs[0]["DLIV_DIRNO"].ToString(); String regId = this.UserInfo.GetUserID(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIJ.UIJ03.UIJ030050"; ccp.MethodName = "checkDliv"; ccp.ServerParams = new Object[] { dlivDirNo ,regId}; ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); if (ccp.ReturnCode != 0) return; this.DoQuery(); } } }