Class busItem

The busItem class controls the inventory in the Web Store application. It provides features for the online store in accessing items and showing list of items as well as providing limited stock updat functionality.

Inventory items by default are assumed to be non-physical which means stock updates do not occur. If the Physical flag is set on the DataRow member/table field the item increases and decreases inventory through the UpdateInventoryCount() method. Inventory can be checked through the CheckStock() method.

Note: The Web store implementation of inventory updates inventory only when an order is saved to keep inline with the Web metaphor where orders are virtual until saved. Only when an invoice is written to disk is the inventory updated.

The underlying table is wws_items

Westwind.BusinessObjects.wwBusiness
public class busItem : wwBusiness

Class Members

MemberDescription

AutoFillAbstract

Automatically fills in the abstract from the long Description by retrieving the first paragraph of the long description.

public void AutoFillAbstract( bool ForceOverwrite,
    int Length );

public bool AutoFillAbstract( bool UpdateAllRows,
    bool ForceOverwrite,
    int Length );

CheckStock

Checks the stock level against the current loaded item

public bool CheckStock( decimal Quantity );

GetItemBySku

Retrieves an item into the DataRow member by Sku rather than PK

public bool GetItemBySku( string Sku );

GetItemList

Retrieves a list of items suitable for display in lists.

public int GetItemList(string Fields, string Filter, string Order)

public int GetItemList(string Category, string FieldList)

public int GetItemList(string Category)

GetManufacturers

Creates a Table named Manufacturers with all the unique manufacturers

public int GetManufacturers();

GetSearchItemList

Retrieves a list of items for display based on a search string in Descript and lDescript fields.

public int GetSearchItemList( string SearchFor,
    string FieldList );

GetSpecials

Returns all the specials - items that have the Special flag set to non-zero. Order by the Specials flag in descending order. Return ItemList table.

public int GetSpecials( string Fields );

GetSubItems

Returns a list of child items for a given Sku. Tablename: TSubItems

public int GetSubItems( string Sku,
    string Fields );

GetTypedDataRow

public wws_itemsRow GetTypedDataRow( bool LoadColumns );

public wws_itemsRow GetTypedDataRow();

SubItemHtmlList

Create an HTML select list of all the child skus.

public string SubItemHtmlList( string Sku );

UpdateInventoryCount

Updates the Inventory count on the currently loaded item in memory.

public bool UpdateInventoryCount( decimal Qty );

Validate

Validates for empty and duplicate skus and empty descriptions

public virtual bool Validate();

Requirements

Namespace: Westwind.WebStore

© West Wind Technologies, 1996-2018 • Updated: 05/04/05
Comment or report problem with topic