private void button1_Click(object sender, EventArgs e) { this.userStatusControl1.Start(); Proxy.MyWorkItem item1 = new RFDeviceAPP.Proxy.MyWorkItem(1); Proxy.MyWorkItem item2 = new RFDeviceAPP.Proxy.MyWorkItem(2); Proxy.ThreadHelper thread = new RFDeviceAPP.Proxy.ThreadHelper(); thread.AllWorkItemCompleted += new EventHandler(thread_AllWorkItemCompleted); thread.WorkItemCompleted += new EventHandler<RFDeviceAPP.Proxy.WorkItemEventArgs>(thread_WorkItemCompleted); thread.AddWorkItem(item1); thread.AddWorkItem(item2); }
private void rfButtonCommand1_Click(object sender, EventArgs e) { this.userStatusControl1.Start(); Proxy.ThreadHelper thread = new RFDeviceAPP.Proxy.ThreadHelper(); string asnno = this.asntxt.Text; Common.ASN.AdvancedShipNotice asn = new RFDeviceAPP.Common.ASN.AdvancedShipNotice(); Common.ASN.AdvancedShipNoticeHeader asnhead=new RFDeviceAPP.Common.ASN.AdvancedShipNoticeHeader(); asnhead.ReceiptKey = asnno; asn.AdvancedShipNoticeHeader = asnhead; //Proxy.RequestGenerator<Entities.ASN.AdvancedShipNotice> requestgenerator = new RFDeviceAPP.Proxy.RequestGenerator<RFDeviceAPP.Entities.ASN.AdvancedShipNotice>("AdvancedShipNotice", "neo_zhu", "neo_zhu", "EXceed", "FEILI_wmwhse1", asn); Proxy.RequestWorkItem request = new RFDeviceAPP.Proxy.RequestWorkItem(); Proxy.RequestMessage requestmsg=new RFDeviceAPP.Proxy.RequestMessage(RFDeviceAPP.Proxy.enumRequestType.MessageProcessor, RFDeviceAPP.Proxy.enumMessageType.AdvancedShipNotice, RFDeviceAPP.Proxy.enumRequestMethod.list,this.userStatusControl1.LoginUser, RFDeviceAPP.Proxy.enumSendSysId.EXceed,asn); //requestmsg.RequestType=Proxy.enumRequestType.MessageProcessor; //requestmsg.RequestCategory=Proxy.enumRequestCategory.AdvancedShipNotice; //requestmsg.RequestMethod=Proxy.enumRequestMethod.list; //requestmsg.XmlString=requestgenerator.CreateNativeMessage(); request.Request = requestmsg; thread.AllWorkItemCompleted += new EventHandler(thread_AllWorkItemCompleted); thread.WorkItemCompleted += new EventHandler<RFDeviceAPP.Proxy.WorkItemEventArgs>(thread_WorkItemCompleted); thread.AddWorkItem(request); }