cudreg-saml2/App_Code/Business Layer/BaseExTraSalaryRecord.vb
2025-06-08 16:22:20 +07:00

635 lines
22 KiB
VB.net

' This class is "generated" and will be overwritten.
' Your customizations should be made in ExTraSalaryRecord.vb
Imports System.Data.SqlTypes
Imports BaseClasses
Imports BaseClasses.Data
Imports BaseClasses.Data.SqlProvider
Namespace Persons.Business
''' <summary>
''' The generated superclass for the <see cref="ExTraSalaryRecord"></see> class.
''' </summary>
''' <remarks>
''' This class is not intended to be instantiated directly. To obtain an instance of this class,
''' use the methods of the <see cref="ExTraSalaryTable"></see> class.
''' </remarks>
''' <seealso cref="ExTraSalaryTable"></seealso>
''' <seealso cref="ExTraSalaryRecord"></seealso>
<Serializable()> Public Class BaseExTraSalaryRecord
Inherits PrimaryKeyRecord
Public Shared Shadows ReadOnly TableUtils As ExTraSalaryTable = ExTraSalaryTable.Instance
' Constructors
Protected Sub New()
MyBase.New(TableUtils)
End Sub
Protected Sub New(ByVal record As PrimaryKeyRecord)
MyBase.New(record, TableUtils)
End Sub
'Evaluates Initialize when->Inserting record formulas specified at the data access layer
Public Overridable Sub ExTraSalaryRecord_InsertingRecord(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Me.InsertingRecord
'Apply Initialize->Inserting record formula only if validation is successful.
Dim ExTraSalaryRec As ExTraSalaryRecord = CType(sender,ExTraSalaryRecord)
Validate_Inserting()
If Not ExTraSalaryRec Is Nothing AndAlso Not ExTraSalaryRec.IsReadOnly Then
End If
End Sub
'Evaluates Initialize when->Updating record formulas specified at the data access layer
Public Overridable Sub ExTraSalaryRecord_UpdatingRecord(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles Me.UpdatingRecord
'Apply Initialize->Updating record formula only if validation is successful.
Dim ExTraSalaryRec As ExTraSalaryRecord = CType(sender,ExTraSalaryRecord)
Validate_Updating()
If Not ExTraSalaryRec Is Nothing AndAlso Not ExTraSalaryRec.IsReadOnly Then
End If
End Sub
'Evaluates Initialize when->Reading record formulas specified at the data access layer
Public Overridable Sub ExTraSalaryRecord_ReadRecord(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ReadRecord
'Apply Initialize->Reading record formula only if validation is successful.
Dim ExTraSalaryRec As ExTraSalaryRecord = CType(sender,ExTraSalaryRecord)
If Not ExTraSalaryRec Is Nothing AndAlso Not ExTraSalaryRec.IsReadOnly Then
End If
End Sub
'Evaluates Validate when->Inserting formulas specified at the data access layer
Public Overridable Sub Validate_Inserting ()
Dim fullValidationMessage As String = ""
Dim validationMessage As String = ""
dim formula as String = ""
If validationMessage <> "" AndAlso validationMessage.ToLower() <> "true" Then
fullValidationMessage &= validationMessage & vbCrLf
End If
If fullValidationMessage <> "" Then
Throw New Exception(fullValidationMessage)
End If
End Sub
'Evaluates Validate when->Updating formulas specified at the data access layer
Public Overridable Sub Validate_Updating ()
Dim fullValidationMessage As String = ""
Dim validationMessage As String = ""
dim formula as String = ""
If validationMessage <> "" AndAlso validationMessage.ToLower() <> "true" Then
fullValidationMessage &= validationMessage & vbCrLf
End If
If fullValidationMessage <> "" Then
Throw New Exception(fullValidationMessage)
End If
End Sub
Public Overridable Function EvaluateFormula(ByVal formula As String, Optional ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord = Nothing, Optional ByVal format As String = Nothing) As String
Dim e As Data.BaseFormulaEvaluator = New Data.BaseFormulaEvaluator()
' All variables referred to in the formula are expected to be
' properties of the DataSource. For example, referring to
' UnitPrice as a variable will refer to DataSource.UnitPrice
e.DataSource = dataSourceForEvaluate
Dim resultObj As Object = e.Evaluate(formula)
If resultObj Is Nothing Then
Return ""
End If
Return resultObj.ToString()
End Function
#Region "Convenience methods to get/set values of fields"
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.ExtraSalaryId field.
''' </summary>
Public Function GetExtraSalaryIdValue() As ColumnValue
Return Me.GetValue(TableUtils.ExtraSalaryIdColumn)
End Function
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.ExtraSalaryId field.
''' </summary>
Public Function GetExtraSalaryIdFieldValue() As Int32
Return CType(Me.GetValue(TableUtils.ExtraSalaryIdColumn).ToInt32(), Int32)
End Function
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.FullName field.
''' </summary>
Public Function GetFullNameValue() As ColumnValue
Return Me.GetValue(TableUtils.FullNameColumn)
End Function
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.FullName field.
''' </summary>
Public Function GetFullNameFieldValue() As String
Return CType(Me.GetValue(TableUtils.FullNameColumn).ToString(), String)
End Function
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.FullName field.
''' </summary>
Public Sub SetFullNameFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.FullNameColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.FullName field.
''' </summary>
Public Sub SetFullNameFieldValue(ByVal val As String)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.FullNameColumn)
End Sub
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.AbbvrName field.
''' </summary>
Public Function GetAbbvrNameValue() As ColumnValue
Return Me.GetValue(TableUtils.AbbvrNameColumn)
End Function
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.AbbvrName field.
''' </summary>
Public Function GetAbbvrNameFieldValue() As String
Return CType(Me.GetValue(TableUtils.AbbvrNameColumn).ToString(), String)
End Function
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.AbbvrName field.
''' </summary>
Public Sub SetAbbvrNameFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.AbbvrNameColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.AbbvrName field.
''' </summary>
Public Sub SetAbbvrNameFieldValue(ByVal val As String)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.AbbvrNameColumn)
End Sub
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.OffAmout field.
''' </summary>
Public Function GetOffAmoutValue() As ColumnValue
Return Me.GetValue(TableUtils.OffAmoutColumn)
End Function
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.OffAmout field.
''' </summary>
Public Function GetOffAmoutFieldValue() As Int32
Return CType(Me.GetValue(TableUtils.OffAmoutColumn).ToInt32(), Int32)
End Function
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.OffAmout field.
''' </summary>
Public Sub SetOffAmoutFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.OffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.OffAmout field.
''' </summary>
Public Sub SetOffAmoutFieldValue(ByVal val As String)
Me.SetString(val, TableUtils.OffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.OffAmout field.
''' </summary>
Public Sub SetOffAmoutFieldValue(ByVal val As Double)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.OffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.OffAmout field.
''' </summary>
Public Sub SetOffAmoutFieldValue(ByVal val As Decimal)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.OffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.OffAmout field.
''' </summary>
Public Sub SetOffAmoutFieldValue(ByVal val As Int64)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.OffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.NonOffAmout field.
''' </summary>
Public Function GetNonOffAmoutValue() As ColumnValue
Return Me.GetValue(TableUtils.NonOffAmoutColumn)
End Function
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.NonOffAmout field.
''' </summary>
Public Function GetNonOffAmoutFieldValue() As Int32
Return CType(Me.GetValue(TableUtils.NonOffAmoutColumn).ToInt32(), Int32)
End Function
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.NonOffAmout field.
''' </summary>
Public Sub SetNonOffAmoutFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.NonOffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.NonOffAmout field.
''' </summary>
Public Sub SetNonOffAmoutFieldValue(ByVal val As String)
Me.SetString(val, TableUtils.NonOffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.NonOffAmout field.
''' </summary>
Public Sub SetNonOffAmoutFieldValue(ByVal val As Double)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.NonOffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.NonOffAmout field.
''' </summary>
Public Sub SetNonOffAmoutFieldValue(ByVal val As Decimal)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.NonOffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.NonOffAmout field.
''' </summary>
Public Sub SetNonOffAmoutFieldValue(ByVal val As Int64)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.NonOffAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.PrivateAmout field.
''' </summary>
Public Function GetPrivateAmoutValue() As ColumnValue
Return Me.GetValue(TableUtils.PrivateAmoutColumn)
End Function
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.PrivateAmout field.
''' </summary>
Public Function GetPrivateAmoutFieldValue() As Int32
Return CType(Me.GetValue(TableUtils.PrivateAmoutColumn).ToInt32(), Int32)
End Function
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.PrivateAmout field.
''' </summary>
Public Sub SetPrivateAmoutFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.PrivateAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.PrivateAmout field.
''' </summary>
Public Sub SetPrivateAmoutFieldValue(ByVal val As String)
Me.SetString(val, TableUtils.PrivateAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.PrivateAmout field.
''' </summary>
Public Sub SetPrivateAmoutFieldValue(ByVal val As Double)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.PrivateAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.PrivateAmout field.
''' </summary>
Public Sub SetPrivateAmoutFieldValue(ByVal val As Decimal)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.PrivateAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.PrivateAmout field.
''' </summary>
Public Sub SetPrivateAmoutFieldValue(ByVal val As Int64)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.PrivateAmoutColumn)
End Sub
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.AppBy field.
''' </summary>
Public Function GetAppByValue() As ColumnValue
Return Me.GetValue(TableUtils.AppByColumn)
End Function
''' <summary>
''' This is a convenience method that provides direct access to the value of the record's ExTraSalary_.AppBy field.
''' </summary>
Public Function GetAppByFieldValue() As String
Return CType(Me.GetValue(TableUtils.AppByColumn).ToString(), String)
End Function
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.AppBy field.
''' </summary>
Public Sub SetAppByFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.AppByColumn)
End Sub
''' <summary>
''' This is a convenience method that allows direct modification of the value of the record's ExTraSalary_.AppBy field.
''' </summary>
Public Sub SetAppByFieldValue(ByVal val As String)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.AppByColumn)
End Sub
#End Region
#Region "Convenience methods to get field names"
''' <summary>
''' This is a convenience property that provides direct access to the value of the record's ExTraSalary_.ExtraSalaryId field.
''' </summary>
Public Property ExtraSalaryId() As Int32
Get
Return CType(Me.GetValue(TableUtils.ExtraSalaryIdColumn).ToInt32(), Int32)
End Get
Set (ByVal val As Int32)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.ExtraSalaryIdColumn)
End Set
End Property
''' <summary>
''' This is a convenience method that can be used to determine that the column is set.
''' </summary>
Public ReadOnly Property ExtraSalaryIdSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.ExtraSalaryIdColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
''' <summary>
''' This is a convenience method that can be used to get the default value of a column.
''' </summary>
Public ReadOnly Property ExtraSalaryIdDefault() As String
Get
Return TableUtils.ExtraSalaryIdColumn.DefaultValue
End Get
End Property
''' <summary>
''' This is a convenience property that provides direct access to the value of the record's ExTraSalary_.FullName field.
''' </summary>
Public Property FullName() As String
Get
Return CType(Me.GetValue(TableUtils.FullNameColumn).ToString(), String)
End Get
Set (ByVal Value As String)
Me.SetString(value, TableUtils.FullNameColumn)
End Set
End Property
''' <summary>
''' This is a convenience method that can be used to determine that the column is set.
''' </summary>
Public ReadOnly Property FullNameSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.FullNameColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
''' <summary>
''' This is a convenience method that can be used to get the default value of a column.
''' </summary>
Public ReadOnly Property FullNameDefault() As String
Get
Return TableUtils.FullNameColumn.DefaultValue
End Get
End Property
''' <summary>
''' This is a convenience property that provides direct access to the value of the record's ExTraSalary_.AbbvrName field.
''' </summary>
Public Property AbbvrName() As String
Get
Return CType(Me.GetValue(TableUtils.AbbvrNameColumn).ToString(), String)
End Get
Set (ByVal Value As String)
Me.SetString(value, TableUtils.AbbvrNameColumn)
End Set
End Property
''' <summary>
''' This is a convenience method that can be used to determine that the column is set.
''' </summary>
Public ReadOnly Property AbbvrNameSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.AbbvrNameColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
''' <summary>
''' This is a convenience method that can be used to get the default value of a column.
''' </summary>
Public ReadOnly Property AbbvrNameDefault() As String
Get
Return TableUtils.AbbvrNameColumn.DefaultValue
End Get
End Property
''' <summary>
''' This is a convenience property that provides direct access to the value of the record's ExTraSalary_.OffAmout field.
''' </summary>
Public Property OffAmout() As Int32
Get
Return CType(Me.GetValue(TableUtils.OffAmoutColumn).ToInt32(), Int32)
End Get
Set (ByVal val As Int32)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.OffAmoutColumn)
End Set
End Property
''' <summary>
''' This is a convenience method that can be used to determine that the column is set.
''' </summary>
Public ReadOnly Property OffAmoutSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.OffAmoutColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
''' <summary>
''' This is a convenience method that can be used to get the default value of a column.
''' </summary>
Public ReadOnly Property OffAmoutDefault() As String
Get
Return TableUtils.OffAmoutColumn.DefaultValue
End Get
End Property
''' <summary>
''' This is a convenience property that provides direct access to the value of the record's ExTraSalary_.NonOffAmout field.
''' </summary>
Public Property NonOffAmout() As Int32
Get
Return CType(Me.GetValue(TableUtils.NonOffAmoutColumn).ToInt32(), Int32)
End Get
Set (ByVal val As Int32)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.NonOffAmoutColumn)
End Set
End Property
''' <summary>
''' This is a convenience method that can be used to determine that the column is set.
''' </summary>
Public ReadOnly Property NonOffAmoutSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.NonOffAmoutColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
''' <summary>
''' This is a convenience method that can be used to get the default value of a column.
''' </summary>
Public ReadOnly Property NonOffAmoutDefault() As String
Get
Return TableUtils.NonOffAmoutColumn.DefaultValue
End Get
End Property
''' <summary>
''' This is a convenience property that provides direct access to the value of the record's ExTraSalary_.PrivateAmout field.
''' </summary>
Public Property PrivateAmout() As Int32
Get
Return CType(Me.GetValue(TableUtils.PrivateAmoutColumn).ToInt32(), Int32)
End Get
Set (ByVal val As Int32)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.PrivateAmoutColumn)
End Set
End Property
''' <summary>
''' This is a convenience method that can be used to determine that the column is set.
''' </summary>
Public ReadOnly Property PrivateAmoutSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.PrivateAmoutColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
''' <summary>
''' This is a convenience method that can be used to get the default value of a column.
''' </summary>
Public ReadOnly Property PrivateAmoutDefault() As String
Get
Return TableUtils.PrivateAmoutColumn.DefaultValue
End Get
End Property
''' <summary>
''' This is a convenience property that provides direct access to the value of the record's ExTraSalary_.AppBy field.
''' </summary>
Public Property AppBy() As String
Get
Return CType(Me.GetValue(TableUtils.AppByColumn).ToString(), String)
End Get
Set (ByVal Value As String)
Me.SetString(value, TableUtils.AppByColumn)
End Set
End Property
''' <summary>
''' This is a convenience method that can be used to determine that the column is set.
''' </summary>
Public ReadOnly Property AppBySpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.AppByColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
''' <summary>
''' This is a convenience method that can be used to get the default value of a column.
''' </summary>
Public ReadOnly Property AppByDefault() As String
Get
Return TableUtils.AppByColumn.DefaultValue
End Get
End Property
#End Region
End Class
End Namespace