Class CodeProviderEntry
Represents a code provider entry, usually loaded from the NumberSeries table.
public class CodeProviderEntry
- Inheritance
-
CodeProviderEntry
- Inherited Members
- Extension Methods
Constructors
CodeProviderEntry()
Constructor
public CodeProviderEntry()
CodeProviderEntry(DataRow)
Constructor
public CodeProviderEntry(DataRow Row)
Parameters
RowDataRow
Properties
Code
The unique provider code. Usually maps to NumberSeries.Code and is used as the lookup key. Example: SALES_ORDER, CUSTOMER, SUPPLIER.
public string Code { get; }
Property Value
IsActive
Indicates whether this provider is active.
public bool IsActive { get; }
Property Value
LastResetValue
Stores the last reset marker value. Example: 2026, 2026-05, 2026-Q2. Used to determine whether sequence reset is required.
public string LastResetValue { get; }
Property Value
MaxNumber
Maximum numeric value supported by the pattern. Calculated from the total X token count. Example: XXXX -> 9999 XXX-XXX -> 999999
public int MaxNumber { get; }
Property Value
Name
The display name of this provider.
public string Name { get; }
Property Value
NextNumber
The next numeric value to be generated.
public int NextNumber { get; }
Property Value
NumericDigits
Total number of numeric digits defined by X tokens. All X tokens participate regardless of separators. Example: XXX-XXX -> 6
public int NumericDigits { get; }
Property Value
Pattern
The code generation pattern. Example: SO-YYYY-XXXXXX
public string Pattern { get; }
Property Value
ResetPeriod
Defines the reset period of the generated sequence. Example: Year, Month, Week.
public ResetPeriod ResetPeriod { get; }
Property Value
Methods
Format(DateTime, int)
Formats and returns the final generated code. Replaces date tokens and numeric X positions. Example: Pattern: SO-YYYY-XXXXXX Result : SO-2026-000123
public string Format(DateTime Date, int Number)
Parameters
Returns
GetResetValue(DateTime)
Returns the current reset value according to the configured reset period. Examples: Year -> 2026 Semester -> 2026-S1 Quarter -> 2026-Q2 Month -> 2026-05 Week -> 2026-W20 Day -> 2026-05-18
public string GetResetValue(DateTime Date)
Parameters
DateDateTime
Returns
LoadForm(DataRow)
Loads this instance from a data row
public virtual void LoadForm(DataRow Row)
Parameters
RowDataRow