Example of using the GCDtaus-Dll | ||
Here is an example of how incredible easy is to use the
GCDtaus Object Model to generate a Dtaus file. If you haven't yet, please take a short look at the API documentation to familiarize yourself with the objects that compose the library. (This is a Visual Basic example. Remember that you must have a reference pointing to the 'GCDtaus.dll'in order to use its objects.)
' 'Declare the objects we are going touse. ' Dim dtaus As DtausDatei Dim meineBankInfo As MeineInfo Dim transfer As GeldTransfer 'Initialize an instance of DtausDatei, the main class. ' Set dtaus = New DtausDatei ' 'Set the complete path and name of the dtaus file. 'Note that the name 'dtaus0' is standard convention for the file'sname. dtaus.Pfad = "C:\\dtaus0" 'Get a reference to the MeineInfo object, 'that was created internally by DtausDatei object Set meineBankInfo = dtaus.GetMeineInfo 'Set MeineInfo object properties... ' meineBankInfo.DateiMedia = MediaTyp.Diskette meineBankInfo.GeldTransferTyp = TransferTyp.Lastschrift ' meineBankInfo.BLZ = "50652124" meineBankInfo.Konto = "1234567890" meineBankInfo.Name = "Firma XYZ GmbH" 'For each bank operation we want our dtaus to contain, 'create a GeldTransfer object and set its properties accordingly. Set gt = New GeldTransfer ' gt.BLZ = "..." gt.Konto = "..." gt.BetragEuro = "..." gt.Name = "..." gt.VerwendungsZweck = "..." 'Add the transfer to the DtausDatei-file dtaus.AddGeldTransfer gt 'Repeat this steps of creating a GeldTransfer object and adding it 'to the DtausDatei-file for each payment you want to be included 'in the dtaus file 'At the end, call DtausDatei's Generate method to have the file generated and you're done! dtaus.Generate |
||
:: back to main page |