DonorWise TM
Enhanced communication with donors, enhanced ministry credibility...

How can I develop a plugin in C# that adds a new accounting system to the list of "Integrated General Ledgers"?: Revision #1

Table of Contents

It is our pleasure to provide this software free of charge to help you in your ministry.  We're so thankful for our partners who make this possible!

About TntWare

Page Details

First published by:
Troy Wolbrink
on 5 Apr 2010
Last revision by:
Troy Wolbrink
on 25 Nov 2020
This page has not yet been rated
You are currently reviewing an older revision of this page. Go to current version

How can I develop a plugin in C# that adds a new accounting system to the list of "Integrated General Ledgers"?

Filed under:

Out of the box, DonorWise supports integration with Solomon IV (4.2 and newer).  If you don't use Solomon, but you'd still like to deeply integrate DonorWise with your accounting system, you can.  DonorWise supports a plug-in model that supports this.  Attached is a Visual Studio 2008 C# project that demonstrates this: 6685.DonorWiseGLPlugin.zip

I'll walk you through the steps it took to develop this project, as well as describe what's left for you to implement.

First of all, be sure that you're running Visual Studio 2008 "As Administrator".  This is because you'll compile to the "C:\Program Files\DonorWise\plugins" folder.  This folder doesn't allow write access to normal users.

When DonorWise starts up, it looks in the "plugins" folder for any .NET assemblies with any classes that implement the IDonorWiseGeneralLedgerPlugin interface.  For any that exist, new entries are added to the list of "Integrated General Ledgers" available in DonorWise.

Start off by creating a new C# Class LIbrary:

 Then, add a reference to "C:\Program Files\DonorWise\DonorWise.SDK.dll" to your project: 

Be sure to set "Copy Local" to false in the properties window. 

Under the "Project" menu, click on "Properties" and on the Build tab, set the output path to the "plugins" folder. 

 On the "Debug" tab, set it to "Start External Program" and tell it to use DonorWise.exe. 

 In the "Class1.cs" file, add "System.ComponentModel" and "TntWare.DonorWise.SDK" to the using list.  Rename "Class1" to a more meaningful name (this shouldn't change in the future), and have it implement IDonorWiseGeneralLedgerPlugin.  Add the Description attribute so it has a more user friendly name that appears in DonorWise (otherwise the class name will appear).

 

 Right-click on the interface name and tell Visual Studio to implement the interface.

 Add a reference to "System.Windows.Forms", and under the "Project" menu, click on "Add New Item".  Add a Windows Form, and call it "ConfigurationForm.cs". 

 Add a check box and 2 buttons.  Name the check box "EnabledCheckBox" and make sure the DialogResult for the "OK" and "Cancel" button is set appropriately. 

 Add a public bool property "IsEnabledBox" to the form. 

If you run the project now (F5), you'll start up DonorWise.  In DonorWise, under the "Tools" menu, click on "Integrated General Ledger Options".  In the list, you'll see the "Sample .NET GL Plugin in C#" we just developed.  (It won't do anything because all the methods that were implemented raise an exception.)

Now, I'll describe each of the methods you need to implement in the main plugin class.

 

 

 

© 2024 TntWare, Inc. | Privacy | Terms of Use