Search website

BCE.AutoCount.UDF namespace

Introduction

This post will discuss the BCE.AutoCount.UDF namespace available in AutoCount Accounting. It will cover the methods and properties of the classes used in creating and maintaining the UDF and UDL required by normal users.

Classes

BaseUDF class

The BaseUDF class is an abstract class that is inherited by all of the UDF type class.

Namespace:BCE.AutoCount.UDF
Properties:
NameTypeDescription
DefaultValuestringReturns or Set the default value of the UDF
RequiredbooleanReturns or Set the Required flag
UniquebooleanReturns or Set the Unique flag

BooleanUDF class

This class provides properties for the boolean field.

Namespace:BCE.AutoCount.UDF
Properties:
NameTypeDescription
DefaultValueobjectReturns or Set the default value of the BooleanUDF

DateType enum

The enum for the date types.

Enum Name
Date
DateTime
Time

DateUDF class

This class provides properties for the date field.

Namespace:BCE.AutoCount.UDF
Properties:
NameTypeDescription
DateTypeBCE.AutoCount.UDF.DateTypeReturns or Set the date type of the DateUDF
DefaultValueobjectReturns or Set the default value of the BooleanUDF

DecimalUDF class

This class provides properties for the decimal field.

Namespace:BCE.AutoCount.UDF
Properties:
NameTypeDescription
DateTypeBCE.AutoCount.UDF.DateTypeReturns or Set the date type of the DateUDF
DefaultValueobjectReturns or Set the default value of the BooleanUDF
Formulastring
PrecisionintReturns or Set the Precision (number of digits in a number) of the Decimal UDF
ScaleintReturns or Set the Scale (number of digits to the right of the decimal point in a number) of the Decimal UDF

Field class

This class is use to hold the user defined field record.

Namespace:BCE.AutoCount.UDF
Constructor:Field()
Properties:
NameTypeDescription
BooleanPropertiesBCE.AutoCount.UDF.BooleanUDFAccess the BooleanUDF properties (for UDFType Boolean)
CaptionstringReturn or Set the Caption of the UDF
DatePropertiesBCE.AutoCount.UDF.DateUDFAccess the DateUDF properties (for UDFType Date)
DecimalPropertiesBCE.AutoCount.UDF.DecimalUDFAccess the DecimalUDF properties (for UDFType Decimal)
ImageLinkPropertiesBCE.AutoCount.UDF.ImageLinkUDFAccess the ImageLinkUDF properties (for UDFType ImageLink)
IntegerPropertiesBCE.AutoCount.UDF.IntegerUDFAccess the IntegerUDF properties (for UDFType Integer)
MemoPropertiesBCE.AutoCount.UDF.MemoUDFAccess the MemoUDF properties (for UDFType Memo)
Namestring
PropertiesBCE.AutoCount.UDF.BaseUDFAccess the BaseUDF properties
SystemPropertiesBCE.AutoCount.UDF.SystemUDFAccess the SystemUDF properties (for UDFType System)
TextPropertiesBCE.AutoCount.UDF.TextUDFAccess the TextUDF properties (for UDFType Text)
TypeBCE.AutoCount.UDF.UDFTypeReturn or Set the Type of the UDF

ImageLinkUDF class

This class provides properties for the image link field. The ImageLinkUDF class inherits the properties available in the BaseUDF class.

IntegerUDF class

This class provides properties for the integer field.

Namespace:BCE.AutoCount.UDF
Properties:
NameTypeDescription
DefaultValueobjectReturns or Set the default value of the IntegerUDF

Layout class

Namespace:BCE.AutoCount.UDF
Constructor:Layout()

LayoutItem class

Namespace:BCE.AutoCount.UDF
Constructor:LayoutItem()

LayoutPage class

Namespace:BCE.AutoCount.UDF
Constructor:LayoutPage()

List class

This class is use to store the data of a list.

