public static AdvancedShipNotice CreateSearchByKey(string receiptkey) { AdvancedShipNotice asn = new AdvancedShipNotice(); AdvancedShipNoticeHeader header = new AdvancedShipNoticeHeader(); header.ReceiptKey = receiptkey; asn.AdvancedShipNoticeHeader = header; return asn; }
public static AdvancedShipNotice CreateSearchByLineNum(string receiptkey,string linenum) { AdvancedShipNotice asn = new AdvancedShipNotice(); AdvancedShipNoticeHeader header = new AdvancedShipNoticeHeader(); AdvancedShipNoticeDetail detail = new AdvancedShipNoticeDetail(); detail.ReceiptLineNumber = linenum; header.ReceiptKey = receiptkey; header.AdvancedShipNoticeDetail.Add(detail); asn.AdvancedShipNoticeHeader = header; return asn; }
void threadhelper_WorkItemCompleted(object sender, WorkItemEventArgs e) { InvokeHelper.Invoke(this, "EnableControl", this.Controls, true); int tag = e.WorkItem.Tag; WorkItem item = e.WorkItem; if (item.Response.GetErrorMessage() != string.Empty) { MessageBox.Show(item.Response.GetErrorMessage()); return; } if (tag == 1) { this.asnData = item.Response.Deserialize<AdvancedShipNotice>(); InvokeHelper.Set(this.linenumtxt, "Text", ""); InvokeHelper.Set(this.skutxt, "Text", ""); InvokeHelper.Set(this.qtyreceivedtxt, "Text", ""); InvokeHelper.Set(this.toidtxt, "Text", ""); InvokeHelper.Set(this.toloctxt, "Text", ""); InvokeHelper.Set(this.packkeytxt, "Text", ""); InvokeHelper.Set(this.asnlinedetaillabel, "Text", ""); InvokeHelper.Set(this.skudetaillabel, "Text", ""); if (this.asnData.AdvancedShipNoticeHeader.ReceiptKey == string.Empty) { MessageBox.Show("没有找到收货单数据"); InvokeHelper.Invoke(this.receiptkeytxt, "Focus", null); InvokeHelper.Set(this.asndetaillabel, "Text", string.Format("{1}/{0}", 0, 0)); } else { InvokeHelper.Set(this.asndetaillabel, "Text", string.Format("{1}/{0}", this.asnData.AdvancedShipNoticeHeader.OpenQty, this.getasnrecqtybysku(""))); InvokeHelper.Invoke(this.linenumtxt, "Focus", null); } //this.DataBinding(); //this.statelabel.Text = this.asnData.AdvancedShipNoticeHeader.Status; } else { //this.receiptkeytxt.Text = ""; MessageBox.Show("收货成功"); InvokeHelper.Invoke(this.linenumtxt, "Focus", null); InvokeHelper.Set(this.linenumtxt, "Text", ""); InvokeHelper.Set(this.skutxt, "Text", ""); InvokeHelper.Set(this.qtyreceivedtxt, "Text", ""); InvokeHelper.Set(this.toidtxt, "Text", ""); InvokeHelper.Set(this.toloctxt, "Text", ""); InvokeHelper.Set(this.packkeytxt, "Text", ""); InvokeHelper.Set(this.asnlinedetaillabel, "Text", ""); InvokeHelper.Set(this.skudetaillabel, "Text", ""); InvokeHelper.Set(this.asndetaillabel, "Text", string.Format("{1}/{0}", this.asnData.AdvancedShipNoticeHeader.OpenQty, this.getasnrecqtybysku(""))); } }