November Happy Hour will be moved to Thursday December 5th.

Class OrderGroup

Order group contains multiple order forms.

Implements
System.Xml.Serialization.IXmlSerializable
System.ICloneable
System.Runtime.Serialization.ISerializable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Orders
Assembly: Mediachase.Commerce.dll
Version: 12.17.2
Syntax
public abstract class OrderGroup : OrderStorageBase, IXmlSerializable, IStorageObject, ICloneable, ISerializable, IOrderGroup, IExtendedProperties, IOrderGroupCalculatedAmount

Constructors

OrderGroup(SerializationInfo, StreamingContext)

Initializes a new instance of the OrderGroup class.

Declaration
protected OrderGroup(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

The info.

System.Runtime.Serialization.StreamingContext context

The context.

Fields

Cache

Declaration
protected static Injected<ISynchronizedObjectInstanceCache> Cache
Field Value
Type Description
EPiServer.ServiceLocation.Injected<EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache>

CachePrefix

Declaration
protected const string CachePrefix = "EP:DOR"
Field Value
Type Description
System.String

Properties

AddressId

Gets or sets the address id.

Declaration
public string AddressId { get; set; }
Property Value
Type Description
System.String

The address id.

AffiliateId

Gets or sets the affiliate id.

Declaration
public Guid AffiliateId { get; set; }
Property Value
Type Description
System.Guid

The affiliate id.

ApplicationId

Gets or sets the application id.

Declaration
[Obsolete("The concept of ApplicationID has been removed - ignore this property. Will remain at least until August 2018.")]
public Guid ApplicationId { get; set; }
Property Value
Type Description
System.Guid

The application id.

BillingCurrency

Gets or sets the billing currency.

Declaration
public string BillingCurrency { get; set; }
Property Value
Type Description
System.String

The billing currency.

CustomerId

Gets or sets the customer id.

Declaration
public Guid CustomerId { get; set; }
Property Value
Type Description
System.Guid

The customer id.

CustomerName

Gets or sets the name of the customer.

Declaration
public string CustomerName { get; set; }
Property Value
Type Description
System.String

The name of the customer.

HandlingTotal

Gets or sets the handling total.

Declaration
public decimal HandlingTotal { get; set; }
Property Value
Type Description
System.Decimal

The handling total.

InstanceId

Gets or sets the instance id.

Declaration
public Guid InstanceId { get; set; }
Property Value
Type Description
System.Guid

The instance id.

MarketId

Gets or sets the market id.

Declaration
public MarketId MarketId { get; set; }
Property Value
Type Description
MarketId

Name

Gets or sets the name.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

The name.

OrderAddresses

Gets the order addresses.

Declaration
public OrderAddressCollection OrderAddresses { get; }
Property Value
Type Description
OrderAddressCollection

The order addresses.

OrderForms

Gets the order forms.

Declaration
public OrderFormCollection OrderForms { get; }
Property Value
Type Description
OrderFormCollection

The order forms.

OrderGroupId

Gets the order group id.

Declaration
public int OrderGroupId { get; }
Property Value
Type Description
System.Int32

The order group id.

OrderNotes

Gets or sets the order notes.

Declaration
public OrderNoteCollection OrderNotes { get; set; }
Property Value
Type Description
OrderNoteCollection

The order notes.

Owner

Gets or sets the owner.

Declaration
public string Owner { get; set; }
Property Value
Type Description
System.String

The owner.

OwnerOrg

Gets or sets the owner org.

Declaration
public string OwnerOrg { get; set; }
Property Value
Type Description
System.String

The owner org.

ProviderId

Gets or sets the provider id.

Declaration
public string ProviderId { get; set; }
Property Value
Type Description
System.String

The provider id.

ShippingTotal

Gets or sets the shipping total.

Declaration
public decimal ShippingTotal { get; set; }
Property Value
Type Description
System.Decimal

The shipping total.

SiteId

Gets or sets the site id.

Declaration
public string SiteId { get; set; }
Property Value
Type Description
System.String

The site id.

Status

Gets or sets the status.

Declaration
public string Status { get; set; }
Property Value
Type Description
System.String

The status.

SubTotal

Gets or sets the sub total.

Declaration
public decimal SubTotal { get; set; }
Property Value
Type Description
System.Decimal

The sub total.

TaxTotal

Gets or sets the tax total.

Declaration
public decimal TaxTotal { get; set; }
Property Value
Type Description
System.Decimal

The tax total.

Total

Gets or sets the total.

Declaration
public decimal Total { get; set; }
Property Value
Type Description
System.Decimal

The total.

Methods

AcceptChanges()

Accepts the changes.

Declaration
public override void AcceptChanges()
Overrides

CanEdit(Int32, Guid)

Returns true, if user with id=userId user can edit order with the specified order

Declaration
public static bool CanEdit(int orderGroupId, Guid userId)
Parameters
Type Name Description
System.Int32 orderGroupId
System.Guid userId
Returns
Type Description
System.Boolean

CheckForLocked()

Checks for lock.

Declaration
protected void CheckForLocked()

ConstructCustomerIdCacheKey(Guid, String, Type)

Declaration
protected static string ConstructCustomerIdCacheKey(Guid customerId, string orderName, Type type)
Parameters
Type Name Description
System.Guid customerId
System.String orderName
System.Type type
Returns
Type Description
System.String

ContainsCouponCode(String)

Determines whether the coupon code has been added to the order.

Declaration
[Obsolete("Use promotion system in EPiServer.Commerce.Marketing instead. Will be removed in a future major release, but not earlier than August 2018.")]
public bool ContainsCouponCode(string couponCode)
Parameters
Type Name Description
System.String couponCode

The coupon code.

Returns
Type Description
System.Boolean

True if the code has been added, otherwise false.

DeepCloneImplementation()

Extends base implementation with deep cloning of OrderAddresses, OrderForms, and OrderNotes.

Declaration
protected override object DeepCloneImplementation()
Returns
Type Description
System.Object

A new object that is a deep copy of the current instance.

Overrides

Delete()

Deletes this instance.

Declaration
public override void Delete()
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)

