' This class is "generated" and will be overwritten.
' Your customizations should be made in View_PersonalEducationView.vb
Imports System.Data.SqlTypes
Imports System.Data
Imports BaseClasses
Imports BaseClasses.Data
Imports BaseClasses.Data.SqlProvider
Imports Persons.Data
Namespace Persons.Business
'''
''' The generated superclass for the class.
''' Provides access to the schema information and record data of a database table or view named View_PersonalEducation.
'''
'''
''' The connection details (name, location, etc.) of the database and table (or view) accessed by this class
''' are resolved at runtime based on the connection string in the application's Web.Config file.
'''
''' This class is not intended to be instantiated directly. To obtain an instance of this class, use
''' View_PersonalEducationView.Instance.
'''
'''
'''
Public Class BaseView_PersonalEducationView
Inherits KeylessTable
Private ReadOnly TableDefinitionString As String = View_PersonalEducationDefinition.GetXMLString()
Protected Sub New()
MyBase.New()
Me.Initialize()
End Sub
Protected Overridable Sub Initialize()
Dim def As New XmlTableDefinition(TableDefinitionString)
Me.TableDefinition = New TableDefinition()
Me.TableDefinition.TableClassName = System.Reflection.Assembly.CreateQualifiedName("App_Code", "Persons.Business.View_PersonalEducationView")
def.InitializeTableDefinition(Me.TableDefinition)
Me.ConnectionName = def.GetConnectionName()
Me.RecordClassName = System.Reflection.Assembly.CreateQualifiedName("App_Code", "Persons.Business.View_PersonalEducationRecord")
Me.ApplicationName = "App_Code"
Me.DataAdapter = New View_PersonalEducationSqlView()
Directcast(Me.DataAdapter, View_PersonalEducationSqlView).ConnectionName = Me.ConnectionName
Me.TableDefinition.AdapterMetaData = Me.DataAdapter.AdapterMetaData
PersonalIdColumn.CodeName = "PersonalId"
RankAndNameColumn.CodeName = "RankAndName"
SectionIdColumn.CodeName = "SectionId"
SectionNameColumn.CodeName = "SectionName"
SectionAbbvrNameColumn.CodeName = "SectionAbbvrName"
ShortRankNormalColumn.CodeName = "ShortRankNormal"
StartDateColumn.CodeName = "StartDate"
EndDateColumn.CodeName = "EndDate"
CourseColumn.CodeName = "Course"
CourseAbbrColumn.CodeName = "CourseAbbr"
InstitueColumn.CodeName = "Institue"
FacultryColumn.CodeName = "Facultry"
LevelIdColumn.CodeName = "LevelId"
EdYearColumn.CodeName = "EdYear"
EducationPeriodColumn.CodeName = "EducationPeriod"
EducationTypeColumn.CodeName = "EducationType"
COUNTRYColumn.CodeName = "COUNTRY"
CourseNoColumn.CodeName = "CourseNo"
ScoreNoColumn.CodeName = "ScoreNo"
NoAllColumn.CodeName = "NoAll"
ScoreColumn.CodeName = "Score"
CommandColumn.CodeName = "Command"
CommandDateColumn.CodeName = "CommandDate"
End Sub
#Region "Overriden methods"
#End Region
#Region "Properties for columns"
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.PersonalId column object.
'''
Public ReadOnly Property PersonalIdColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(0), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.PersonalId column object.
'''
Public Shared ReadOnly Property PersonalId() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.PersonalIdColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.RankAndName column object.
'''
Public ReadOnly Property RankAndNameColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(1), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.RankAndName column object.
'''
Public Shared ReadOnly Property RankAndName() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.RankAndNameColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.SectionId column object.
'''
Public ReadOnly Property SectionIdColumn() As BaseClasses.Data.NumberColumn
Get
Return CType(Me.TableDefinition.ColumnList(2), BaseClasses.Data.NumberColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.SectionId column object.
'''
Public Shared ReadOnly Property SectionId() As BaseClasses.Data.NumberColumn
Get
Return View_PersonalEducationView.Instance.SectionIdColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.SectionName column object.
'''
Public ReadOnly Property SectionNameColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(3), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.SectionName column object.
'''
Public Shared ReadOnly Property SectionName() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.SectionNameColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.SectionAbbvrName column object.
'''
Public ReadOnly Property SectionAbbvrNameColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(4), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.SectionAbbvrName column object.
'''
Public Shared ReadOnly Property SectionAbbvrName() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.SectionAbbvrNameColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.ShortRankNormal column object.
'''
Public ReadOnly Property ShortRankNormalColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(5), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.ShortRankNormal column object.
'''
Public Shared ReadOnly Property ShortRankNormal() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.ShortRankNormalColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.StartDate column object.
'''
Public ReadOnly Property StartDateColumn() As BaseClasses.Data.DateColumn
Get
Return CType(Me.TableDefinition.ColumnList(6), BaseClasses.Data.DateColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.StartDate column object.
'''
Public Shared ReadOnly Property StartDate() As BaseClasses.Data.DateColumn
Get
Return View_PersonalEducationView.Instance.StartDateColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.EndDate column object.
'''
Public ReadOnly Property EndDateColumn() As BaseClasses.Data.DateColumn
Get
Return CType(Me.TableDefinition.ColumnList(7), BaseClasses.Data.DateColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.EndDate column object.
'''
Public Shared ReadOnly Property EndDate() As BaseClasses.Data.DateColumn
Get
Return View_PersonalEducationView.Instance.EndDateColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Course column object.
'''
Public ReadOnly Property CourseColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(8), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Course column object.
'''
Public Shared ReadOnly Property Course() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.CourseColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.CourseAbbr column object.
'''
Public ReadOnly Property CourseAbbrColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(9), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.CourseAbbr column object.
'''
Public Shared ReadOnly Property CourseAbbr() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.CourseAbbrColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Institue column object.
'''
Public ReadOnly Property InstitueColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(10), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Institue column object.
'''
Public Shared ReadOnly Property Institue() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.InstitueColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Facultry column object.
'''
Public ReadOnly Property FacultryColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(11), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Facultry column object.
'''
Public Shared ReadOnly Property Facultry() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.FacultryColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.LevelId column object.
'''
Public ReadOnly Property LevelIdColumn() As BaseClasses.Data.NumberColumn
Get
Return CType(Me.TableDefinition.ColumnList(12), BaseClasses.Data.NumberColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.LevelId column object.
'''
Public Shared ReadOnly Property LevelId() As BaseClasses.Data.NumberColumn
Get
Return View_PersonalEducationView.Instance.LevelIdColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.EdYear column object.
'''
Public ReadOnly Property EdYearColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(13), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.EdYear column object.
'''
Public Shared ReadOnly Property EdYear() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.EdYearColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.EducationPeriod column object.
'''
Public ReadOnly Property EducationPeriodColumn() As BaseClasses.Data.NumberColumn
Get
Return CType(Me.TableDefinition.ColumnList(14), BaseClasses.Data.NumberColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.EducationPeriod column object.
'''
Public Shared ReadOnly Property EducationPeriod() As BaseClasses.Data.NumberColumn
Get
Return View_PersonalEducationView.Instance.EducationPeriodColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.EducationType column object.
'''
Public ReadOnly Property EducationTypeColumn() As BaseClasses.Data.NumberColumn
Get
Return CType(Me.TableDefinition.ColumnList(15), BaseClasses.Data.NumberColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.EducationType column object.
'''
Public Shared ReadOnly Property EducationType() As BaseClasses.Data.NumberColumn
Get
Return View_PersonalEducationView.Instance.EducationTypeColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.COUNTRY column object.
'''
Public ReadOnly Property COUNTRYColumn() As BaseClasses.Data.NumberColumn
Get
Return CType(Me.TableDefinition.ColumnList(16), BaseClasses.Data.NumberColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.COUNTRY column object.
'''
Public Shared ReadOnly Property COUNTRY() As BaseClasses.Data.NumberColumn
Get
Return View_PersonalEducationView.Instance.COUNTRYColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.CourseNo column object.
'''
Public ReadOnly Property CourseNoColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(17), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.CourseNo column object.
'''
Public Shared ReadOnly Property CourseNo() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.CourseNoColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.ScoreNo column object.
'''
Public ReadOnly Property ScoreNoColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(18), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.ScoreNo column object.
'''
Public Shared ReadOnly Property ScoreNo() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.ScoreNoColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.NoAll column object.
'''
Public ReadOnly Property NoAllColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(19), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.NoAll column object.
'''
Public Shared ReadOnly Property NoAll() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.NoAllColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Score column object.
'''
Public ReadOnly Property ScoreColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(20), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Score column object.
'''
Public Shared ReadOnly Property Score() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.ScoreColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Command column object.
'''
Public ReadOnly Property CommandColumn() As BaseClasses.Data.StringColumn
Get
Return CType(Me.TableDefinition.ColumnList(21), BaseClasses.Data.StringColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.Command column object.
'''
Public Shared ReadOnly Property Command() As BaseClasses.Data.StringColumn
Get
Return View_PersonalEducationView.Instance.CommandColumn
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.CommandDate column object.
'''
Public ReadOnly Property CommandDateColumn() As BaseClasses.Data.DateColumn
Get
Return CType(Me.TableDefinition.ColumnList(22), BaseClasses.Data.DateColumn)
End Get
End Property
'''
''' This is a convenience property that provides direct access to the table's View_PersonalEducation_.CommandDate column object.
'''
Public Shared ReadOnly Property CommandDate() As BaseClasses.Data.DateColumn
Get
Return View_PersonalEducationView.Instance.CommandDateColumn
End Get
End Property
#End Region
#Region "Shared helper methods"
'''
''' This is a shared function that can be used to get an array of View_PersonalEducationRecord records using a where clause.
'''
Public Shared Function GetRecords(ByVal where As String) As View_PersonalEducationRecord()
Return GetRecords(where, Nothing, BaseTable.MIN_PAGE_NUMBER, BaseTable.MAX_BATCH_SIZE)
End Function
'''
''' This is a shared function that can be used to get an array of View_PersonalEducationRecord records using a where clause.
'''
Public Shared Function GetRecords(ByVal join As BaseFilter, ByVal where As String) As View_PersonalEducationRecord()
Return GetRecords(join, where, Nothing, BaseTable.MIN_PAGE_NUMBER, BaseTable.MAX_BATCH_SIZE)
End Function
'''
''' This is a shared function that can be used to get an array of View_PersonalEducationRecord records using a where and order by clause.
'''
Public Shared Function GetRecords( _
ByVal where As String, _
ByVal orderBy As OrderBy) As View_PersonalEducationRecord()
Return GetRecords(where, orderBy, BaseTable.MIN_PAGE_NUMBER, BaseTable.MAX_BATCH_SIZE)
End Function
'''
''' This is a shared function that can be used to get an array of View_PersonalEducationRecord records using a where and order by clause.
'''
Public Shared Function GetRecords( _
ByVal join As BaseFilter, _
ByVal where As String, _
ByVal orderBy As OrderBy) As View_PersonalEducationRecord()
Return GetRecords(join, where, orderBy, BaseTable.MIN_PAGE_NUMBER, BaseTable.MAX_BATCH_SIZE)
End Function
'''
''' This is a shared function that can be used to get an array of View_PersonalEducationRecord records using a where and order by clause clause with pagination.
'''
Public Shared Function GetRecords( _
ByVal where As String, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) As View_PersonalEducationRecord()
Dim whereFilter As SqlFilter = Nothing
If Not where Is Nothing AndAlso where.trim() <> "" Then
whereFilter = New SqlFilter(where)
End If
Dim join As BaseClasses.Data.BaseFilter = Nothing
Dim recList As ArrayList = View_PersonalEducationView.Instance.GetRecordList(join, whereFilter, Nothing, orderBy, pageIndex, pageSize)
Return CType(recList.ToArray(GetType(Persons.Business.View_PersonalEducationRecord)), View_PersonalEducationRecord())
End Function
'''
''' This is a shared function that can be used to get an array of View_PersonalEducationRecord records using a where and order by clause clause with pagination.
'''
Public Shared Function GetRecords( _
ByVal join As BaseFilter, _
ByVal where As String, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) As View_PersonalEducationRecord()
Dim whereFilter As SqlFilter = Nothing
If Not where Is Nothing AndAlso where.trim() <> "" Then
whereFilter = New SqlFilter(where)
End If
Dim recList As ArrayList = View_PersonalEducationView.Instance.GetRecordList(join, whereFilter, Nothing, orderBy, pageIndex, pageSize)
Return CType(recList.ToArray(GetType(Persons.Business.View_PersonalEducationRecord)), View_PersonalEducationRecord())
End Function
Public Shared Function GetRecords( _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) As View_PersonalEducationRecord()
Dim join As BaseClasses.Data.BaseFilter = Nothing
Dim recList As ArrayList = View_PersonalEducationView.Instance.GetRecordList(join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize)
Return CType(recList.ToArray(GetType(Persons.Business.View_PersonalEducationRecord)), View_PersonalEducationRecord())
End Function
Public Shared Function GetRecords( _
ByVal join As BaseFilter, _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) As View_PersonalEducationRecord()
Dim recList As ArrayList = View_PersonalEducationView.Instance.GetRecordList(join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize)
Return CType(recList.ToArray(GetType(Persons.Business.View_PersonalEducationRecord)), View_PersonalEducationRecord())
End Function
Public Shared Function GetRecords( _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer, _
ByRef totalRecords As Integer) As View_PersonalEducationRecord()
Dim join As BaseClasses.Data.BaseFilter = Nothing
Dim recList As ArrayList = View_PersonalEducationView.Instance.GetRecordList(join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize, totalRecords)
Return CType(recList.ToArray(GetType(Persons.Business.View_PersonalEducationRecord)), View_PersonalEducationRecord())
End Function
Public Shared Function GetRecords( _
ByVal join As BaseFilter, _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer, _
ByRef totalRecords As Integer) As View_PersonalEducationRecord()
Dim recList As ArrayList = View_PersonalEducationView.Instance.GetRecordList(join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize, totalRecords)
Return CType(recList.ToArray(GetType(Persons.Business.View_PersonalEducationRecord)), View_PersonalEducationRecord())
End Function
'''
''' This is a shared function that can be used to get total number of records that will be returned using the where clause.
'''
Public Shared Function GetRecordCount(ByVal where As String) As Integer
Dim whereFilter As SqlFilter = Nothing
If Not where Is Nothing AndAlso where.Trim() <> "" Then
whereFilter = New SqlFilter(where)
End If
Return CInt(View_PersonalEducationView.Instance.GetRecordListCount(Nothing, whereFilter, Nothing, Nothing))
End Function
'''
''' This is a shared function that can be used to get total number of records that will be returned using the where clause.
'''
Public Shared Function GetRecordCount(ByVal join As BaseFilter, ByVal where As String) As Integer
Dim whereFilter As SqlFilter = Nothing
If Not where Is Nothing AndAlso where.Trim() <> "" Then
whereFilter = New SqlFilter(where)
End If
Return CInt(View_PersonalEducationView.Instance.GetRecordListCount(join, whereFilter, Nothing, Nothing))
End Function
Public Shared Function GetRecordCount(ByVal where As WhereClause) As Integer
Return CInt(View_PersonalEducationView.Instance.GetRecordListCount(Nothing, where.GetFilter(), Nothing, Nothing))
End Function
Public Shared Function GetRecordCount(ByVal join As BaseFilter, ByVal where As WhereClause) As Integer
Return CInt(View_PersonalEducationView.Instance.GetRecordListCount(join, where.GetFilter(), Nothing, Nothing))
End Function
'''
''' This is a shared function that can be used to get a View_PersonalEducationRecord record using a where clause.
'''
Public Shared Function GetRecord(ByVal where As String) As View_PersonalEducationRecord
Dim orderBy As OrderBy = Nothing
Return GetRecord(where, orderBy)
End Function
'''
''' This is a shared function that can be used to get a View_PersonalEducationRecord record using a where clause.
'''
Public Shared Function GetRecord(ByVal join As BaseFilter, ByVal where As String) As View_PersonalEducationRecord
Dim orderBy As OrderBy = Nothing
Return GetRecord(join, where, orderBy)
End Function
'''
''' This is a shared function that can be used to get a View_PersonalEducationRecord record using a where and order by clause.
'''
Public Shared Function GetRecord( _
ByVal where As String, _
ByVal orderBy As OrderBy) As View_PersonalEducationRecord
Dim whereFilter As SqlFilter = Nothing
If Not where Is Nothing AndAlso where.Trim() <> "" Then
whereFilter = New SqlFilter(where)
End If
Dim join As BaseClasses.Data.BaseFilter = Nothing
Dim recList As ArrayList = View_PersonalEducationView.Instance.GetRecordList(join, whereFilter, Nothing, orderBy, BaseTable.MIN_PAGE_NUMBER, BaseTable.MIN_BATCH_SIZE)
Dim rec As View_PersonalEducationRecord = Nothing
If recList.Count > 0 Then
rec = CType(recList(0), View_PersonalEducationRecord)
End If
Return rec
End Function
'''
''' This is a shared function that can be used to get a View_PersonalEducationRecord record using a where and order by clause.
'''
Public Shared Function GetRecord( _
ByVal join As BaseFilter, _
ByVal where As String, _
ByVal orderBy As OrderBy) As View_PersonalEducationRecord
Dim whereFilter As SqlFilter = Nothing
If Not where Is Nothing AndAlso where.Trim() <> "" Then
whereFilter = New SqlFilter(where)
End If
Dim recList As ArrayList = View_PersonalEducationView.Instance.GetRecordList(join, whereFilter, Nothing, orderBy, BaseTable.MIN_PAGE_NUMBER, BaseTable.MIN_BATCH_SIZE)
Dim rec As View_PersonalEducationRecord = Nothing
If recList.Count > 0 Then
rec = CType(recList(0), View_PersonalEducationRecord)
End If
Return rec
End Function
Public Shared Function GetValues( _
ByVal col As BaseColumn, _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal maxItems As Integer) As String()
' Create the filter list.
Dim retCol As SqlBuilderColumnSelection = New SqlBuilderColumnSelection(False, True)
retCol.AddColumn(col)
Return View_PersonalEducationView.Instance.GetColumnValues(retCol, Nothing, where.GetFilter(), Nothing, orderBy, BaseTable.MIN_PAGE_NUMBER, maxItems)
End Function
Public Shared Function GetValues( _
ByVal col As BaseColumn, _
ByVal join As BaseFilter, _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal maxItems As Integer) As String()
' Create the filter list.
Dim retCol As SqlBuilderColumnSelection = New SqlBuilderColumnSelection(False, True)
retCol.AddColumn(col)
Return View_PersonalEducationView.Instance.GetColumnValues(retCol, join, where.GetFilter(), Nothing, orderBy, BaseTable.MIN_PAGE_NUMBER, maxItems)
End Function
'''
''' This is a shared function that can be used to get a DataTable to bound with a data bound control using a where clause.
'''
Public Shared Function GetDataTable(ByVal where As String) As System.Data.DataTable
Dim recs() As View_PersonalEducationRecord = GetRecords(where)
Return View_PersonalEducationView.Instance.CreateDataTable(recs, Nothing)
End Function
'''
''' This is a shared function that can be used to get a DataTable to bound with a data bound control using a where clause.
'''
Public Shared Function GetDataTable(ByVal join As BaseFilter, ByVal where As String) As System.Data.DataTable
Dim recs() As View_PersonalEducationRecord = GetRecords(join, where)
Return View_PersonalEducationView.Instance.CreateDataTable(recs, Nothing)
End Function
'''
''' This is a shared function that can be used to get a DataTable to bound with a data bound control using a where and order by clause.
'''
Public Shared Function GetDataTable(ByVal where As String, ByVal orderBy As OrderBy) As System.Data.DataTable
Dim recs() As View_PersonalEducationRecord = GetRecords(where, orderBy)
Return View_PersonalEducationView.Instance.CreateDataTable(recs, Nothing)
End Function
'''
''' This is a shared function that can be used to get a DataTable to bound with a data bound control using a where and order by clause.
'''
Public Shared Function GetDataTable(ByVal join As BaseFilter, ByVal where As String, ByVal orderBy As OrderBy) As System.Data.DataTable
Dim recs() As View_PersonalEducationRecord = GetRecords(join, where, orderBy)
Return View_PersonalEducationView.Instance.CreateDataTable(recs, Nothing)
End Function
'''
''' This is a shared function that can be used to get a DataTable to bound with a data bound control using a where and order by clause with pagination.
'''
Public Shared Function GetDataTable( _
ByVal where As String, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) As System.Data.DataTable
Dim recs() As View_PersonalEducationRecord = GetRecords(where, orderBy, pageIndex, pageSize)
Return View_PersonalEducationView.Instance.CreateDataTable(recs, Nothing)
End Function
'''
''' This is a shared function that can be used to get a DataTable to bound with a data bound control using a where and order by clause with pagination.
'''
Public Shared Function GetDataTable( _
ByVal join As BaseFilter, _
ByVal where As String, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) As System.Data.DataTable
Dim recs() As View_PersonalEducationRecord = GetRecords(join, where, orderBy, pageIndex, pageSize)
Return View_PersonalEducationView.Instance.CreateDataTable(recs, Nothing)
End Function
'''
''' This is a shared function that can be used to delete records using a where clause.
'''
Public Shared Sub DeleteRecords(ByVal where As String)
If where = Nothing OrElse where.Trim() = "" Then
Return
End If
Dim whereFilter As SqlFilter = New SqlFilter(where)
View_PersonalEducationView.Instance.DeleteRecordList(whereFilter)
End Sub
'''
''' This is a shared function that can be used to export records using a where clause.
'''
Public Shared Function Export(ByVal where As String) As String
Dim whereFilter As SqlFilter = Nothing
If Not where Is Nothing AndAlso where.Trim() <> "" Then
whereFilter = New SqlFilter(where)
End If
Return View_PersonalEducationView.Instance.ExportRecordData(whereFilter)
End Function
Public Shared Function Export(ByVal where As WhereClause) As String
Dim whereFilter As BaseFilter = Nothing
If Not where Is Nothing Then
whereFilter = where.GetFilter()
End If
Return View_PersonalEducationView.Instance.ExportRecordData(whereFilter)
End Function
Public Shared Function GetSum( _
ByVal col As BaseColumn, _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) _
As String
Dim colSel As SqlBuilderColumnSelection = New SqlBuilderColumnSelection(False, False)
colSel.AddColumn(col, SqlBuilderColumnOperation.OperationType.Sum)
Return View_PersonalEducationView.Instance.GetColumnStatistics(colSel, Nothing, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize)
End Function
Public Shared Function GetSum( _
ByVal col As BaseColumn, _
ByVal join As BaseFilter, _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) _
As String
Dim colSel As SqlBuilderColumnSelection = New SqlBuilderColumnSelection(False, False)
colSel.AddColumn(col, SqlBuilderColumnOperation.OperationType.Sum)
Return View_PersonalEducationView.Instance.GetColumnStatistics(colSel, join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize)
End Function
Public Shared Function GetCount( _
ByVal col As BaseColumn, _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) _
As String
Dim colSel As SqlBuilderColumnSelection = New SqlBuilderColumnSelection(False, False)
colSel.AddColumn(col, SqlBuilderColumnOperation.OperationType.Count)
Return View_PersonalEducationView.Instance.GetColumnStatistics(colSel, Nothing, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize)
End Function
Public Shared Function GetCount( _
ByVal col As BaseColumn, _
ByVal join As BaseFilter, _
ByVal where As WhereClause, _
ByVal orderBy As OrderBy, _
ByVal pageIndex As Integer, _
ByVal pageSize As Integer) _
As String
Dim colSel As SqlBuilderColumnSelection = New SqlBuilderColumnSelection(False, False)
colSel.AddColumn(col, SqlBuilderColumnOperation.OperationType.Count)
Return View_PersonalEducationView.Instance.GetColumnStatistics(colSel, join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize)
End Function
'''
''' This method returns the columns in the table.
'''
Public Shared Function GetColumns() As BaseColumn()
Return View_PersonalEducationView.Instance.TableDefinition.Columns
End Function
'''
''' This method returns the columnlist in the table.
'''
Public Shared Function GetColumnList() As ColumnList
Return View_PersonalEducationView.Instance.TableDefinition.ColumnList
End Function
'''
''' This method creates a new record and returns it to be edited.
'''
Public Shared Function CreateNewRecord() As IRecord
Return View_PersonalEducationView.Instance.CreateRecord()
End Function
'''
''' This method creates a new record and returns it to be edited.
'''
''' ID of the new record.
Public Shared Function CreateNewRecord(ByVal tempId As String) As IRecord
Return View_PersonalEducationView.Instance.CreateRecord(tempId)
End Function
'''
''' This method checks if column is editable.
'''
''' Name of the column to check.
Public Shared Function isReadOnlyColumn(ByVal columnName As String) As Boolean
Dim column As BaseColumn = GetColumn(columnName)
If (Not IsNothing(column)) Then
Return column.IsValuesReadOnly
Else
Return True
End If
End Function
'''
''' This method gets the specified column.
'''
''' Unique name of the column to fetch.
Public Shared Function GetColumn(ByVal uniqueColumnName As String) As BaseColumn
Dim column As BaseColumn = View_PersonalEducationView.Instance.TableDefinition.ColumnList.GetByUniqueName(uniqueColumnName)
Return column
End Function
'''
''' This method takes a record and a Column and returns an evaluated value of DFKA formula.
'''
Public Shared Function GetDFKA(ByVal rec As BaseRecord, ByVal col As BaseColumn) As String
Dim fkColumn As ForeignKey = View_PersonalEducationView.Instance.TableDefinition.GetExpandableNonCompositeForeignKey(col)
If fkColumn Is Nothing Then
Return Nothing
End If
Dim _DFKA As String = fkColumn.PrimaryKeyDisplayColumns
If (_DFKA.Trim().StartsWith("=")) Then
' if the formula is in the format of "= ., then pull out the data from the rec object instead of doing formula evaluation
Dim tableCodeName As String = fkColumn.PrimaryKeyTableDefinition.TableCodeName
Dim column As String = _DFKA.Trim("="c).Trim()
If column.StartsWith(tableCodeName & ".", StringComparison.InvariantCultureIgnoreCase) Then
column = column.Substring(tableCodeName.Length + 1)
End If
For Each c As BaseColumn In fkColumn.PrimaryKeyTableDefinition.Columns
If column = c.CodeName Then
Return rec.Format(c)
End If
Next
Dim tableName As String = fkColumn.PrimaryKeyTableDefinition.TableCodeName
Return EvaluateFormula(_DFKA, rec, Nothing, tableName)
Else
Return Nothing
End If
End Function
'''
''' This method takes a keyValue and a Column and returns an evaluated value of DFKA formula.
'''
Public Shared Function GetDFKA(ByVal keyValue As String, ByVal col As BaseColumn, ByVal formatPattern as String) As String
If keyValue Is Nothing Then
Return Nothing
End If
Dim fkColumn As ForeignKey = View_PersonalEducationView.Instance.TableDefinition.GetExpandableNonCompositeForeignKey(col)
If fkColumn Is Nothing Then
Return Nothing
End If
Dim _DFKA As String = fkColumn.PrimaryKeyDisplayColumns
If (_DFKA.Trim().StartsWith("=")) Then
Dim tableName As String = fkColumn.PrimaryKeyTableDefinition.TableCodeName
Dim t As PrimaryKeyTable = CType(DatabaseObjects.GetTableObject(tableName), PrimaryKeyTable)
Dim rec As BaseRecord = Nothing
If Not t Is Nothing Then
Try
rec = CType(t.GetRecordData(keyValue, False), BaseRecord)
Catch
rec = Nothing
End Try
End If
If rec Is Nothing Then
Return ""
End If
' if the formula is in the format of "= ., then pull out the data from the rec object instead of doing formula evaluation
Dim tableCodeName As String = fkColumn.PrimaryKeyTableDefinition.TableCodeName
Dim column As String = _DFKA.Trim("="c).Trim()
If column.StartsWith(tableCodeName & ".", StringComparison.InvariantCultureIgnoreCase) Then
column = column.Substring(tableCodeName.Length + 1)
End If
For Each c As BaseColumn In fkColumn.PrimaryKeyTableDefinition.Columns
If column = c.CodeName Then
Return rec.Format(c)
End If
Next
Return EvaluateFormula(_DFKA, rec, Nothing, tableName)
Else
Return Nothing
End If
End Function
'''
''' Evaluates the formula
'''
Public Shared Function EvaluateFormula(ByVal formula As String, Optional ByVal dataSourceForEvaluate As BaseClasses.Data.BaseRecord = Nothing, Optional ByVal format As String = Nothing, Optional ByVal name As String = "") As String
Dim e As BaseFormulaEvaluator = New BaseFormulaEvaluator()
If Not dataSourceForEvaluate Is Nothing Then
e.Evaluator.Variables.Add(name, dataSourceForEvaluate)
end if
e.DataSource = dataSourceForEvaluate
Dim resultObj As Object = e.Evaluate(formula)
If resultObj Is Nothing Then
Return ""
End If
If Not String.IsNullOrEmpty(format) Then
Return BaseFormulaUtils.Format(resultObj, format)
Else
Return resultObj.ToString()
End If
End Function
#End Region
End Class
End Namespace