' This class is "generated" and will be overwritten.
' Your customizations should be made in PersonalExtWorkRecord.vb
Imports System.Data.SqlTypes
Imports BaseClasses
Imports BaseClasses.Data
Imports BaseClasses.Data.SqlProvider
Namespace Persons.Business
'''
''' The generated superclass for the class.
'''
'''
''' This class is not intended to be instantiated directly. To obtain an instance of this class,
''' use the methods of the class.
'''
'''
'''
Public Class BasePersonalExtWorkRecord
Inherits PrimaryKeyRecord
Public Shared Shadows ReadOnly TableUtils As PersonalExtWorkTable = PersonalExtWorkTable.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 PersonalExtWorkRecord_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 PersonalExtWorkRec As PersonalExtWorkRecord = CType(sender,PersonalExtWorkRecord)
Validate_Inserting()
If Not PersonalExtWorkRec Is Nothing AndAlso Not PersonalExtWorkRec.IsReadOnly Then
End If
End Sub
'Evaluates Initialize when->Updating record formulas specified at the data access layer
Public Overridable Sub PersonalExtWorkRecord_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 PersonalExtWorkRec As PersonalExtWorkRecord = CType(sender,PersonalExtWorkRecord)
Validate_Updating()
If Not PersonalExtWorkRec Is Nothing AndAlso Not PersonalExtWorkRec.IsReadOnly Then
End If
End Sub
'Evaluates Initialize when->Reading record formulas specified at the data access layer
Public Overridable Sub PersonalExtWorkRecord_ReadRecord(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.ReadRecord
'Apply Initialize->Reading record formula only if validation is successful.
Dim PersonalExtWorkRec As PersonalExtWorkRecord = CType(sender,PersonalExtWorkRecord)
If Not PersonalExtWorkRec Is Nothing AndAlso Not PersonalExtWorkRec.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"
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.id field.
'''
Public Function Getid0Value() As ColumnValue
Return Me.GetValue(TableUtils.id0Column)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.id field.
'''
Public Function Getid0FieldValue() As Int32
Return CType(Me.GetValue(TableUtils.id0Column).ToInt32(), Int32)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.PersonalId field.
'''
Public Function GetPersonalIdValue() As ColumnValue
Return Me.GetValue(TableUtils.PersonalIdColumn)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.PersonalId field.
'''
Public Function GetPersonalIdFieldValue() As String
Return CType(Me.GetValue(TableUtils.PersonalIdColumn).ToString(), String)
End Function
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.PersonalId field.
'''
Public Sub SetPersonalIdFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.PersonalIdColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.PersonalId field.
'''
Public Sub SetPersonalIdFieldValue(ByVal val As String)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.PersonalIdColumn)
End Sub
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.Description field.
'''
Public Function GetDescriptionValue() As ColumnValue
Return Me.GetValue(TableUtils.DescriptionColumn)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.Description field.
'''
Public Function GetDescriptionFieldValue() As String
Return CType(Me.GetValue(TableUtils.DescriptionColumn).ToString(), String)
End Function
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.Description field.
'''
Public Sub SetDescriptionFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.DescriptionColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.Description field.
'''
Public Sub SetDescriptionFieldValue(ByVal val As String)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.DescriptionColumn)
End Sub
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.Place field.
'''
Public Function GetPlaceValue() As ColumnValue
Return Me.GetValue(TableUtils.PlaceColumn)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.Place field.
'''
Public Function GetPlaceFieldValue() As String
Return CType(Me.GetValue(TableUtils.PlaceColumn).ToString(), String)
End Function
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.Place field.
'''
Public Sub SetPlaceFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.PlaceColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.Place field.
'''
Public Sub SetPlaceFieldValue(ByVal val As String)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.PlaceColumn)
End Sub
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.Active field.
'''
Public Function GetActiveValue() As ColumnValue
Return Me.GetValue(TableUtils.ActiveColumn)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.Active field.
'''
Public Function GetActiveFieldValue() As Boolean
Return CType(Me.GetValue(TableUtils.ActiveColumn).ToBoolean(), Boolean)
End Function
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.Active field.
'''
Public Sub SetActiveFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.ActiveColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.Active field.
'''
Public Sub SetActiveFieldValue(ByVal val As String)
Me.SetString(val, TableUtils.ActiveColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.Active field.
'''
Public Sub SetActiveFieldValue(ByVal val As Boolean)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.ActiveColumn)
End Sub
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.BeginDate field.
'''
Public Function GetBeginDateValue() As ColumnValue
Return Me.GetValue(TableUtils.BeginDateColumn)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.BeginDate field.
'''
Public Function GetBeginDateFieldValue() As DateTime
Return CType(Me.GetValue(TableUtils.BeginDateColumn).ToDateTime(), DateTime)
End Function
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.BeginDate field.
'''
Public Sub SetBeginDateFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.BeginDateColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.BeginDate field.
'''
Public Sub SetBeginDateFieldValue(ByVal val As String)
Me.SetString(val, TableUtils.BeginDateColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.BeginDate field.
'''
Public Sub SetBeginDateFieldValue(ByVal val As DateTime)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.BeginDateColumn)
End Sub
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.EndDate field.
'''
Public Function GetEndDateValue() As ColumnValue
Return Me.GetValue(TableUtils.EndDateColumn)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.EndDate field.
'''
Public Function GetEndDateFieldValue() As DateTime
Return CType(Me.GetValue(TableUtils.EndDateColumn).ToDateTime(), DateTime)
End Function
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.EndDate field.
'''
Public Sub SetEndDateFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.EndDateColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.EndDate field.
'''
Public Sub SetEndDateFieldValue(ByVal val As String)
Me.SetString(val, TableUtils.EndDateColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.EndDate field.
'''
Public Sub SetEndDateFieldValue(ByVal val As DateTime)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.EndDateColumn)
End Sub
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.Command field.
'''
Public Function GetCommandValue() As ColumnValue
Return Me.GetValue(TableUtils.CommandColumn)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.Command field.
'''
Public Function GetCommandFieldValue() As String
Return CType(Me.GetValue(TableUtils.CommandColumn).ToString(), String)
End Function
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.Command field.
'''
Public Sub SetCommandFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.CommandColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.Command field.
'''
Public Sub SetCommandFieldValue(ByVal val As String)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.CommandColumn)
End Sub
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.CommandDate field.
'''
Public Function GetCommandDateValue() As ColumnValue
Return Me.GetValue(TableUtils.CommandDateColumn)
End Function
'''
''' This is a convenience method that provides direct access to the value of the record's PersonalExtWork_.CommandDate field.
'''
Public Function GetCommandDateFieldValue() As DateTime
Return CType(Me.GetValue(TableUtils.CommandDateColumn).ToDateTime(), DateTime)
End Function
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.CommandDate field.
'''
Public Sub SetCommandDateFieldValue(ByVal val As ColumnValue)
Me.SetValue(val, TableUtils.CommandDateColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.CommandDate field.
'''
Public Sub SetCommandDateFieldValue(ByVal val As String)
Me.SetString(val, TableUtils.CommandDateColumn)
End Sub
'''
''' This is a convenience method that allows direct modification of the value of the record's PersonalExtWork_.CommandDate field.
'''
Public Sub SetCommandDateFieldValue(ByVal val As DateTime)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.CommandDateColumn)
End Sub
#End Region
#Region "Convenience methods to get field names"
'''
''' This is a convenience property that provides direct access to the value of the record's PersonalExtWork_.id field.
'''
Public Property id0() As Int32
Get
Return CType(Me.GetValue(TableUtils.id0Column).ToInt32(), Int32)
End Get
Set (ByVal val As Int32)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.id0Column)
End Set
End Property
'''
''' This is a convenience method that can be used to determine that the column is set.
'''
Public ReadOnly Property id0Specified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.id0Column)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
'''
''' This is a convenience method that can be used to get the default value of a column.
'''
Public ReadOnly Property id0Default() As String
Get
Return TableUtils.id0Column.DefaultValue
End Get
End Property
'''
''' This is a convenience property that provides direct access to the value of the record's PersonalExtWork_.PersonalId field.
'''
Public Property PersonalId() As String
Get
Return CType(Me.GetValue(TableUtils.PersonalIdColumn).ToString(), String)
End Get
Set (ByVal Value As String)
Me.SetString(value, TableUtils.PersonalIdColumn)
End Set
End Property
'''
''' This is a convenience method that can be used to determine that the column is set.
'''
Public ReadOnly Property PersonalIdSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.PersonalIdColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
'''
''' This is a convenience method that can be used to get the default value of a column.
'''
Public ReadOnly Property PersonalIdDefault() As String
Get
Return TableUtils.PersonalIdColumn.DefaultValue
End Get
End Property
'''
''' This is a convenience property that provides direct access to the value of the record's PersonalExtWork_.Description field.
'''
Public Property Description() As String
Get
Return CType(Me.GetValue(TableUtils.DescriptionColumn).ToString(), String)
End Get
Set (ByVal Value As String)
Me.SetString(value, TableUtils.DescriptionColumn)
End Set
End Property
'''
''' This is a convenience method that can be used to determine that the column is set.
'''
Public ReadOnly Property DescriptionSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.DescriptionColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
'''
''' This is a convenience method that can be used to get the default value of a column.
'''
Public ReadOnly Property DescriptionDefault() As String
Get
Return TableUtils.DescriptionColumn.DefaultValue
End Get
End Property
'''
''' This is a convenience property that provides direct access to the value of the record's PersonalExtWork_.Place field.
'''
Public Property Place() As String
Get
Return CType(Me.GetValue(TableUtils.PlaceColumn).ToString(), String)
End Get
Set (ByVal Value As String)
Me.SetString(value, TableUtils.PlaceColumn)
End Set
End Property
'''
''' This is a convenience method that can be used to determine that the column is set.
'''
Public ReadOnly Property PlaceSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.PlaceColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
'''
''' This is a convenience method that can be used to get the default value of a column.
'''
Public ReadOnly Property PlaceDefault() As String
Get
Return TableUtils.PlaceColumn.DefaultValue
End Get
End Property
'''
''' This is a convenience property that provides direct access to the value of the record's PersonalExtWork_.Active field.
'''
Public Property Active() As Boolean
Get
Return CType(Me.GetValue(TableUtils.ActiveColumn).ToBoolean(), Boolean)
End Get
Set (ByVal val As Boolean)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.ActiveColumn)
End Set
End Property
'''
''' This is a convenience method that can be used to determine that the column is set.
'''
Public ReadOnly Property ActiveSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.ActiveColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
'''
''' This is a convenience method that can be used to get the default value of a column.
'''
Public ReadOnly Property ActiveDefault() As String
Get
Return TableUtils.ActiveColumn.DefaultValue
End Get
End Property
'''
''' This is a convenience property that provides direct access to the value of the record's PersonalExtWork_.BeginDate field.
'''
Public Property BeginDate() As DateTime
Get
Return CType(Me.GetValue(TableUtils.BeginDateColumn).ToDateTime(), DateTime)
End Get
Set (ByVal val As DateTime)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.BeginDateColumn)
End Set
End Property
'''
''' This is a convenience method that can be used to determine that the column is set.
'''
Public ReadOnly Property BeginDateSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.BeginDateColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
'''
''' This is a convenience method that can be used to get the default value of a column.
'''
Public ReadOnly Property BeginDateDefault() As String
Get
Return TableUtils.BeginDateColumn.DefaultValue
End Get
End Property
'''
''' This is a convenience property that provides direct access to the value of the record's PersonalExtWork_.EndDate field.
'''
Public Property EndDate() As DateTime
Get
Return CType(Me.GetValue(TableUtils.EndDateColumn).ToDateTime(), DateTime)
End Get
Set (ByVal val As DateTime)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.EndDateColumn)
End Set
End Property
'''
''' This is a convenience method that can be used to determine that the column is set.
'''
Public ReadOnly Property EndDateSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.EndDateColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
'''
''' This is a convenience method that can be used to get the default value of a column.
'''
Public ReadOnly Property EndDateDefault() As String
Get
Return TableUtils.EndDateColumn.DefaultValue
End Get
End Property
'''
''' This is a convenience property that provides direct access to the value of the record's PersonalExtWork_.Command field.
'''
Public Property Command() As String
Get
Return CType(Me.GetValue(TableUtils.CommandColumn).ToString(), String)
End Get
Set (ByVal Value As String)
Me.SetString(value, TableUtils.CommandColumn)
End Set
End Property
'''
''' This is a convenience method that can be used to determine that the column is set.
'''
Public ReadOnly Property CommandSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.CommandColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
'''
''' This is a convenience method that can be used to get the default value of a column.
'''
Public ReadOnly Property CommandDefault() As String
Get
Return TableUtils.CommandColumn.DefaultValue
End Get
End Property
'''
''' This is a convenience property that provides direct access to the value of the record's PersonalExtWork_.CommandDate field.
'''
Public Property CommandDate() As DateTime
Get
Return CType(Me.GetValue(TableUtils.CommandDateColumn).ToDateTime(), DateTime)
End Get
Set (ByVal val As DateTime)
Dim colValue As ColumnValue = New ColumnValue(val)
Me.SetValue(colValue, TableUtils.CommandDateColumn)
End Set
End Property
'''
''' This is a convenience method that can be used to determine that the column is set.
'''
Public ReadOnly Property CommandDateSpecified() As Boolean
Get
Dim val As ColumnValue = Me.GetValue(TableUtils.CommandDateColumn)
If val Is Nothing OrElse val.IsNull Then
Return False
End If
Return True
End Get
End Property
'''
''' This is a convenience method that can be used to get the default value of a column.
'''
Public ReadOnly Property CommandDateDefault() As String
Get
Return TableUtils.CommandDateColumn.DefaultValue
End Get
End Property
#End Region
End Class
End Namespace