public void clear() { this.movableunit.Clean(); this.movableunit.SetFocus(); this.sku.Clean(); this.desc.Clean(); this.fromloc.Clean(); this.toloc.Clean(); this.toloc1.Clean(); this.RL021res = null; this.RL02req = null; }
void threadhelper_WorkItemCompleted(object sender, WorkItemEventArgs e) { int tag = e.WorkItem.Tag; WorkItem item = e.WorkItem; string errormsg = item.Response.GetErrorMessage(); if (errormsg != string.Empty) { MessageBox.Show(errormsg); this.RL021res = null; this.RL02req = null; } else { if (tag == 1) { this.RL021res = item.Response.Deserialize<RL021_res.Utility>(); //this.sku.SetText(this.RL021res.UtilityHeader.Sku); this.sku.SetText(this.RL021res.UtilityHeader.skusum); this.fromloc.SetText(this.RL021res.UtilityHeader.FromLoc); this.desc.SetText(this.RL021res.UtilityHeader.Descr); this.toloc1.SetText(this.RL021res.UtilityHeader.ToLoc); //DialogResult result = MessageBox.Show("拣货完成,是否获取新任务?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); //InvokeHelper.Invoke(this, "CloseWindow", result); } if (tag==2) { this.RL02res = item.Response.Deserialize<RL02_res.Utility>(); if (this.RL02res.UtilityHeader.rectype == "2") { MessageBox.Show("订单集货完成", "提示"); } else { MessageBox.Show("已集货", "提示"); } this.clear(); } } }
public void NSPRFRL021_1() { //this.Start(); this.RL021req = RL021_req.Utility.Create(this.movableunit.Text); RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor, enumMessageType.Utility, enumRequestMethod.functionOperation, this.loginuser, enumSendSysId.EXceed, this.RL021req); //RequestWorkItem workitem = new RequestWorkItem(requestmessage, 1); //threadhelper.AddWorkItem(workitem); ResponseMessage Response = ThreadHelper.Execute(requestmessage); string errormsg = Response.GetErrorMessage(); if (errormsg != string.Empty) { MessageBox.Show(errormsg); this.RL021res = null; this.RL02req = null; } else { this.RL021res = Response.Deserialize<RL021_res.Utility>(); //this.sku.SetText(this.RL021res.UtilityHeader.Sku); //this.sku.SetText(this.RL021res.UtilityHeader.skusum); //this.fromloc.SetText(this.RL021res.UtilityHeader.FromLoc); //this.desc.SetText(this.RL021res.UtilityHeader.Descr); this.toloc1.SetText(this.RL021res.UtilityHeader.ToLoc); //this.totagtxt.SetText(this.RL021res.UtilityHeader.totag); //DialogResult result = MessageBox.Show("拣货完成,是否获取新任务?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); //InvokeHelper.Invoke(this, "CloseWindow", result); } }