From AutoCount Resource Center
References of AutoCount Accounting version 2.0
AutoCount.Accounting.dll
AutoCount.Accounting.UI.dll
AutoCount.dll
AutoCount.MainEntry.dll
AutoCount.UI.dll
AutoCount.StockMaint.dll
AutoCount.Stock.dll
Get all tables in the DataSet of Stock Status
public DataSet GetStockStatusDataSet ( AutoCount . Authentication . UserSession userSession )
{
AutoCount . Stock . StockStatus . StockStatusHelper ssHelper = new AutoCount . Stock . StockStatus . StockStatusHelper ( userSession );
//No filter, warning without filter will load all data
ssHelper . Inquire ();
return ssHelper . ResultDataSet ;
}
The DataSet consists of 3 tables, below are the table names:
Master - Contains basic data of item
Detail - Stock Status of the item
SubDetail - Documents for reference
Master Table in ResultDataSet
Detail Table in ResultDataSet
SubDetail Table in ResultDataSet
Get the Table of Stock Status with filter
public DataTable GetStockStatusTable ( AutoCount . Authentication . UserSession userSession )
{
AutoCount . Stock . StockStatus . StockStatusHelper ssHelper = new AutoCount . Stock . StockStatus . StockStatusHelper ( userSession );
//Filter Stock Location
AutoCount . Stock . StockStatus . StockStatusCriteria crit = ssHelper . Criteria ;
crit . LocationFilter . Type = AutoCount . SearchFilter . FilterType . ByRange ;
crit . LocationFilter . From = "HQ" ;
crit . LocationFilter . To = "HQ" ;
ssHelper . Inquire ();
return ssHelper . ResultDataSet . Tables [ "Detail" ];
}
Add a column of expression to stock status table
This example shows how to add a column "ReadyStock" and calculate the value using two existing values.
public DataTable GetStockStatusTableWithColumnExpression ( AutoCount . Authentication . UserSession userSession )
{
AutoCount . Stock . StockStatus . StockStatusHelper ssHelper = new AutoCount . Stock . StockStatus . StockStatusHelper ( userSession );
//Filter Stock Location
AutoCount . Stock . StockStatus . StockStatusCriteria crit = ssHelper . Criteria ;
crit . LocationFilter . Type = AutoCount . SearchFilter . FilterType . ByIndividual ;
crit . LocationFilter . Add ( "HQ" );
ssHelper . Inquire ();
DataTable dtDtl = ssHelper . ResultDataSet . Tables [ "Detail" ];
if ( ! dtDtl . Columns . Contains ( "ReadyStock" ))
{
dtDtl . Columns . Add ( "ReadyStock" , typeof ( decimal ), "OnHandQty - CSGNBalQty" );
}
return dtDtl ;
}
See Also
See Also Report API
Category
Reporting
AR
AP
Stock
Sales
Purchase