Namespace:BCE.AutoCount.UDF
Constructor:List()
Properties:
NameTypeDescription
NamestringReturn or Set the list name
Methods:
NameParameterDescription
GetItems()Returns an array of string containing the list items.
SetItems(string[] items)items: List itemsSets the list items

MaskType enum

The enum for the edit mask types.

Enum Name
None
Regex
Simple

MemoUDF class

This class provides properties for the memo field. The MemoUDF class inherits the properties available in the BaseUDF class.

RichTextUDF class

This class provides properties for the rich text field. The RichTextUDF class inherits the properties available in the BaseUDF class.

SupportedUDF class

This class provides methods to allow new data tables be UDF supported. All the methods in this class is static hence to use it, you do not need to initialize the class

Namespace:BCE.AutoCount.UDF
Constructor:SupportedUDF()
Properties:
NameTypeDescription
SupportedUDFTableCountintReturns the number of UDF supported table
Methods:
NameParameterDescription
AddSupportedUDFTable(string tableName, string category, string description, bool isPos)tableName: the table name
category: the category to show the table under (in UDF window)
description: the description of the udf
isPos: is the table under POS system
Adds the specified table as a UDF supported table
AddSupportedUDFTable(string tableName, string category, string description)tableName: the table name
category: the category to show the table under (in UDF window)
description: the description of the udf
Adds the specified table as a UDF supported table
GetSupportedUDFTableInfo(int index, out string tableName, out string category, out string description, out bool isPOS)index: index of the table
tableName: returns the table name
category: returns the category
description: returns the description
isPos: returns the flag if the table is under the POS system
Get the UDF Supported Table info using the index of the table
IsPOSTableInstalled(BCE.Data.DBSetting dbSetting)dbSetting: a DBSetting objectChecks if the database has POS table installed

SystemType enum

The enum for the system field types.

Enum Name
Account
AreaCode
CNType
Creditor
CreditorType
CreditTerm
Currency
Debtor
DebtorType
Department
DNType
ItemCode
ItemGroup
ItemType
Location
PaymentMethod
PriceCategory
Project
PurchaseAgent
SalesAgent
ShippingMethod

SystemUDF class

This class provides properties for the system field.

Namespace:BCE.AutoCount.UDF
Properties:
NameTypeDescription
CustomDataTypestringReturns or sets the data type
ShowLabelboolReturns or sets whether to show the description label.

TextUDF class

This class provides properties for the text field.

Namespace:BCE.AutoCount.UDF
Properties:
NameTypeDescription
InputMaskstringReturns or sets the input mask
LimitToListboolReturns or sets whether to limit the input to list values
ListNamestringReturns or sets the list name. An empty string means no list to be used
MaskTypeBCE.AutoCount.UDF.MaskTypeReturns or sets the input mask type
SizeintReturns or sets the field size

UCSystemUDF class

Namespace:BCE.AutoCount.UDF
Constructor:UCSystemUDF()
Properties:
NameTypeDescription
DBSettingBCE.Data.DBSettingReturns or sets the database setting
DescriptionColumnstringReturns or sets the description column
IDColumnstringReturns or sets the ID column
LookUpEditDevExpress.XtraEditors.LookupEditReturns the lookup editor
TableNamestringReturns or sets the table name.

UDFColumn class

This class is use to store the field name and caption of a UDF column.

Namespace:BCE.AutoCount.UDF
Constructor:UDFColumn(string actualFieldName string caption BCE.AutoCount.UDF.UDFDateSubType dateSubType)
UDFColumn(string actualFieldName string caption BCE.AutoCount.UDF.UDFType type)
UDFColumn(string actualFieldName string caption)
Properties:
NameTypeDescription
ActualFieldNamestringReturns the actual field name
CaptionstringReturns the caption
DateSubTypeBCE.AutoCount.UDF.UDFDateSubTypeReturns the UDF Date Sub Type
FieldNamestringReturns the field name
TypeBCE.AutoCount.UDF.UDFTypeReturns the UDF Type