Initializes the specified customer id.

Declaration
protected virtual void Initialize(Guid customerId)
Parameters
Type Name Description
System.Guid customerId

The customer id.

InitializeMetaFields(Guid)

Declaration
protected virtual void InitializeMetaFields(Guid customerId)
Parameters
Type Name Description
System.Guid customerId

PopulateCollection<T>(ClassInfo, MetaStorageCollectionBase<T>, DataSet)

Populates the collection.

Declaration
[Obsolete("This method is no longer used. Will remain at least until December 2019.")]
protected static void PopulateCollection<T>(ClassInfo classInfo, MetaStorageCollectionBase<T> collection, DataSet dataSet)
    where T : OrderGroup
Parameters
Type Name Description
ClassInfo classInfo

The class info.

MetaStorageCollectionBase<T> collection

The collection.

System.Data.DataSet dataSet

The data set.

Type Parameters
Name Description
T

PopulateCollections(DataTableCollection, String)

Populates collections within table. The tables used will be removed from the table collection. Override this method to populate your custom collection objects.

Declaration
protected override void PopulateCollections(DataTableCollection tables, string filter)
Parameters
Type Name Description
System.Data.DataTableCollection tables

The tables.

System.String filter

The 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

RunWorkflow(String)

Runs the specified workflow, exception will be thrown and should be handled by the caller. The execution will be synchronious.

Declaration
public virtual WorkflowResults RunWorkflow(string name)
Parameters
Type Name Description
System.String name

The name.

Returns
Type Description
WorkflowResults

RunWorkflow(String, Boolean)

Runs the specified workflow.

Declaration
public virtual WorkflowResults RunWorkflow(string name, bool throwException)
Parameters
Type Name Description
System.String name

The name.

System.Boolean throwException

if set to true the exception will be thrown and should be handled by the caller.

Returns
Type Description
WorkflowResults

RunWorkflow(String, Boolean, Dictionary<String, Object>)

Runs the specified workflow.

Declaration
public virtual WorkflowResults RunWorkflow(string name, bool throwException, Dictionary<string, object> param)
Parameters
Type Name Description
System.String name

The name.

System.Boolean throwException

if set to true the exception will be thrown and should be handled by the caller.

System.Collections.Generic.Dictionary<System.String, System.Object> param

The additional input parameters.

Returns
Type Description
WorkflowResults

SetParent(Object)

Sets the parent.

Declaration
public override void SetParent(object parent)
Parameters
Type Name Description
System.Object parent

The parent.

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

IOrderGroupCalculatedAmount.IsTaxTotalUpToDate

Gets or sets the flag indicating whether the TaxTotal is up-to-date.

Declaration
bool IOrderGroupCalculatedAmount.IsTaxTotalUpToDate { get; set; }
Returns
Type Description
System.Boolean

IOrderGroupCalculatedAmount.TaxTotal

Gets or sets the tax total.

Declaration
decimal IOrderGroupCalculatedAmount.TaxTotal { get; set; }
Returns
Type Description
System.Decimal

IOrderGroup.Created

Gets the created date.

Declaration
DateTime IOrderGroup.Created { get; }
Returns
Type Description
System.DateTime

IOrderGroup.Currency

Gets or sets the currency used in the order.

Declaration
Currency IOrderGroup.Currency { get; set; }
Returns
Type Description
Currency

IOrderGroup.Forms

Gets the order forms.

Declaration
ICollection<IOrderForm> IOrderGroup.Forms { get; }
Returns
Type Description
System.Collections.Generic.ICollection<IOrderForm>

IOrderGroup.Market

Gets or sets the market.

Declaration
[Obsolete("This property is no longer used. Use IMarketService to get the market from MarketId instead. Will remain at least until May 2019.")]
IMarket IOrderGroup.Market { get; set; }
Returns
Type Description
IMarket

IOrderGroup.MarketName

Declaration
string IOrderGroup.MarketName { get; set; }
Returns
Type Description
System.String

IOrderGroup.Modified

Gets the modified date.

Declaration
DateTime? IOrderGroup.Modified { get; }
Returns
Type Description
System.Nullable<System.DateTime>

IOrderGroup.Notes

Gets the order notes.

Declaration
ICollection<IOrderNote> IOrderGroup.Notes { get; }
Returns
Type Description
System.Collections.Generic.ICollection<IOrderNote>

The order notes.

Gets a link to the order connected to this order group, if one exists.

Declaration
OrderReference IOrderGroup.OrderLink { get; }
Returns
Type Description
OrderReference

IOrderGroup.OrderStatus

Gets or sets the order status.

Declaration
OrderStatus IOrderGroup.OrderStatus { get; set; }
Returns
Type Description
OrderStatus

IOrderGroup.Organization

Gets or sets the organization.

Declaration
Guid? IOrderGroup.Organization { get; set; }
Returns
Type Description
System.Nullable<System.Guid>

IOrderGroup.PricesIncludeTax

Declaration
bool IOrderGroup.PricesIncludeTax { get; set; }
Returns
Type Description
System.Boolean

IExtendedProperties.Properties

Gets the property bag for dealing with custom meta fields.

Declaration
Hashtable IExtendedProperties.Properties { get; }
Returns
Type Description
System.Collections.Hashtable

Implements

System.Xml.Serialization.IXmlSerializable
System.ICloneable
System.Runtime.Serialization.ISerializable

Extension Methods