Difference between revisions of "Programmer:Outstanding Delivery Order (19)"

From AutoCount Resource Center
Jump to navigation Jump to search
(Created page with "==References of AutoCount Accounting version 1.8 / 1.9== {{BaseReferenceAC18}} '''BCE.AutoCount.Invoicing.dll''' '''BCE.AutoCount.Invoicing.Sales.dll''' ==Extract data of O...")
 
m
Line 22: Line 22:
  
 
     //Add the criterias that require to retrieve the data
 
     //Add the criterias that require to retrieve the data
     //Such as result table filter
+
     //Such as add filter to result
 
     BCE.AutoCount.Invoicing.Sales.DeliveryOrder.DeliveryOrderOutStandingReportingCriteria crit =
 
     BCE.AutoCount.Invoicing.Sales.DeliveryOrder.DeliveryOrderOutStandingReportingCriteria crit =
 
         new BCE.AutoCount.Invoicing.Sales.DeliveryOrder.DeliveryOrderOutStandingReportingCriteria();
 
         new BCE.AutoCount.Invoicing.Sales.DeliveryOrder.DeliveryOrderOutStandingReportingCriteria();

Revision as of 08:32, 14 January 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.Sales.dll

Extract data of Outstanding Delivery Order with API

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

public System.Data.DataSet OutstandingDeliveryOrderData(BCE.Data.DBSetting dbSetting)
{
    //Create the object of DeliveryOrdersOutstandingReportCommand
    BCE.AutoCount.Invoicing.Sales.DeliveryOrder.DeliveryOrderOutstandingReportCommand rptCmd =
        BCE.AutoCount.Invoicing.Sales.DeliveryOrder.DeliveryOrderOutstandingReportCommand.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 dsOutstandingDO = new System.Data.DataSet();
    dsOutstandingDO.Tables.Add(dtMaster);
    dsOutstandingDO.Tables.Add(dtDetail);

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

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

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

    return dsOutstandingDO;
}

Go to menu

IconAC81.png Go to top
ProgrammerGo.jpg Resources For AutoCount Software Developers