UDFDateSubType enum

The enum for the UDF Date Sub types.

Enum Name
Date
DateTime
Time

UDFLayout class

This class is used to manage the UDF layout.

Namespace:BCE.AutoCount.UDF
Constructor:UDFLayout(string tableName, BCE.Data.DBSetting dbSetting)

UDFList class

This class is used to manage the UDF lists.

Namespace:BCE.AutoCount.UDF
Constructor:UDFList(BCE.Data.DBSetting dbSetting)
Properties:
NameTypeDescription
this[string listName]BCE.AutoCount.UDF.ListReturns the list by name. Returns null if field not found
Methods:
NameParameterDescription
Add(string name, string[] items)name: List name
items: List of items
Adds a List into the current UDFList object.
Add(BCE.AutoCount.UDF.List list)list: A List objectAdds a List into the current UDFList.
Delete(string name)name: The name of the UDF ListDeletes the UDF List. Returns a boolean value.
GetNames()Returns an array of string containing the names of List stored in the UDFList
IsValidFieldName(string name)name: the list nameChecks if the list name is valid for the UDFList. Returns a boolean value.
Save()Saves the UDFList object.

UDFTable class

This class is used to manage the UDF of a table.

Namespace:BCE.AutoCount.UDF
Constructor:UDFTable(string tableName, BCE.Data.DBSetting dbSetting)
Properties:
NameTypeDescription
CountintReturns the number of fields
TableSystem.Data.DataTableReturns the DataTable of the UDFTable
this[string name]BCE.AutoCount.UDF.FieldReturns the field by name. Returns null if field not found
this[int index]BCE.AutoCount.UDF.FieldReturns the field by the specified index. Returns null if field not found
Methods:
NameParameterDescription
Add(string name, BCE.AutoCount.UDF.UDFType type, string caption)name: Field name
type: Field type
caption: Caption
Adds a UDF Field into the current UDFTable. Returns a new field object.
Add(BCE.AutoCount.UDF.Field field)field: The UDF Field objectAdds a UDF Field into the current UDFTable. Returns an integer index of the field.
Delete(string name)name: The name of the UDF FieldDeletes the UDF Field in the UDF Table. Returns a boolean value.
Delete(int index)index: the index of the field.Deletes the UDF Field in the UDF Table by using the index of the UDF Field.
IsValidFieldName(string name)name: the field name of the fieldChecks if the field name is valid for the UDF table. Returns a boolean value.
Move(int index, int newIndex)index: The current index of the field you wish to move
newIndex: The new index you wish to move the field to
Move a UDF Field to a new index from its old position.
Save()Saves the UDFTable object.

UDFType enum

The enum for the UDF field types.

Enum Name
Boolean
Date
Decimal
ImageLink
Integer
Memo
RichText
System
Text

UDFUtil class

The utility class that handles general UDF User Interface setup and Search capabilities.

