Duwamish Books, Phase 3.5: VBA Business Logic Layer API Reference

Ade Miller
Summit Software Company

December 1999

Summary: Details additional methods added to the Duwamish Books, Phase 3.5 Business Logic Layer (BLL) for the Phase 3.5 VBA sample.

Introduction

In order to support the new Buyer client, three additional methods were added to the Duwamish Books, Phase 3.5 BLL. The Order programmability model exposed to Microsoft® Visual Basic® for Applications (VBA) also uses the GetOutStandingPOs method. It allows the VBA programmer to obtain the number of outstanding purchase orders (POs) for a particular employee.

Modifications to the BLL API

This reference documents the new methods added to the BLL component of the Duwamish Books, Phase 3.5: VBA sample application. For an in-depth discussion of the design of the underlying Phase 3.5 BLL component, see "The Duwamish Books Business Logic Layer API Reference."

For additional API detail, the BLL VB source code documents the purpose and parameters, in greater detail.

InsertOrder

Description

Inserts an Order into database for current record in Order Recordset. If insert is successful, retrieves Order as returned by GetOrders. This modified version of InsertOrder has additional parameters to allow VBA code behind the BLL method to return error information to the client.

Visual Basic signature

Public Function InsertOrder(Order As ADODB.Recordset, _
                            ByRef ErrorNumber As Integer, _
                            ByRef ErrorSource As String, _
                            ByRef ErrorDescription As String) As Boolean

Visual C++ signature

There is no C++ implementation of the BLL for Duwamish Books, Phase 3.5: VBA.

Parameters

Return type

Boolean: Returns True if successful, False if not successful.

GetSalesBreakdown

Description

Returns a breakdown of the book sales activity for a specified calendar period. Used to obtain data for the Buyer client "Book Sales" view.

Visual Basic signature

Public Function GetSalesBreakdown(Sales As ADODB.Recordset, _
                                  Optional StartDate As Date, _
                                  Optional EndDate As Date) As Boolean

Visual C++ signature

There is no C++ implementation of the BLL for Duwamish Books, Phase 3.5: VBA.

Parameters

Return type

Boolean: Returns True if successful, False if not successful.

GetOutStandingPOs

Description

Returns the outstanding POs for a particular employee or all employees for a specified calendar period. Outstanding POs are orders that have been sent to the supplier but not yet received. Used to obtain data for the Buyer client "Outstanding POs" view and the VBA Order programmability model.

Visual Basic signature

Public Function GetOutStandingPOs(PurchaseOrders As ADODB.Recordset, _
                                Optional StartDate As Date, _
                                Optional EndDate As Date, _
                                Optional EmployeeId As Long) As Boolean

Visual C++ signature

There is no C++ implementation of the BLL for Duwamish Books, Phase 3.5: VBA.

Parameters

Return type

Boolean: Returns True if successful, False if not successful.

GetBuyerPerformance

Description

Returns buyer performance data for all employees for a specified calendar period. Used to obtain data for the Buyer client "Performance" view. This method supports VBA customization, allowing the model used to calculate buyer performance points to be customized.

Visual Basic signature

Public Function GetBuyerPerformance(PerformanceInfo As ADODB.Recordset, _
                                  Optional StartDate As Date, _
                                  Optional EndDate As Date) As Boolean

Visual C++ signature

There is no C++ implementation of the BLL for Duwamish Books, Phase 3.5: VBA.

Parameters

Return type

Boolean: Returns True if successful, False if not successful.