Beispiel #1
0
        void thread_WorkItemCompleted(object sender, RFDeviceAPP.Proxy.WorkItemEventArgs e)
        {
            Console.WriteLine(e.WorkItem.Response);
            if (string.IsNullOrEmpty(e.WorkItem.Response.GetErrorMessage()))
            {
                Common.ASN.AdvancedShipNotice responseasn = e.WorkItem.Response.Deserialize<Common.ASN.AdvancedShipNotice>();
                Proxy.InvokeHelper.Set(this.asntxt, "Text", responseasn.AdvancedShipNoticeHeader.ReceiptKey);
                Proxy.InvokeHelper.Set(this.owntxt, "Text", responseasn.AdvancedShipNoticeHeader.ReceiptDate);
                Proxy.InvokeHelper.Set(this.recqtytxt, "Text", responseasn.AdvancedShipNoticeHeader.OpenQty);
                Proxy.InvokeHelper.Set(this.recedqty, "Text", calTotalQty(responseasn.AdvancedShipNoticeHeader.AdvancedShipNoticeDetail).ToString());
                //this.owntxt.Text = responseasn.AdvancedShipNoticeHeader.ReceiptDate;
                //this.recedqty.Text = responseasn.AdvancedShipNoticeHeader.OpenQty;

                BindingList<Common.ASN.AdvancedShipNoticeDetail> detail = new BindingList<RFDeviceAPP.Common.ASN.AdvancedShipNoticeDetail>(responseasn.AdvancedShipNoticeHeader.AdvancedShipNoticeDetail);
                //this.dataGrid1.DataSource = detail;
                Proxy.InvokeHelper.Set(this.dataGrid1, "DataSource", detail);
            }
            else
            {
                MessageBox.Show(e.WorkItem.Response.GetErrorMessage(),"错误", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
            }
        }
 public FrmStockResultDetail(RFDeviceAPP.Common.NSPRFIQ01.Response.Utility result)
 {
     InitializeComponent();
     this.addToList(result.UtilityHeaders);
     this.WindowState = FormWindowState.Maximized;
 }
 public FrmStockResult(RFDeviceAPP.Common.NSPRFIQ01.Response.Utility result)
 {
     InitializeComponent();
     this.databinding(result.UtilityHeaders);
 }
        public void NSPRFRL02(string movableunit, RFDeviceAPP.Common.NSPRFRL021.Response.UtilityHeader header, int tag, string to)
        {
            RFDeviceAPP.Common.NSPRFRL02.Request.Utility RL02req = new RFDeviceAPP.Common.NSPRFRL02.Request.Utility();
            RL02req.UtilityHeader.caseid = header.CaseID;
            RL02req.UtilityHeader.desc = header.Descr;
            RL02req.UtilityHeader.fromloc = header.FromLoc;
            RL02req.UtilityHeader.fromtag = header.fromtag;
            RL02req.UtilityHeader.lotnum = header.lotnum;
            RL02req.UtilityHeader.MovableUnit = movableunit;
            RL02req.UtilityHeader.sku = header.Sku;
            RL02req.UtilityHeader.storer = header.storer;
            RL02req.UtilityHeader.toloc = to;
            RL02req.UtilityHeader.toqty = header.Qty;
            RL02req.UtilityHeader.totag = header.totag;
            RL02req.UtilityHeader.uom = header.UOM;
            RL02req.UtilityHeader.userid = this.LoginUser.UserName;

            RequestMessage requestmessage = new RequestMessage(enumRequestType.MessageProcessor,
                  enumMessageType.Utility,
                  enumRequestMethod.functionOperation, this.LoginUser,
                  enumSendSysId.EXceed,
                  RL02req);
            //RequestWorkItem workitem = new RequestWorkItem(requestmessage, 100+tag);
            //threadhelper.AddWorkItem(workitem);
            ResponseMessage Response = ThreadHelper.Execute(requestmessage);
            string errormsg = Response.GetErrorMessage();
            if (errormsg != string.Empty)
            {
                MessageBox.Show(errormsg);
                return;

            }
            else
            {
                this.dropid.Clean();
                this.dropid.SetFocus();
                MessageBox.Show(string.Format("{0}上架完成", movableunit));
                this.deleteitem(movableunit);
            }
        }