public void call_NSPRFRL021SO() { //this.Start(); this.RL02Sreq = RL02S_req.Utility.Create(this.orderkey.Text); RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor, enumMessageType.Utility, enumRequestMethod.functionOperation, this.LoginUser, enumSendSysId.EXceed, this.RL02Sreq); 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); return; } this.RL02Sres = Response.Deserialize<RL02S_res.Utility>(); if (RL02Sres != null) { this.orderlist = new List<OrderItem>(); foreach (RL02S_res.UtilityHeader header in RL02Sres.UtilityHeaders) { if (header.OrderKey.Length > 0) { OrderItem item = new OrderItem(); item.Dropid = header.DropID; item.Orderkey = header.OrderKey; item.Loc = header.Loc; if (item.Orderkey.Length > 0) { this.orderlist.Add(item); } } //string itemstring = string.Format("{2} {0} {1}", header.DropID, header.Loc, header.OrderKey); //if (itemstring.Length > 5) //{ // //InvokeHelper.Invoke(this, "adddroplist", itemstring); // this.adddroplist(itemstring); //} } this.countlable.Text = string.Format("总数: {0}", this.orderlist.Count); this.gridbinding(this.orderlist); this.dropid.SetFocus(); } }
private OrderItem Find(OrderItem orderitem) { foreach (OrderItem item in this.orderlist) { if (item.Dropid == orderitem.Dropid && item.Orderkey == orderitem.Orderkey && item.Loc == orderitem.Loc) { return item; } } return null; }
private void resetlist(List<OrderItem> list) { this.orderlist = new List<OrderItem>(); foreach (OrderItem item in list) { OrderItem newitem = new OrderItem(); newitem.Loc = item.Loc; newitem.Dropid = item.Dropid; newitem.Orderkey = item.Orderkey; orderlist.Add(newitem); } }
private List<OrderItem> CopyForm(List<OrderItem> list,string dropid) { List<OrderItem> copy = new List<OrderItem>(); foreach (OrderItem item in list) { if (!(item.Dropid == dropid || item.Loc == dropid)) { OrderItem newitem = new OrderItem(); newitem.Loc = item.Loc; newitem.Dropid = item.Dropid; newitem.Orderkey = item.Orderkey; copy.Add(newitem); } } return copy; }