Namespace:BCE.AutoCount.UDF
Constructor:UDFUtil(BCE.Data.DBSetting dbSetting)
Methods:
NameParameterDescription
AddBuildLookupEditEventHandler(BCE.AutoCount.UDF.BuildLookupEditEventHandler handler)handler:
AddUDFIntoAdvancedSearch(BCE.AutoCount.SearchFilter.SearchCriteria criteria, string tableName, string prefix)criteria:
tableName:
prefix:
CreateEditor(string tableName, string udfFieldName, object dataSource)tableName:
udfFieldName:
dataSource:
GenerateUDFSearchString(System.Data.SqlClient.SqlCommand cmd, string masterTableName, string masterAlias, string detailTableName, string detailAlias, string searchMsg)cmd:
masterTableName:
masterAlias:
detailTableName:
detailAlias:
searchMsg:
GenerateUDFSearchString(System.Data.SqlClient.SqlCommand cmd, string tableName, string aliasName, string searchMsg)cmd:
tableName:
aliasName:
searchMsg:
GetUDF(string tableName)
tableName:
GetUDFSQLColumns(string prefix, string tableName)
prefix:
tableName:
SetDefaultValue(string tableName, System.Data.DataTable table)
tableName:
table:
SetupDetailListingReportGrid(DevExpress.XtraGrid.Views.Grid.GridView gridView, string masterTableName, string detailTableName)gridView:
masterTableName:
detailTableName:
SetupGrid(DevExpress.XtraGrid.Views.Grid.GridView gridView, string tableName, bool includeMemoAndRichText)gridView:
tableName:
includeMemoAndRichText:
SetupGrid(DevExpress.XtraGrid.Views.Grid.GridView gridView, string tableName)
gridView:
tableName:
SetupLayoutControl(DevExpress.XtraLayout.TabbedControlGroup tabGroup, string tableName, object dataSource)tabGroup:
tableName:
dataSource:
SetupListingReportGrid(DevExpress.XtraGrid.Views.Grid.GridView gridView, string masterTableName)gridView:
masterTableName:
SetupReadOnlyGrid(DevExpress.XtraGrid.Views.Grid.GridView gridView, string tableName, bool includeMemoAndRichText)gridView:
tableName:
includeMemoAndRichText:
SetupReadOnlyGrid(DevExpress.XtraGrid.Views.Grid.GridView gridView, string tableName)gridView:
tableName:
SetupTabControl(DevExpress.XtraTab.XtraTabControl tabControl, string tableName, object dataSource)
tabControl:
tableName:
dataSource:
SetupTreeListControl(DevExpress.XtraTreeList.TreeList treeList, string tableName, bool includeMemoAndRichText)
treeList:
tableName:
includeMemoAndRichText:
SetupTreeListControl(DevExpress.XtraTreeList.TreeList treeList, string tableName)
treeList:
tableName:
ValidateRequiredColumns(string tableName, System.Data.DataTable table, out System.Data.DataRow outRow, out string columnDisplayName, out string columnName)
tableName:
table:
outRow:
columnDisplayName:
columnName:

UDF Supported Table

The following table list the tables that support UDF in it and can be use together with the UDFTable class.

