Changes in version 1.8.8
Posted on August 27, 2014 | By Chin Peng Choo
The biggest changes in version 1.8.8 is to remove dependency on BCE.AutoCount.Application class.
In order to do so, we have created BCE.AutoCount.Settings namespace to cache the database setting value, and BCE.AutoCount.Authentication namespace to implement the authentication and authorization by each database.
Contents
- 1 1. BCE.AutoCount.Settings namespace
- 2 2. BCE.AutoCount.Authentication namespace
- 3 3. BCE.AutoCount namespace
- 4 4. BCE.AutoCount.FilterUI namespace
- 5 5. BCE.AutoCount.MainEntry namespace
- 6 6. BCE.Application namespace
- 7 7. Others
1. BCE.AutoCount.Settings namespace
The BCE.AutoCount.Settings namespace contains classes, and enums that support the caching of database setting value.
1.1. DecimalSetting class
DecimalSetting class is used to cache the decimal settings of the database, the key to retrieve the object from the cache is DBSetting. This class provides all rounding methods, formatting methods, and CustomDisplayFormatInfo, and decimal properties as previously found in BCE.AutoCount.Application.RoundXXXXX(), BCE.AutoCount.Application.FormatXXXX(), BCE.AutoCount.Application.XXXXDecimal, BCE.AutoCount.Application.XXXXCustomDisplayFormatInfo().
Constructor
To get or create a new DecimalSetting object from the system, use the syntax below:
BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting)
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Application.RoundXXXX() | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).RoundXXXX() |
BCE.AutoCount.Application.RoundPrice() | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).RoundSalesPrice() | |
2 | BCE.AutoCount.Application.XXXXDecimal | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).XXXXDecimal |
BCE.AutoCount.Application.PriceDecimal | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).SalesPriceDecimal | |
3 | BCE.AutoCount.Application.FormatXXXX() | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).FormatXXXX() |
BCE.AutoCount.Application.FormatPrice() | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).FormatSalesPrice() | |
4 | BCE.AutoCount.Application.RoundToXXXXDBDecimal() | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).RoundToXXXXDBDecimal() |
BCE.AutoCount.Application.RoundToPriceDBDecimal() | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).RoundToSalesPriceDBDecimal() | |
5 | BCE.AutoCount.Application.EncodeStockCost(decimal value) | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).FormatEncodedCost(decimal value) |
6 | BCE.AutoCount.Application.ZeroCurrencyAsEmptyFormatString | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).ZeroCurrencyAsEmptyFormatString |
7 | BCE.AutoCount.Application.ZeroCurrencyAsDashFormatString | BCE.AutoCount.Settings.DecimalSetting.GetOrCreate(dbSetting).ZeroCurrencyAsDashFormatString |
8 | BCE.AutoCount.Application.GetNumericFormatString(int noOfDecimal, int negativePattern, int index, ZeroFormat zeroFormat) | Settings.DecimalSetting.BuildNumericFormatString(BuildNumericFormatString(int noOfDecimal, NegativePattern negativePattern, int index, ZeroFormat zeroFormat) |
9 | BCE.AutoCount.Application.GetNumericFormatString(int noOfDecimal, int negativePattern, int index) | Settings.DecimalSetting.BuildNumericFormatString(BuildNumericFormatString(int noOfDecimal, NegativePattern negativePattern, int index, ZeroFormat.Standard) |
10 | BCE.AutoCount.Application.GetNumericFormatString(int noOfDecimal, int negativePattern, int index) | Settings.DecimalSetting.BuildNumericFormatString(BuildNumericFormatString(int noOfDecimal, NegativePattern negativePattern, int index, ZeroFormat.Standard) |
1.2. GeneralSetting class
GeneralSetting class is used to cache the general settings of the database such as local currency code, company profile, short date format. The key to retrieve the object from the cache is DBSetting.
Constructor
To get or create a new GeneralSetting object from the system, use the syntax below:
BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting)
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Application.LocalCurrencyCode | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).LocalCurrencyCode |
2 | BCE.AutoCount.Application.LocalCurrencySymbol | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).LocalCurrencySymbol |
3 | BCE.AutoCount.Application.SearchCommandTimeout | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).SearchCommandTimeout |
4 | BCE.AutoCount.Application.CommandTimeout | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).CommandTimeout |
5 | BCE.AutoCount.Application.CompanyProfile | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).CompanyProfile |
6 | BCE.AutoCount.Application.ShortDateFormat | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).ShortDateFormat |
7 | BCE.AutoCount.Application.FormatDate() | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).FormatDate() |
8 | BCE.AutoCount.Application.FormatBoolean() | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).FormatBoolean() |
9 | BCE.AutoCount.Application.RemoteCreditControlPoolingInterval | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).RemoteCreditControlPoolingInterval |
10 | BCE.AutoCount.Application.RefreshCurrency() | BCE.AutoCount.Settings.GeneralSetting.GetOrCreate(dbSetting).LoadCurrency() |
1.3. DefaultAccountSetting class
DefaultAccountSetting class is used to cache the default account settings of the database. The key to retrieve the object from the cache is DBSetting.
Constructor
To get or create a new DefaultAccountSetting object from the system, use the syntax below:
BCE.AutoCount.Settings.DefaultAccountSetting.GetOrCreate(dbSetting)
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Application.DefaultAccount.SaleAccNo | BCE.AutoCount.Settings.DefaultAccountSetting.GetOrCreate(dbSetting).SaleAccNo |
2 | BCE.AutoCount.Application.DefaultAccount.CashSaleAccNo | BCE.AutoCount.Settings.DefaultAccountSetting.GetOrCreate(dbSetting).CashSaleAccNo |
3 | BCE.AutoCount.Application.DefaultAccount.SaleReturnAccNo | BCE.AutoCount.Settings.DefaultAccountSetting.GetOrCreate(dbSetting).SaleReturnAccNo |
4 | BCE.AutoCount.Application.DefaultAccount.SaleDiscountAccNo | BCE.AutoCount.Settings.DefaultAccountSetting.GetOrCreate(dbSetting).SaleDiscountAccNo |
5 | BCE.AutoCount.Application.DefaultAccount.PurchaseAccNo | BCE.AutoCount.Settings.DefaultAccountSetting.GetOrCreate(dbSetting).PurchaseAccNo |
6 | BCE.AutoCount.Application.DefaultAccount.PurchaseReturnAccNo | BCE.AutoCount.Settings.DefaultAccountSetting.GetOrCreate(dbSetting).PurchaseReturnAccNo |
7 | BCE.AutoCount.Application.DefaultAccount.PurchaseDiscountAccNo | BCE.AutoCount.Settings.DefaultAccountSetting.GetOrCreate(dbSetting).PurchaseDiscountAccNo |
1.4. TempDocumentSetting class
TempDocumentSetting class is used to store the settings of temporary document that was used in Save in KIV folder feature or Auto-save feature. The setting is regardless of database, so there is only one static instance of the class called Default.
Constructor
To access to the default TempDocumentSetting, use the syntax below:
BCE.AutoCount.Settings.TempDocumentSetting.Default
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Application.TempDocument.EnableAutoSave | BCE.AutoCount.Settings.TempDocumentSetting.Default.EnableAutoSave |
2 | BCE.AutoCount.Application.TempDocument.AutoSaveSeconds | BCE.AutoCount.Settings.TempDocumentSetting.Default.AutoSaveSeconds |
3 | BCE.AutoCount.Application.TempDocument.UseCompressionInAutoSave | BCE.AutoCount.Settings.TempDocumentSetting.Default.UseCompressionInAutoSave |
1.5. ReportSetting class
ReportSetting class is used to cache the report settings of the database. The key to retrieve the object from the cache is DBSetting.
Constructor
To get or create a new ReportSetting object from the system, use the syntax below:
BCE.AutoCount.Settings.ReportSetting.GetOrCreate(dbSetting)
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Application.ShowReportMarginWarning | BCE.AutoCount.Settings.ReportSetting.GetOrCreate(dbSetting).ShowReportMarginWarning |
2 | BCE.AutoCount.Application.TempDocument.ReportDesigner_SnapToGrid | BCE.AutoCount.Settings.ReportSetting.GetOrCreate(dbSetting).ReportDesigner_SnapToGrid |
3 | BCE.AutoCount.Application.TempDocument.ReportDesigner_DrawGrid | BCE.AutoCount.Settings.ReportSetting.GetOrCreate(dbSetting).ReportDesigner_DrawGrid |
1.6. BonusPointSetting class
BonusPointSetting class is used to cache the bonus point settings of the database. The key to retrieve the object from the cache is DBSetting.
Constructor
To get or create a new BonusPointSetting object from the system, use the syntax below:
BCE.AutoCount.Settings.BonusPointSetting.GetOrCreate(dbSetting)
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Application.BonusPoint.EntitledDollars | BCE.AutoCount.Settings.BonusPointSetting.GetOrCreate(dbSetting).EntitledDollars |
2 | BCE.AutoCount.Application.BonusPoint.EntitledBonusPoint | BCE.AutoCount.Settings.BonusPointSetting.GetOrCreate(dbSetting).EntitledBonusPoint |
2. BCE.AutoCount.Authentication namespace
The BCE.AutoCount.Authentication namespace contains classes, and delegates that support the authentication and authorization of each database.
2.1. UserAuthentication class
UserAuthentication class is used to authenticate the user login by databases. In order to allow the authentication separated by each database, we have stored the UserAuthentication in a cache so that it can be retrieved pretty fast. The key to retrieve the object from the cache is DBSetting.
To login to the database, call the Login method.
public bool Login(string userID, string password)
To get the current login user id, use the LoginUserID property.
public string LoginUserID
To check if user has login to the database, use the IsLogin property.
public bool IsLogin
To get an AccessRight object to check for authorization, use the AccessRight property.
public BCE.AutoCount.Authentication.AccessRight AccessRight
Constructor
To get or create a new UserAuthentication object from the system, use the syntax below:
BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting)
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Application.Login(userID, password) | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).Login(userID, password) |
2 | BCE.AutoCount.Application.DBSession.LoginUserID | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).LoginUserID |
3 | BCE.AutoCount.Application.DBSession.IsLogin | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).IsLogin |
4 | BCE.AutoCount.Application.AccessRight | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).AccessRight |
5 | BCE.AutoCount.Application.FilterAgent | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).FilterAgent |
6 | BCE.AutoCount.Application.MainLocation | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).MainLocation |
7 | BCE.AutoCount.Application.DefaultProject | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).DefaultProject |
8 | BCE.AutoCount.Application.DefaultDepartment | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).DefaultDepartment |
9 | BCE.AutoCount.Application.CheckAuthorizedAccess() | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).CheckHasLogined() |
10 | BCE.AutoCount.Application.RefreshFilterAgent() | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).ReloadFilterAgent() |
11 | BCE.AutoCount.Application.AutoCheckPendingCreditControl | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).AutoCheckPendingCreditControl |
12 | BCE.AutoCount.Application.NetworkUserType | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).NetworkUserType |
13 | BCE.AutoCount.Application.Authenticate() | BCE.AutoCount.Authentication.UserAuthentication.Authenticate() |
14 | BCE.Data.FormVerifyCurrentPassword | BCE.AutoCount.Authentication.FormVerifyCurrentPassword |
15 | BCE.AutoCount.Application.DBSession.Logout() | BCE.AutoCount.Authentication.UserAuthentication.GetOrCreate(dbSetting).Logout() |
16 | BCE.Application.AccessRight | BCE.AutoCount.Authentication.AccessRight |
17 | BCE.Application.DBSession | BCE.AutoCount.Authentication.DBSession |
18 | BCE.Application.AccessRightListenerDelegate | BCE.AutoCount.Authentication.AccessRightListenerDelegate |
19 | BCE.Application.AccessRightOverrideDelegate | BCE.AutoCount.Authentication.AccessRightOverrideDelegate |
20 | BCE.Application.AccessRight.AccessRightMap | BCE.AutoCount.Authentication.AccessRightMap |
21 | BCE.Data.FormGetUserPassword | BCE.AutoCount.Authentication.FormGetUserPassword |
22 | BCE.Data.FormAccessDenied | BCE.AutoCount.Authentication.FormAccessDenied |
23 | BCE.AutoCount.AccessRight.AccessRightMap | BCE.AutoCount.Authentication.AccessRightMap |
24 | BCE.AutoCount.AccessRight.AccessRightRecord | BCE.AutoCount.Authentication.AccessRightRecord |
25 | BCE.AutoCount.AccessRight.DefaultAccessRightMap | BCE.AutoCount.Authentication.DefaultAccessRightMap |
26 | BCE.AutoCount.AccessRight.DefaultAccessRightHelper | BCE.AutoCount.Authentication.DefaultAccessRightHelper |
3. BCE.AutoCount namespace
3.1. PersistenceUtil class
The BCE.AutoCount.PersistenceUtil class contains a set of static methods to persist the application state.
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Application.UserSettingDataPath | BCE.AutoCount.PersistenceUtil.UserSettingDataPath |
2 | BCE.AutoCount.Application.SaveSettings() | BCE.AutoCount.PersistenceUtil.SaveSetting() |
3 | BCE.AutoCount.Application.LoadSettings() | BCE.AutoCount.PersistenceUtil.LoadSetting() |
4 | BCE.AutoCount.Application.SaveUserSettings() | BCE.AutoCount.PersistenceUtil.SaveUserSetting() |
5 | BCE.AutoCount.Application.LoadUserSettings() | BCE.AutoCount.PersistenceUtil.LoadUserSetting() |
6 | BCE.AutoCount.Application.LoadCacheData() | BCE.AutoCount.PersistenceUtil.LoadCacheData() |
7 | BCE.AutoCount.Application.SaveCacheData() | BCE.AutoCount.PersistenceUtil.SaveCacheData() |
8 | BCE.AutoCount.Application.LoadCriteriaData() | BCE.AutoCount.PersistenceUtil.LoadCriteriaData() |
9 | BCE.AutoCount.Application.SaveCriteriaData() | BCE.AutoCount.PersistenceUtil.SaveCriteriaData() |
3.2. DecimalNumberFormatInfo class
This class was formerly known as BCE.AutoCount.Common.FormatInfo.CustomDisplayFormatInfo. This class implements the display formatting of decimal number with specified negative pattern and optional extra decimal in the current UI culture.
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Common.FormatInfo.CustomDisplayFormatInfo | BCE.AutoCount.DecimalNumberFormatInfo |
3.3. SystemOptionPolicy class
Previously this class is a static class, now it has been changed to normal class so that we can cache the setting of SystemOptionPolicy by each database. The key to retrieve the object from the cache is DBSetting.
Constructor
To get or create a new SystemOptionPolicy object from the system, use the syntax below:
BCE.AutoCount.SystemOptionPolicy.GetOrCreate(dbSetting)
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.SystemOptionPolicy.XXXXSystemOptionPolicy | BCE.AutoCount.SystemOptionPolicy.GetOrCreate(dbSetting).XXXXSystemOptionPolicy |
3.4. DefaultLookupEditBuilder class
Previously this class is a static class, now it has been changed to normal class so that we can cache the setting of DefaultLookupEditBuilder by each database. The key to retrieve the object from the cache is DBSetting.
Constructor
To get or create a new DefaultLookupEditBuilder object from the system, use the syntax below:
BCE.AutoCount.XtraUtils.DefaultLookupEditBuilder.GetOrCreate(dbSetting)
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.XtraUtils.DefaultLookupEditBuilder.XXXXLookupEditBuilder | BCE.AutoCount.XtraUtils.DefaultLookupEditBuilder.GetOrCreate(dbSetting).XXXXLookupEditBuilder |
3.5. LookupEditBuilderEx class
The following methods in BCE.AutoCount.XtraUtils.LookupEditBuilder.LookupEditBuilderEx class have been removed.
BuildDataTable();
BuildLookupEdit(RepositoryItemLookUpEdit lookupEdit);
They are provided with another override methods that needs to supply DBSetting.
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.XtraUtils.LookupEditBuilder.LookupEditBuilder.BuildDataTable() | BCE.AutoCount.XtraUtils.LookupEditBuilder.LookupEditBuilder.BuildDataTable(dbSetting) |
2 | BCE.AutoCount.XtraUtils.LookupEditBuilder.LookupEditBuilder.BuildLookupEdit(repItemEdit) | BCE.AutoCount.XtraUtils.LookupEditBuilder.LookupEditBuilder.BuildLookupEdit(repItemEdit, dbSetting) |
4. BCE.AutoCount.FilterUI namespace
4.1 Remove of Initialize method with no parameter in all UCXXXX user controls
The following methods in BCE.AutoCount.FilterUI.UCXXXX user controls have been removed.
public void Initialize(Filter filter)
Instead they are replaced with:
public void Initialize(DBSetting dbSetting, Filter filter)
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.FilterUI.UCXXXX.Initialize(Filter filter) | BCE.AutoCount.FilterUI.UCXXXX.Initialize(DBSetting dbSetting, Filter filter) |
5. BCE.AutoCount.MainEntry namespace
4.1 Change the public static methods in Startup class to public instance methods
Most of the public static methods in Startup class were changed to public instance methods, so in order to access those methods, you have to access to a static variable called Default.
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.MainEntry.Startup.SubProjectStartup(DBSetting dbSetting) | BCE.AutoCount.MainEntry.Startup.Default.SubProjectStartup(DBSetting dbSetting) |
2 | BCE.AutoCount.MainEntry.Startup.SubProjectStartupWithLogin(string dmfPath, string loginTitle) | BCE.AutoCount.MainEntry.Startup.Default.SubProjectStartupWithLogin(string dmfPath, string loginTitle) |
3 | BCE.AutoCount.MainEntry.Startup.RunMainForm(DBSetting dbSetting) | BCE.AutoCount.MainEntry.Startup.Default.RunMainForm(DBSetting dbSetting) |
4 | BCE.AutoCount.MainEntry.Startup.Shutdown(DBSetting dbSetting) | BCE.AutoCount.MainEntry.Startup.Default.Shutdown() |
6. BCE.Application namespace
6.1. Remove of BCE.Application.Application class
The BCE.Application.Application class has been deprecated, it has been replaced with BCE.Application.ProductVersion, BCE.Application.PathHelper, and BCE.AutoCount.PersistenceUtil classes.
Conversion Rule
The following are the rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.Application.Application.GetFullProductVersion() | BCE.Application.ProductVersion.GetFullProductVersion() |
2 | BCE.Application.Application.GetCompleteProductVersion() | BCE.Application.ProductVersion.GetCompleteProductVersion() |
3 | BCE.Application.Application.GetProductVersion() | BCE.Application.ProductVersion.GetProductVersion() |
4 | BCE.Application.Application.GetMajorMinorProductVersion() | BCE.Application.ProductVersion.GetMajorMinorProductVersion() |
5 | BCE.Application.Application.AppOEM | BCE.Application.OEM.GetCurrentOEM() |
6 | BCE.Application.Application.GetStartupFile() | BCE.Application.PathHelper.GetStartupFile() |
7 | BCE.Application.Application.SaveSettings() | BCE.AutoCount.PersistenceUtil.SaveSetting() |
8 | BCE.Application.Application.LoadSettings() | BCE.AutoCount.PersistenceUtil.LoadSetting() |
9 | BCE.Application.Application.CommonApplicationDataPath | BCE.Application.PathHelper.CommonApplicationDataPath |
10 | BCE.Application.Application.ApplicationDataPath | BCE.Application.PathHelper.ApplicationDataPath |
11 | BCE.Application.Application.UserSettingDataPath | BCE.AutoCount.PersistenceUtil.UserSettingDataPath |
12 | BCE.Application.Application.SaveUserSettings() | BCE.AutoCount.PersistenceUtil.SaveUserSetting() |
13 | BCE.Application.Application.LoadUserSettings() | BCE.AutoCount.PersistenceUtil.LoadUserSetting() |
7. Others
7.1 BCE.Utils.UI.dll assembly file
All the code which depends on System.Windows.Forms.dll and DevExpress components are now put into a new assembly file: BCE.Utils.UI.dll. The original assembly file BCE.Utils.dll contains only logic code. So you must add reference to BCE.Utils.UI.dll in your plug-in project or standalone project.
7.2. Removing of Application script
The EncodingCost method of Application script was moved to DecimalSetting script. Besides, the parameter of EncoidngCost becomes EncodingCost(DBSetting dbSetting, decimal cost);
The OnBarCodeInput method and ScanBarCode method of Application script was moved to ScanBarCodeControl script.
The OnInitialize method of Application script was moved to Startup script. And it has a new name called OnInitializeDBSetting.
Remove of Application script.
7.3. Constructor of classes require DBSetting
The following are the classes whose constructor requires to pass in DBSetting as first parameter.
new BCE.AutoCount.GL.BankTrans(dbSetting, …)
new BCE.AutoCount.Tax.TaxTrans(dbSetting, …)
new BCE.AutoCount.Tax.WithholdingTrans(dbSetting, …)
new BCE.AutoCount.Common.AuditTrail.DocumentAuditTrail(dbSetting, …)
new BCE.AutoCount.Stock.StockTrans(dbSetting, …)
new BCE.AutoCount.XtraUtils.FormControlUtil(dbSetting, …)
new BCE.AutoCount.Report.DocumentReportDataSet(dbSetting, …)
7.4. Other changes
The following are the other changes rules to change from older version to version 1.8.8.
No. | Old syntax | New syntax |
1 | BCE.AutoCount.Application.DefaultDatabaseFolder | BCE.AutoCount.DatabaseManagement.DefaultDatabaseFolder |
2 | BCE.AutoCount.XtraUtils.GridViewUtils.DrawFilterBySalesAgent(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e) | new BCE.AutoCount.XtraUtils.FilterByAgentHelper(DBSetting dbSetting).DrawFilterBySalesAgent(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e) |
3 | BCE.AutoCount.XtraUtils.GridViewUtils.DrawFilterByPurchaseAgent(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e) | new BCE.AutoCount.XtraUtils.FilterByAgentHelper(DBSetting dbSetting).DrawFilterByPurchaseAgent(object sender, DevExpress.XtraGrid.Views.Base.CustomDrawEventArgs e) |
4 | BCE.AutoCount.Data.SqlDataAccess.GetDocumentPrintCount() | BCE.AutoCount.Data.DocumentHelper.GetDocumentPrintCount() |
5 | BCE.AutoCount.Application.ModuleController | BCE.AutoCount.LicenseControl.ModuleControl.GetOrCreate(myDBSetting).ModuleController |
6 | BCE.AutoCount.FaxHelper.SendFaxToCreditor(string documentName, string fileName, string faxServerName, string[] creditorCodes) | BCE.AutoCount.FaxHelper.SendFaxToCreditor(DBSetting dbSetting, string documentName, string fileName, string faxServerName, string[] creditorCodes) |
7 | BCE.AutoCount.FaxHelper.SendFaxToDebtor(string documentName, string fileName, string faxServerName, string[] debtorCodes) | BCE.AutoCount.FaxHelper.SendFaxToDebtor(DBSetting dbSetting, string documentName, string fileName, string faxServerName, string[] debtorCodes) |
8 | BCE.Win32.Helper.SetUniqueWindowCaption() | BCE.AutoCount.WinForms.FormHelper.SetUniqueWindowCaption() |
9 | BCE.AutoCount.Data.CommonRecordUtils.GetXXXXXX(…) | BCE.AutoCount.Data.CommonRecordUtils.GetXXXXXX(dbSetting, …) |