Example #1
0
        private void DataBinding(AdvancedShipNoticeDetail detail)
        {
            decimal expqty = Convert.ToDecimal(detail.QtyExpected);
            decimal recqty = Convert.ToDecimal(detail.QtyReceived);
            decimal rejqty = Convert.ToDecimal(detail.QtyRejected);

            string detailmsg = string.Format("预收:{0}已收:{1}", expqty, recqty);

            InvokeHelper.Set(this.asnlinedetaillabel, "Text", detailmsg);
            InvokeHelper.Set(this.skudetaillabel, "Text", "");
            InvokeHelper.Set(this.packkeytxt, "Text", detail.PackKey);
            if (recqty > 0)
            {
                this.skutxt.Text = detail.Sku;
                this.qtyreceivedtxt.Text = detail.QtyReceived;
                this.toloctxt.Text = detail.ToLoc;
                this.toidtxt.Text = detail.ToId;
            }
            else
            {
                this.skutxt.Text = string.Empty;
                this.qtyreceivedtxt.Text = string.Empty;
                this.toloctxt.Text = string.Empty;
                this.toidtxt.Text = string.Empty;
            }
        }
        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;
        }
        public AdvancedShipNoticeDetail Copy()
        {
            AdvancedShipNoticeDetail detail = new AdvancedShipNoticeDetail();
            var destProperties = detail.GetType().GetProperties();

            foreach (var sourceProperty in this.GetType().GetProperties())
            {
                foreach (var destProperty in destProperties)
                {
                    if (destProperty.Name == sourceProperty.Name &&
                destProperty.PropertyType.IsAssignableFrom(sourceProperty.PropertyType)
                )
                    {
                        destProperty.SetValue(detail, sourceProperty.GetValue(
                            this, new object[] { }), new object[] { });

                        break;
                    }
                }
            }
            return detail;
        }
Example #4
0
 private AdvancedShipNoticeDetail GetByLinenum(string linenum)
 {
     foreach (AdvancedShipNoticeDetail item in this.asnData.AdvancedShipNoticeHeader.AdvancedShipNoticeDetail)
     {
         if (item.ReceiptLineNumber == linenum)
         {
             this.currentDetail = item;
             return item;
         }
     }
     this.currentDetail = null;
     return null;
 }