CHAPTER 4 Addresses Collection
ProgID: ACBUsers.cAddresses
Description
The Addresses collection contains all addresses for a specific customer.
|
BillAddr_ID
|
Read/Write. A Long value that holds the ID of the billing address for this User.
|
|
Count
|
Read Only. This property holds the number of items in the collection.
|
|
Customer_ID
|
Read Only. A Long value that holds the ID of this user for which the addresses collection is loaded.
|
|
IsDirty
|
Read Only. An Integer flag that indicates whether the object was loaded for a Group (0) or Customer (1).
|
|
ShipAddr_ID
|
Read/Write. A Long value that holds the ID of the default shipping address for this User.
|
|
Add
|
Adds an item to the collection.
|
|
Billing
|
Returns a reference to an Address object that contains the billing address for the User.
|
|
IndexOf
|
Searches the collection for the specified item.
|
|
Items
|
Returns a reference to the item at the specified index.
|
|
Load
|
Loads the collection from the database.
|
|
Remove
|
Removes an item from the collection.
|
|
RemoveAll
|
Removes all items from the collection.
|
|
Reset
|
Resets the collection, freeing any allocated resources.
|
|
Save
|
This method commits to the database all changes made to the contents of the collection.
|
|
Shipping
|
Returns a reference to an Address object that contains the default shipping address for the User.
|
Add Method
Adds an item to the collection.
Syntax
intNewIndex = colAddresses.Add(objAddress)
Return Value
Returns the index at which the added item can be accessed within the collection.
Parameters
objAddress [in] A reference to an Address object to be added to the collection.
Billing Method
Returns a reference to an Address object that contains the billing address for the User.
Syntax
Set objBillingAddress = colAddresses.Billing
Return Value
Returns a reference to an ACBUsers.tAddress object that contains the billing address data.
Notes
The method always returns an address object, regardless of whether addresses have been previously defined for this customer. If the method is called and no addresses are defined for the customer, a new address will be created with default parameters. The new address will be set to be the billing address for the user and returned by the function.
IndexOf Method
Searches the collection for the specified item.
Syntax
intIndex = colAddresses.IndexOf(intAddressID)
Return Value
Returns an integer value that specifies the index within the collection where the specified object was found. If the item is not found, -1 is returned.
Parameters
intAddressID [in] A Long value that specifies the Address being searched for.
Items Method
Returns a reference to an object at the specified index.
Syntax
Set objAddress = colAddress.Items(intIndex)
Return Value
Returns an ACBUsers.tAddress object reference.
Parameters
intIndex [in] An Integer value that specifies the index of the object to return.
Load Method
Loads the collection from the database.
Syntax
Boolean = colAddresses.Load(objToken, intCustomerID)
Return Value
Returns a boolean value indicating success (true) or failure (false).
Parameters
objToken [in] A reference to a loaded Token object.
intCustomerID [in] A Long value that gives the Customer ID for which to load the Addresses collection.
Remove Method
Removes an item from the collection.
Syntax
colAddresses.Remove(intIndex)
Parameters
intIndex [in] A Long value that indicates the index of the object to remove from the collection.
RemoveAll Method
Removes all items from the collection.
Syntax
colAddresses.RemoveAll
Notes
RemoveAll deletes all data from the database immediately. A call to the Save method is not required to commit the remove request.
Reset Method
Resets the object, freeing any allocated resources.
Syntax
colAddresses.Reset
Notes
Reset should always be called before setting the object to nothing. This will force all allocated memory to be freed.
Save Method
This method commits to the database all changes made to the contents of the collection.
Syntax
Boolean = colAddresses.Save
Return Value
Returns a boolean value indicating success (true) or failure (false).
Shipping Method
Returns a reference to an Address object that contains the default shipping address for the User.
Syntax
Set objShippingAddress = colAddresses.Shipping
Return Value
Returns a reference to an ACBUsers.tAddress object that contains the default shipping address data.
Notes
The method always returns an address object, regardless of whether addresses have been previously defined for this customer. If the method is called and no addresses are defined for the customer, a new address will be created with default parameters. The new address will be set to be the default shipping address for the user and returned by the function.
Go to Main Go to Previous Go to Next