Programmer:Get Stock Cost: Difference between revisions
Content added Content deleted
(Created page with " ==Standard Cost== ===Get Standard Cost with ItemRecord=== <syntaxhighlight lang="csharp"> public decimal GetItemStandardCostWithItemRecord(BCE.Data.DBSetting dbSetting, strin...") |
No edit summary |
||
Line 29: | Line 29: | ||
</syntaxhighlight> |
</syntaxhighlight> |
||
<br/> |
|||
==Up-to-date Cost== |
==Up-to-date Cost== |
||
<syntaxhighlight lang="csharp"> |
<syntaxhighlight lang="csharp"> |
||
Line 35: | Line 36: | ||
BCE.AutoCount.Stock.StockHelper stkHelper = BCE.AutoCount.Stock.StockHelper.Create(dbSetting); |
BCE.AutoCount.Stock.StockHelper stkHelper = BCE.AutoCount.Stock.StockHelper.Create(dbSetting); |
||
return stkHelper.GetUpToDateUnitCost(itemCode, uom, qty, date); |
return stkHelper.GetUpToDateUnitCost(itemCode, uom, qty, date); |
||
} |
|||
</syntaxhighlight> |
|||
<br/> |
|||
==Items' Stock Balance, Quantity and Costing Table== |
|||
<syntaxhighlight lang="csharp"> |
|||
public System.Data.DataTable GetStockBalanceCostTable(BCE.Data.DBSetting dbSetting) |
|||
{ |
|||
BCE.AutoCount.Stock.StockBalance.StockBalanceHelper sbHelper = new BCE.AutoCount.Stock.StockBalance.StockBalanceHelper(dbSetting); |
|||
sbHelper.Inquire(DateTime.Today.Date); |
|||
//sbHelper.ResultDataSet returns 2 tables |
|||
//1. Master (Item Balance) |
|||
//2. ItemSerialNo (Serial Number) |
|||
//System.Data.DataSet dsBalanceWithSerial = sbHelper.ResultDataSet; |
|||
return sbHelper.ResultTable; |
|||
} |
} |
||
</syntaxhighlight> |
</syntaxhighlight> |