Manipulating Batch

In this example, we will create a batch from an existing batch template and then add rows to the new batch using an Infinity Web API.

The source code for this example can be found here: BatchWebAPISample.

First, we need to create the new custom client application in the form of a .NET win form application. This custom application elicits the help of the Blackbaud.AppFx.WebAPI.dll. This assembly is a wrapper around the Blackbaud AppFx Web Service (AppFxWebService.asmx).

Figure: Make a reference to the Blackbaud.AppFx.WebAPI.dll assembly within our client project eases access to the AppFxWebSerice.asmx web service

To create the WinForm project, we can utilize the Web API Client Template that comes with the Infinity SDK. This template helps you to jump start a project by automatically creating a reference to Blackbaud.AppFx.WebApi, Blackbaud.AppFx.XMLTypes, Blackbaud.AppFx.dll, among others.

Figure: Select the Web API Client template

The project template stubs out some code within a Module1.vb and also makes references to some assemblies that we do not need for our sample.

Figure: Clean the unnecessary assembly references

I made the following changes to the newly created project:

Imports Blackbaud.AppFx.XmlTypes
'Imports Blackbaud.AppFx.UIModeling.DataFormWebHost

Module Module1
    Sub Main()
        Dim Form1 As New Form1
        Form1.ShowDialog()
    End Sub
End Module

Figure: Change the application type