AutoCount Accounting 2.1 API

From AutoCount Resource Center

Introduction to AutoCount Accounting 2.1.5

AutoCount Accounting 2.1.5.x is the continuous update to previous version of 2.0.

There are some rearrangement of the namespace to better separation of UI and logic which it has been done for the GL, AR and AP. For instance, when programming for the GL, AR and AP without UI, programmer only need to download autocount.dll and autocount.accounting.dll without having to download the entire assemblies.

AutoCount Accounting 2.1 assemblies can be downloaded from the nuget. So that, programmer can download and manage the assemblies of different versions.

Furthermore, AutoCount Accounting 2.1 script template is published at Extensions for Visual Studio, where programmer can find the extensions in Visual Studio 2019 and 2022.

Common Components versions

  1. Net Framework 4.8
    Please use only .Net Framework 4.8, because others .net assemblies are not tested. Some code works, but at some point it may break.
  2. DevExpress WinForms 19.2.10
  3. Newtonsoft Json.NET 13.0.1

Setup AutoCount Accounting 2.1 Requirements

  1. Net Framework 4.8
  2. SQL Server 2012 SP3 or higher
  3. AutoCount Server or higher
  4. AutoCount Accounting Setup or higher
    AutoCount Accounting 2.1 Release Note

Assemblies Filename Changed (Updated: 6/1/2023)

AutoCount Accounting 1.9, 2.0 AutoCount Accounting 2.1 Namespace is changed ? Namespace
AutoCount.Invoicing.Sales.dll AutoCount.Sales.dll No AutoCount.Invoicing.Sales
AutoCount.Invoicing.Purchase.dll AutoCount.Purchase.dll No AutoCount.Invoicing.Purchase

The word "Invoicing" is removed from the filename of Sales and Purchase, but the namespace remains the same.
Although the project reference of 2.0 sales & purchase assemblies will need to be removed, then add the 2.1 sales & purchase assemblies, the coding doesn't require to change.

Tips icons.png Make sure all AutoCount Accounting 2.0 assemblies are removed from reference before adding 2.1 assemblies.

GST Tax Code and Tax Rate (updated: 20/12/2022)

  • AutoCount Accounting 2.1 API will auto update the tax rate according to the document date.
    However, it requires to initiate the GST Helper by calling the SubProjectStartup.
    In other words, if SubProjectStartup isn't called, obtain the TaxRate will fail.
  • Secondly, make sure the manually added TaxCode is linked or assigned with Government Tax Code.
    Prior to version 2.1, "GovernmentTaxCode" was known as "IRASTaxCode".

3 MainEntry to start a subProject

Calling the SubProjectStartup is to load the plug-in and also to activate the license. In 2.1, there are 3 classes the programmer can call the SubProjectStartup with different assembly and usage. You may find the document at Initiate UserSession and DBSetting.

MainEntry in AutoCount.Accounting.dll

This MainEntry is commonly used for integration, or when no user login is required to access and initiate AutoCount Accounting, and it does not load UI components.

AutoCount.MainEntry.Startup startup = new AutoCount.MainEntry.Startup();
AutoCount.Data.DBSetting dbSetting = new DBSetting(DBServerType.SQL2000, serverName, "sa", saPassword, dbName);
AutoCount.Authentication.UserSession userSession = new UserSession(dbSetting);
if (userSession.Login(userName, userPassword))
    startup.SubProjectStartup(userSession, AutoCount.MainEntry.StartupPlugInOption.LoadStandardPlugIn);

MainEntry in AutoCount.MainEntry.dll

This MainEntry opens the AutoCount Accounting user login form, with successful login, it returns the object of UserSession.
If user clicked [Cancel], the object of UserSession is null.

AutoCount.Authentication.UserSession userSession = AutoCount.MainEntry.MainStartup.Default.SubProjectStartupWithLogin("", "");
if (userSession != null)
    //do something
    AutoCount.Data.DBSetting dbSetting = userSession.DBSetting;
    bool isLogin = userSession.IsLogin;
    string userId = userSession.LoginUserID;

MainEntry in AutoCount.Accounting.UI.dll

This MainEntry.UIStartup is similar to the MainEntry.Startup, except that it loads UI components.

AutoCount.MainEntry.UIStartup startup = new AutoCount.MainEntry.UIStartup();
AutoCount.Data.DBSetting dbSetting = new DBSetting(DBServerType.SQL2000, serverName, "sa", saPassword, dbName);
AutoCount.Authentication.UserSession userSession = new UserSession(dbSetting);
if (userSession.Login(userName, userPassword))
    startup.SubProjectStartup(userSession, AutoCount.MainEntry.StartupPlugInOption.LoadStandardPlugIn);
Tips icons.png Get latest plug-in builder for AutoCount Accounting 2.1

Bonus Point

Assemblies: AutoCount.Invoicing.dll Namespace: AutoCount.BonusPoint.Member

Namespace changed:

  • AutoCount.GeneralMaint.MemberMaintenance.MemberCommand => AutoCount.BonusPoint.Member.MemberCommand.
  • AutoCount.GeneralMaint.MemberMaintenance.MemberEntity => AutoCount.BonusPoint.Member.MemberEntity.
  • AutoCount.GeneralMaint.MemberTypeMaintenance.MemberTypeCommand => AutoCount.BonusPoint.Member.MemberTypeCommand.
  • AutoCount.GeneralMaint.MemberTypeMaintenance.MemberTypeEntity => AutoCount.BonusPoint.Member.MemberTypeEntity
  • AutoCount.GeneralMaint.RaceMaintenance.RaceCommand => AutoCount.BonusPoint.Race.RaceCommand.
  • AutoCount.GeneralMaint.RaceMaintenance.RaceEntity => AutoCount.BonusPoint.Race.RaceEntity.


To download the assemblies to your project, start a new project or open a project, then go to Tools | NuGet Package Manager | Manage NuGet Packages for Solution...

Tips icons.png If unsure of which NuGet package to install, select AutoCount2.MainEntry package is sufficient for most project.


At the "Browse" tab, search for "autocount2".


Select the package that is based on the project requirement and click install.


NuGet Packages Dependency Charts


For example, when NuGet package AutoCount2.Sales is installed, below packages are installed simultaneously:-

  • AutoCount2.Stock
    • AutoCount2.Invoicing
      • AutoCount2.Inquiry
  • AutoCount2.ARAP
    • AutoCount2.Accounting.UI
      • AutoCount2.UI
        • AutoCount2.Accounting
          • AutoCount2

Another example, when NuGet package AutoCount2.MainEntry is installed, below packages are installed simultaneously:-

  • AutoCount2.FinancialReport
    • AutoCount2.Accounting.UI
      • AutoCount2.UI
        • AutoCount2.Accounting
          • AutoCount2
  • AutoCount2.Tools
    • AutoCount2.GL
    • AutoCount2.GeneralMaint
    • AutoCount2.GST
      • AutoCount2.Inquiry
    • AutoCount2.Purchase
      • AutoCount2.Sales
        • AutoCount2.Stock
          • AutoCount2.Invoicing
        • AutoCount2.ARAP

Visual Studio Extensions

Go to menu

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