Class PurchaseOrder
Purchase Order is the actual recorded sale.
Implements
Inherited Members
Namespace: Mediachase.Commerce.Orders
Assembly: Mediachase.Commerce.dll
Version: 14.26.0Syntax
public class PurchaseOrder : OrderGroup, IXmlSerializable, IStorageObject, ICloneable, ISerializable, IOrderGroupCalculatedAmount, IPurchaseOrder, IOrderGroup, IExtendedProperties, IDeepCloneable
Constructors
PurchaseOrder()
Initializes a new instance of the PurchaseOrder class.
Declaration
protected PurchaseOrder()
PurchaseOrder(IDataReader)
Internal constructor required by collection implementation.
Declaration
public PurchaseOrder(IDataReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Data.IDataReader | reader | The reader. |
PurchaseOrder(Guid)
Initializes a new instance of the PurchaseOrder class.
Declaration
public PurchaseOrder(Guid customerId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | customerId | The customer id. |
PurchaseOrder(SerializationInfo, StreamingContext)
Initializes a new instance of the PurchaseOrder class.
Declaration
protected PurchaseOrder(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The info. |
System.Runtime.Serialization.StreamingContext | context | The context. |
Properties
ExchangeOrderNumberMethod
Declaration
public Func<OrderGroup, string> ExchangeOrderNumberMethod { get; set; }
Property Value
Type | Description |
---|---|
System.Func<OrderGroup, System.String> |
ExpirationDate
Gets or sets the expiration date. Expiration date can be used for subscription type of orders.
Declaration
public DateTime ExpirationDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The expiration date. |
ParentOrderGroupId
Gets or sets the parent order group id. This can be used to relate purchase orders to a payment plan or other order.
Declaration
public int ParentOrderGroupId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The parent order group instance id. |
ReturnOrderForms
Gets the rma request list.
Declaration
public OrderFormCollection ReturnOrderForms { get; }
Property Value
Type | Description |
---|---|
OrderFormCollection | The rma request list. |
TrackingNumber
Gets or sets the tracking number. Automatically generated or can be generated using provided function.
Declaration
public string TrackingNumber { get; set; }
Property Value
Type | Description |
---|---|
System.String | The tracking number. |
Methods
AcceptChanges()
Accepts the changes.
Declaration
public override void AcceptChanges()
Overrides
DeepCloneImplementation()
Extends base implementation with deep cloning of ReturnOrderForms.
Declaration
protected override object DeepCloneImplementation()
Returns
Type | Description |
---|---|
System.Object | A new object that is a deep copy of the current instance. |
Overrides
GetObjectData(SerializationInfo, StreamingContext)
Gets the object data.
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The info. |
System.Runtime.Serialization.StreamingContext | context | The context. |
Overrides
Initialize(Guid)
Declaration
protected override void Initialize(Guid customerId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | customerId |
Overrides
PopulateCollections(DataTableCollection, String)
Loads RMA requests
Declaration
protected override void PopulateCollections(DataTableCollection tables, string filter)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataTableCollection | tables | |
System.String | filter |
Overrides
ReadXml(XmlReader)
Generates an object from its XML representation.
Declaration
public override void ReadXml(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The System.Xml.XmlReader stream from which the object is deserialized. |
Overrides
WriteXml(XmlWriter)
Converts an object into its XML representation.
Declaration
public override void WriteXml(XmlWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | The System.Xml.XmlWriter stream to which the object is serialized |
Overrides
Explicit Interface Implementations
IPurchaseOrder.ExpirationDate
Gets or sets the expiration date. Expiration date can be used for subscription type of orders
Declaration
Nullable<DateTime> IPurchaseOrder.ExpirationDate { get; set; }
Returns
Type | Description |
---|---|
System.Nullable<System.DateTime> |
IPurchaseOrder.OrderNumber
Gets or sets the order number.
Declaration
string IPurchaseOrder.OrderNumber { get; set; }
Returns
Type | Description |
---|---|
System.String |
IPurchaseOrder.ReturnForms
Gets the return forms.
Declaration
ICollection<IReturnOrderForm> IPurchaseOrder.ReturnForms { get; }
Returns
Type | Description |
---|---|
System.Collections.Generic.ICollection<IReturnOrderForm> |
IDeepCloneable.DeepClone()
Creates a limited deep clone of this object.
Declaration
object IDeepCloneable.DeepClone()
Returns
Type | Description |
---|---|
System.Object | A deep clone of this object. |
Remarks
Some reference type properties will NOT be cloned by this method - the original and the clone will share the same instance of: