Пример #1
0
        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);
                this.RL02Sreq = null;
                this.RL02Sres = null;
            }
            else
            {

                this.RL02Sres = response.Deserialize<RL02S_res.Utility>();
                if (RL02Sres != null)
                {
                    foreach (RL02S_res.UtilityHeader header in RL02Sres.UtilityHeaders)
                    {
                        string itemstring = string.Format("{2} {0} {1}", header.DropID, header.Loc, header.OrderKey);
                        if (itemstring.Length > 5)
                        {
                            this.orderlist.Items.Add(itemstring);
                        }
                    }
                    this.fromid.SetFocus();
                }
            }
        }
Пример #2
0
        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();
            }
        }