Table Name
Category
Description
APInvoiceA/PA/P Invoice
APInvoiceDTLA/PA/P Invoice Detail
APDNA/PA/P Debit Note
APDNDTLA/PA/P Debit Note Detail
APCNA/PA/P Credit Note
APCNDTLA/PA/P Credit Note Detail
APPaymentA/PA/P Payment
APPaymentDTLA/PA/P Payment Detail
APRefundA/PA/P Refund
APRefundDTLA/PA/P Refund Detail
APDepositA/PA/P Deposit
APDepositDTLA/PA/P Deposit Detail
ARInvoiceA/RA/R Invoice
ARInvoiceDTLA/RA/R Invoice Detail
ARDNA/RA/R Debit Note
ARDNDTLA/RA/R Debit Note Detail
ARCNA/RA/R Credit Note
ARCNDTLA/RA/R Credit Note Detail
ARPaymentA/RA/R Payment
ARPaymentDTLA/RA/R Payment Detail
ARRefundA/RA/R Refund
ARRefundDTLA/RA/R Refund Detail
ARAPContraA/RA/R A/P Contra
ARDepositA/RA/R Deposit
ARDepositDTLA/RA/R Deposit Detail
BonusPointADJBonus PointBonus Point Adjustment
BonusPointADJDTLBonus PointBonus Point Adjustment Detail
CBG/LCash Book Entry
CBDTLG/LCash Book Entry Detail
JEG/LJournal Entry
JEDTLG/LJournal Entry Detail
DebtorMaintenanceDebtor
CreditorMaintenanceCreditor
DebtorTypeMaintenanceDebtor Type
CreditorTypeMaintenanceCreditor Type
ItemMaintenanceStock Item
ItemUOMMaintenanceStock Item UOM
ItemTypeMaintenanceStock Item Type
ItemGroupMaintenanceStock Group
ItemPriceMaintenanceItem Price
PackageMaintenanceItem Package
PackageDTLMaintenanceItem Package Detail
ItemBOMMaintenanceItem BOM
LocationMaintenanceStock Location
SalesAgentMaintenanceSales Agent
PurchaseAgentMaintenancePurchase Agent
AreaMaintenanceArea
ShippingMethodMaintenanceShipping Method
PriceCategoryMaintenancePrice Category
TaxTypeMaintenanceTax Type
DNTypeMaintenanceD/N Type
CNTypeMaintenanceC/N Type
CURRENCYMaintenanceCurrency
CurrRateMaintenanceCurrency Rate
JournalMaintenanceJournal Type
PaymentMethodMaintenancePayment Method
ProjectMaintenanceProject
DeptMaintenanceDepartment
MemberMaintenanceMember
MemberTypeMaintenanceMember Type
BranchMaintenanceDebtor/Creditor Branch
ItemBatchMaintenanceItem Batch
ASMManufacturingStock Assembly
ASMDTLManufacturingStock Assembly Detail
ASMOrderManufacturingStock Assembly Order
ASMOrderDTLManufacturingStock Assembly Order Detail
BOMOptionalManufacturingBOM Optional
BOMOptionalDTLManufacturingBOM Optional Detail
RQPurchaseRequest for Quotation
RQDTLPurchaseRequest for Quotation Detail
POPurchasePurchase Order
PODTLPurchasePurchase Order Detail
GRPurchaseGoods Received Note
GRDTLPurchaseGoods Received Note Detail
PIPurchasePurchase Invoice
PIDTLPurchasePurchase Invoice Detail
CPPurchaseCash Purchase
CPDTLPurchaseCash Purchase Detail
PRPurchasePurchase Return
PRDTLPurchasePurchase Return Detail
XPPurchaseCancel Purchase Order
XPDTLPurchaseCancel Purchase Order Detail
GTPurchaseGoods Return
GTDTLPurchaseGoods Return Detail
SupplierCSGNPurchaseSupplier Consignment
SupplierCSGNDTLPurchaseSupplier Consignment Detail
QTSalesQuotation
QTDTLSalesQuotation Detail
SOSalesSales Order
SODTLSalesSales Order Detail
DOSalesDeliver Order
DODTLSalesDelivery Order Detail
IVSalesInvoice
IVDTLSalesInvoice Detail
CSSalesCash Sale
CSDTLSalesCash Sale Detail
DNSalesDebit Note
DNDTLSalesDebit Note Detail
CNSalesCredit Note
CNDTLSalesCredit Note detail
XSSalesCancel Sales Order
XSDTLSalesCancel Sales Order Detail
DRSalesDelivery Return
DRDTLSalesDelivery Return Detail
CSGNSalesConsignment
CSGNDTLSalesConsignment Detail
ADJStockStock Adjustment
ADJDTLStockStock Adjustment Detail
ISSStockStock Issue
ISSDTLStockStock Issue Detail
RCVStockStock Receive
RCVDTLStockStock Receive Detail
WOFFStockStock Write-Off
WOFFDTLStockStock Write-Off Detail
UOMConvStockStock UOM Conversion
UOMConvDTLStockStock UOM Conversion Detail
UpdateCostStockStock Update Cost
UpdateCostDTLStockStock Update Cost Detail
XFERStockStock Transfer
XFERDTLStockStock Transfer Detail

Delegates

AfterSaveUDFEventHandler

Represents the method that will handle the AfterSaveUDF event. This is used in the UDFTable Class AfterSaveUDF event.

BuildLookupEditEventHandler

Represents the method that will handle the BuildLookupEdit event.