AutoCount Accounting 2.1 API

From AutoCount Resource Center

Introduction to AutoCount Accounting 2.1.0.1

First release of AutoCount Accounting 2.1.0.1 is the continuous update to previous version of 2.0.

This release there are some new namespace and 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
  2. DevExpress WinForms 19.2.7
  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 2.1.0.1
  4. AutoCount Accounting 2.1.0.1 Setup

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 that allow user to call the subprojectstartup.

MainEntry in AutoCount.Accounting.dll

MainEntry.Startup
This MainEntry is suitable for integration use, or when no user interaction is required to access and initiate AutoCount Accounting.

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.Accounting.UI.dll

MainEntry.MainStartup
This startup calls the AutoCount Accounting user login form, and successful login 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
    //Example
    AutoCount.Data.DBSetting dbSetting = userSession.DBSetting;
    bool isLogin = userSession.IsLogin;
    string userId = userSession.LoginUserID;
}

MainEntry in AutoCount.MainEntry.dll

MainEntry.UIStartup
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);
}

NuGet

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...

VSmenuNuget.png

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

VSNugetAC21Package.png

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

VSNugetInstallPackage.png

NuGet Packages Dependency Charts

NugetAC21DependencyCharts.png

For example, when selected NuGet package is AutoCount2.Sales, below packages will be downloaded:-

  1. AutoCount2.Sales
  2. AutoCount2.ARAP
  3. AutoCount2.Accounting.UI
  4. AutoCount2.UI
  5. AutoCount2.Accounting
  6. AutoCount2

Visual Studio Extensions

Go to menu

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