Programmer:Outstanding Purchase Order (19): Difference between revisions

From AutoCount Resource Center
Content added Content deleted
(Created page with "==References of AutoCount Accounting version 1.8 / 1.9== {{BaseReferenceAC18}} '''BCE.AutoCount.Invoicing.dll''' '''BCE.AutoCount.Invoicing.Purchase.dll''' ==Extract data o...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 30: Line 30:
rptCmd.BasicSearch(crit, "DocNo,DocDate,CreditorCode,CreditorName", dsOutstandingPO, "");
rptCmd.BasicSearch(crit, "DocNo,DocDate,CreditorCode,CreditorName", dsOutstandingPO, "");


//Create a new DataRelation to Master and Detail tables in dsOutstandingDO
//Create a new DataRelation to Master and Detail tables in dsOutstandingPO
dsOutstandingPO.Relations.Add("MasterDetailRelation", dtMaster.Columns["DocKey"], dtDetail.Columns["DocKey"], false);
dsOutstandingPO.Relations.Add("MasterDetailRelation", dtMaster.Columns["DocKey"], dtDetail.Columns["DocKey"], false);


Line 37: Line 37:
</syntaxhighlight>
</syntaxhighlight>


{{SeeAlsoAPIReport}}
[[Category:Programmer]]
[[Category:Programmer]]
[[Category:API]]
[[Category:API]]

Latest revision as of 04:25, 8 August 2019

References of AutoCount Accounting version 1.8 / 1.9

BCE.AutoCount.dll
BCE.AutoCount.CommonAccounting.dll
BCE.AutoCount.MainEntry.dll
BCE.Utils.dll
BCE.Utils.UI.dll
BCE.AutoCount.Invoicing.dll
BCE.AutoCount.Invoicing.Purchase.dll

Extract data of Outstanding Purchase Order with API

The sample code below shows how to retrieve the DataSet of Outstanding Purchase Order. This sample does not filter the result.

public System.Data.DataSet OutstandingPurchaseOrderData(BCE.Data.DBSetting dbSetting)
{
    //Create the object of PurchaseOrdersOutstandingReportCommand
    BCE.AutoCount.Invoicing.Purchase.PurchaseOrder.PurchaseOrderOutstandingReportCommand rptCmd =
        BCE.AutoCount.Invoicing.Purchase.PurchaseOrder.PurchaseOrderOutstandingReportCommand.Create(dbSetting);

    //Prepare the DataSet of Master table and Detail table
    System.Data.DataTable dtMaster = new System.Data.DataTable("Master");
    System.Data.DataTable dtDetail = new System.Data.DataTable("Detail");
    System.Data.DataSet dsOutstandingPO = new System.Data.DataSet();
    dsOutstandingPO.Tables.Add(dtMaster);
    dsOutstandingPO.Tables.Add(dtDetail);

    //Add the criterias that require to retrieve the data
    //Such as add filter to result
    BCE.AutoCount.Invoicing.Purchase.PurchaseOrder.PurchaseOrderOutStandingReportingCriteria crit =
        new BCE.AutoCount.Invoicing.Purchase.PurchaseOrder.PurchaseOrderOutStandingReportingCriteria();

    //Define addition fields of DocNo, DocDate, CreditorCode, CreditorName.
    //Programmer may add more fieldname to the DataTable of Master Table. 
    rptCmd.BasicSearch(crit, "DocNo,DocDate,CreditorCode,CreditorName", dsOutstandingPO, "");

    //Create a new DataRelation to Master and Detail tables in dsOutstandingPO
    dsOutstandingPO.Relations.Add("MasterDetailRelation", dtMaster.Columns["DocKey"], dtDetail.Columns["DocKey"], false);

    return dsOutstandingPO;
}

See Also Report API

Category Reporting
AR
AP
Stock
Sales
Purchase

Go to menu

Go to top
Resources For AutoCount Software Developers