Examples below shows how to retrieve DataSet or DataTable of Debtor Aging.
It filters result of:
public System.Data.DataSet DebtorAgingDataSet(BCE.Data.DBSetting dbSetting)
{
BCE.AutoCount.ARAP.DebtorAging.DebtorAging aging = BCE.AutoCount.ARAP.DebtorAging.DebtorAging.Create(dbSetting);
BCE.AutoCount.ARAP.DebtorAging.DebtorAgingCriteria crit = new BCE.AutoCount.ARAP.DebtorAging.DebtorAgingCriteria();
//There are many more criteria to filter the result
crit.ReportDate = DateTime.Today.Date;
crit.DebtorFilter.ByRange("300-A001", "300-C999");
crit.IncludeZeroBalance = false;
//The return table is "Master"
DataTable tblAging = aging.Inquire(crit);
//DataSet consists of many tables, and "Master" table
return aging.ResultDataSet;
//If only the master table is needed, programmer can return only DataTable of the master table
//tblAging table and aging.ResultDataTable are the same
//return tblAging;
//return aging.ResultDataTable;
}
public System.Data.DataTable DebtorAgingTable(BCE.Data.DBSetting dbSetting)
{
BCE.AutoCount.ARAP.DebtorAging.DebtorAging aging = BCE.AutoCount.ARAP.DebtorAging.DebtorAging.Create(dbSetting);
BCE.AutoCount.ARAP.DebtorAging.DebtorAgingCriteria crit = new BCE.AutoCount.ARAP.DebtorAging.DebtorAgingCriteria();
//There are many more criteria to filter the result
crit.ReportDate = DateTime.Today.Date;
crit.DebtorFilter.ByRange("300-A001", "300-C999");
crit.IncludeZeroBalance = false;
//The return table is "Master"
DataTable tblAging = aging.Inquire(crit);
return aging.ResultDataSet.Tables["Detail"];
}