Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OrderForm"/> class.
        /// </summary>
        /// <param name="info">The info.</param>
        /// <param name="context">The context.</param>
        protected OrderForm(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            _Discounts = (OrderFormDiscountCollection)info.GetValue("Discounts", typeof(OrderFormDiscountCollection));
            _LineItems = (LineItemCollection)info.GetValue("LineItems", typeof(LineItemCollection));
            _Shipments = (ShipmentCollection)info.GetValue("Shipments", typeof(ShipmentCollection));
            _Payments  = (PaymentCollection)info.GetValue("Payments", typeof(PaymentCollection));

            /*
             * _Discounts.SetParent(this);
             * _LineItems.SetParent(this);
             * _Shipments.SetParent(this);
             * _Payments.SetParent(this);
             * */
        }
Beispiel #2
0
 /// <summary>
 /// Initializes this instance.
 /// </summary>
 private void Initialize()
 {
     _Shipments           = new ShipmentCollection(this);
     _Payments            = new PaymentCollection(this);
     _LineItems           = new LineItemCollection(this);
     _Discounts           = new OrderFormDiscountCollection(this);
     HandlingTotal        = 0;
     ShippingTotal        = 0;
     SubTotal             = 0;
     TaxTotal             = 0;
     Total                = 0;
     DiscountAmount       = 0;
     this["OrderGroupId"] = 0;
 }