Programmer:Stock Status Report: Difference between revisions

Undo revision 12936 by DanielY (talk)
No edit summary
(Undo revision 12936 by DanielY (talk))
Tag: Undo
 
Line 1:
==References of AutoCount Accounting version 21.09==
{{BaseReferenceAC18}}
{{BaseReferenceAC20}}
'''BCE.AutoCount.StockMaint.dll'''
'''BCE.AutoCount.Stock.dll'''
 
==Get all tables in the DataSet of Stock Status==
<syntaxhighlight lang="csharp">
public DataSet GetStockStatusDataSet(AutoCountBCE.AuthenticationData.UserSessionDBSetting userSessiondbSetting)
{
BCE.AutoCount.Stock.StockStatus.StockStatusHelper ssHelper = new BCE.AutoCount.Stock.StockStatus.StockStatusHelper(userSessiondbSetting);
 
//No filter, warning without filter will load all data
Line 29:
==Get the Table of Stock Status with filter==
<syntaxhighlight lang="csharp">
public DataTable GetStockStatusTable(AutoCountBCE.AuthenticationData.UserSessionDBSetting userSessiondbSetting)
{
BCE.AutoCount.Stock.StockStatus.StockStatusHelper ssHelper = new BCE.AutoCount.Stock.StockStatus.StockStatusHelper(userSessiondbSetting);
 
//Filter Stock Location
BCE.AutoCount.Stock.StockStatus.StockStatusCriteria crit = ssHelper.Criteria;
crit.LocationFilter.Type = BCE.AutoCount.SearchFilter.FilterType.ByRange;
crit.LocationFilter.From = "HQ";
crit.LocationFilter.To = "HQ";
Line 49:
This example shows how to add a column "ReadyStock" and calculate the value using two existing values.
<syntaxhighlight lang="csharp">
public DataTable GetStockStatusTableWithColumnExpression(AutoCountBCE.AuthenticationData.UserSessionDBSetting userSessiondbSetting)
{
BCE.AutoCount.Stock.StockStatus.StockStatusHelper ssHelper = new BCE.AutoCount.Stock.StockStatus.StockStatusHelper(userSessiondbSetting);
 
//Filter Stock Location
BCE.AutoCount.Stock.StockStatus.StockStatusCriteria crit = ssHelper.Criteria;
crit.LocationFilter.Type = BCE.AutoCount.SearchFilter.FilterType.ByIndividual;
crit.LocationFilter.Add("HQ");