Orders

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Add On > Account >

Orders

Previous page Return to chapter overview Next page

Definition

A collection of Order objects generated for the specified account

 

Property Value

An Collection of Order objects

 

Syntax

<Account>.Orders

 

Examples

ns


private Account myAccount;
 
protected override void OnStateChange()
{
  if (State == State.SetDefaults)
  {
      // Initialize myAccount
  }

}
 
private void OnAccountItemUpdate(object sender, AccountItemEventArgs e)
{
  // Print the name and order action of each order processed on the account
  foreach (Order order in myAccount.Orders)
  {
      Print(String.Format("Order placed: {0} - {1}", order.Name, order.OrderAction));
  }
}