' This class is "generated" and will be overwritten.
' Your customizations should be made in View_MaxPersonalEducationRecord.vb

Imports System.Data.SqlTypes
Imports System.Data
Imports BaseClasses
Imports BaseClasses.Data
Imports BaseClasses.Data.SqlProvider
Imports Persons.Data

Namespace Persons.Business

''' <summary>
''' The generated superclass for the <see cref="View_MaxPersonalEducationView"></see> class.
''' Provides access to the schema information and record data of a database table or view named View_MaxPersonalEducation.
''' </summary>
''' <remarks>
''' 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.
''' <para>
''' This class is not intended to be instantiated directly.  To obtain an instance of this class, use 
''' <see cref="View_MaxPersonalEducationView.Instance">View_MaxPersonalEducationView.Instance</see>.
''' </para>
''' </remarks>
''' <seealso cref="View_MaxPersonalEducationView"></seealso>

<Serializable()> Public Class BaseView_MaxPersonalEducationView
    Inherits PrimaryKeyTable
    

    Private ReadOnly TableDefinitionString As String = View_MaxPersonalEducationDefinition.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_MaxPersonalEducationView")
        def.InitializeTableDefinition(Me.TableDefinition)
        Me.ConnectionName = def.GetConnectionName()
        Me.RecordClassName = System.Reflection.Assembly.CreateQualifiedName("App_Code", "Persons.Business.View_MaxPersonalEducationRecord")
        Me.ApplicationName = "App_Code"
        Me.DataAdapter = New View_MaxPersonalEducationSqlView()
        Directcast(Me.DataAdapter, View_MaxPersonalEducationSqlView).ConnectionName = Me.ConnectionName
        
        Me.TableDefinition.AdapterMetaData = Me.DataAdapter.AdapterMetaData
        PersonalIdColumn.CodeName = "PersonalId"
        RankIdColumn.CodeName = "RankId"
        ShortRankNormalColumn.CodeName = "ShortRankNormal"
        PersonalNameColumn.CodeName = "PersonalName"
        PersonalLastNameColumn.CodeName = "PersonalLastName"
        SectionNameColumn.CodeName = "SectionName"
        LevelColumn.CodeName = "Level"
        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"
        CourseNoColumn.CodeName = "CourseNo"
        ScoreNoColumn.CodeName = "ScoreNo"
        NoAllColumn.CodeName = "NoAll"
        ScoreColumn.CodeName = "Score"
        CommandColumn.CodeName = "Command"
        CommandDateColumn.CodeName = "CommandDate"
        CountryColumn.CodeName = "Country"
        DateRankColumn.CodeName = "DateRank"
        DatePrevRankColumn.CodeName = "DatePrevRank"
        StatusIdColumn.CodeName = "StatusId"
        RankLevelNameColumn.CodeName = "RankLevelName"
        SectionAbbvrNameColumn.CodeName = "SectionAbbvrName"
        RankAndNameColumn.CodeName = "RankAndName"
        RankLevelColumn.CodeName = "RankLevel"
        
    End Sub

#Region "Overriden methods"

    
#End Region

#Region "Properties for columns"

    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.PersonalId column object.
    ''' </summary>
    Public ReadOnly Property PersonalIdColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(0), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.PersonalId column object.
    ''' </summary>
    Public Shared ReadOnly Property PersonalId() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.PersonalIdColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.RankId column object.
    ''' </summary>
    Public ReadOnly Property RankIdColumn() As BaseClasses.Data.NumberColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(1), BaseClasses.Data.NumberColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.RankId column object.
    ''' </summary>
    Public Shared ReadOnly Property RankId() As BaseClasses.Data.NumberColumn
        Get
            Return View_MaxPersonalEducationView.Instance.RankIdColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.ShortRankNormal column object.
    ''' </summary>
    Public ReadOnly Property ShortRankNormalColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(2), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.ShortRankNormal column object.
    ''' </summary>
    Public Shared ReadOnly Property ShortRankNormal() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.ShortRankNormalColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.PersonalName column object.
    ''' </summary>
    Public ReadOnly Property PersonalNameColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(3), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.PersonalName column object.
    ''' </summary>
    Public Shared ReadOnly Property PersonalName() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.PersonalNameColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.PersonalLastName column object.
    ''' </summary>
    Public ReadOnly Property PersonalLastNameColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(4), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.PersonalLastName column object.
    ''' </summary>
    Public Shared ReadOnly Property PersonalLastName() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.PersonalLastNameColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.SectionName column object.
    ''' </summary>
    Public ReadOnly Property SectionNameColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(5), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.SectionName column object.
    ''' </summary>
    Public Shared ReadOnly Property SectionName() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.SectionNameColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Level column object.
    ''' </summary>
    Public ReadOnly Property LevelColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(6), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Level column object.
    ''' </summary>
    Public Shared ReadOnly Property Level() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.LevelColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.StartDate column object.
    ''' </summary>
    Public ReadOnly Property StartDateColumn() As BaseClasses.Data.DateColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(7), BaseClasses.Data.DateColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.StartDate column object.
    ''' </summary>
    Public Shared ReadOnly Property StartDate() As BaseClasses.Data.DateColumn
        Get
            Return View_MaxPersonalEducationView.Instance.StartDateColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.EndDate column object.
    ''' </summary>
    Public ReadOnly Property EndDateColumn() As BaseClasses.Data.DateColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(8), BaseClasses.Data.DateColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.EndDate column object.
    ''' </summary>
    Public Shared ReadOnly Property EndDate() As BaseClasses.Data.DateColumn
        Get
            Return View_MaxPersonalEducationView.Instance.EndDateColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Course column object.
    ''' </summary>
    Public ReadOnly Property CourseColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(9), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Course column object.
    ''' </summary>
    Public Shared ReadOnly Property Course() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.CourseColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.CourseAbbr column object.
    ''' </summary>
    Public ReadOnly Property CourseAbbrColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(10), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.CourseAbbr column object.
    ''' </summary>
    Public Shared ReadOnly Property CourseAbbr() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.CourseAbbrColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Institue column object.
    ''' </summary>
    Public ReadOnly Property InstitueColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(11), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Institue column object.
    ''' </summary>
    Public Shared ReadOnly Property Institue() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.InstitueColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Facultry column object.
    ''' </summary>
    Public ReadOnly Property FacultryColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(12), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Facultry column object.
    ''' </summary>
    Public Shared ReadOnly Property Facultry() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.FacultryColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.LevelId column object.
    ''' </summary>
    Public ReadOnly Property LevelIdColumn() As BaseClasses.Data.NumberColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(13), BaseClasses.Data.NumberColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.LevelId column object.
    ''' </summary>
    Public Shared ReadOnly Property LevelId() As BaseClasses.Data.NumberColumn
        Get
            Return View_MaxPersonalEducationView.Instance.LevelIdColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.EdYear column object.
    ''' </summary>
    Public ReadOnly Property EdYearColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(14), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.EdYear column object.
    ''' </summary>
    Public Shared ReadOnly Property EdYear() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.EdYearColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.EducationPeriod column object.
    ''' </summary>
    Public ReadOnly Property EducationPeriodColumn() As BaseClasses.Data.NumberColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(15), BaseClasses.Data.NumberColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.EducationPeriod column object.
    ''' </summary>
    Public Shared ReadOnly Property EducationPeriod() As BaseClasses.Data.NumberColumn
        Get
            Return View_MaxPersonalEducationView.Instance.EducationPeriodColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.EducationType column object.
    ''' </summary>
    Public ReadOnly Property EducationTypeColumn() As BaseClasses.Data.NumberColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(16), BaseClasses.Data.NumberColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.EducationType column object.
    ''' </summary>
    Public Shared ReadOnly Property EducationType() As BaseClasses.Data.NumberColumn
        Get
            Return View_MaxPersonalEducationView.Instance.EducationTypeColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.CourseNo column object.
    ''' </summary>
    Public ReadOnly Property CourseNoColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(17), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.CourseNo column object.
    ''' </summary>
    Public Shared ReadOnly Property CourseNo() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.CourseNoColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.ScoreNo column object.
    ''' </summary>
    Public ReadOnly Property ScoreNoColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(18), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.ScoreNo column object.
    ''' </summary>
    Public Shared ReadOnly Property ScoreNo() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.ScoreNoColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.NoAll column object.
    ''' </summary>
    Public ReadOnly Property NoAllColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(19), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.NoAll column object.
    ''' </summary>
    Public Shared ReadOnly Property NoAll() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.NoAllColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Score column object.
    ''' </summary>
    Public ReadOnly Property ScoreColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(20), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Score column object.
    ''' </summary>
    Public Shared ReadOnly Property Score() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.ScoreColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Command column object.
    ''' </summary>
    Public ReadOnly Property CommandColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(21), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Command column object.
    ''' </summary>
    Public Shared ReadOnly Property Command() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.CommandColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.CommandDate column object.
    ''' </summary>
    Public ReadOnly Property CommandDateColumn() As BaseClasses.Data.DateColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(22), BaseClasses.Data.DateColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.CommandDate column object.
    ''' </summary>
    Public Shared ReadOnly Property CommandDate() As BaseClasses.Data.DateColumn
        Get
            Return View_MaxPersonalEducationView.Instance.CommandDateColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Country column object.
    ''' </summary>
    Public ReadOnly Property CountryColumn() As BaseClasses.Data.CountryColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(23), BaseClasses.Data.CountryColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.Country column object.
    ''' </summary>
    Public Shared ReadOnly Property Country() As BaseClasses.Data.CountryColumn
        Get
            Return View_MaxPersonalEducationView.Instance.CountryColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.DateRank column object.
    ''' </summary>
    Public ReadOnly Property DateRankColumn() As BaseClasses.Data.DateColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(24), BaseClasses.Data.DateColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.DateRank column object.
    ''' </summary>
    Public Shared ReadOnly Property DateRank() As BaseClasses.Data.DateColumn
        Get
            Return View_MaxPersonalEducationView.Instance.DateRankColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.DatePrevRank column object.
    ''' </summary>
    Public ReadOnly Property DatePrevRankColumn() As BaseClasses.Data.DateColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(25), BaseClasses.Data.DateColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.DatePrevRank column object.
    ''' </summary>
    Public Shared ReadOnly Property DatePrevRank() As BaseClasses.Data.DateColumn
        Get
            Return View_MaxPersonalEducationView.Instance.DatePrevRankColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.StatusId column object.
    ''' </summary>
    Public ReadOnly Property StatusIdColumn() As BaseClasses.Data.NumberColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(26), BaseClasses.Data.NumberColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.StatusId column object.
    ''' </summary>
    Public Shared ReadOnly Property StatusId() As BaseClasses.Data.NumberColumn
        Get
            Return View_MaxPersonalEducationView.Instance.StatusIdColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.RankLevelName column object.
    ''' </summary>
    Public ReadOnly Property RankLevelNameColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(27), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.RankLevelName column object.
    ''' </summary>
    Public Shared ReadOnly Property RankLevelName() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.RankLevelNameColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.SectionAbbvrName column object.
    ''' </summary>
    Public ReadOnly Property SectionAbbvrNameColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(28), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.SectionAbbvrName column object.
    ''' </summary>
    Public Shared ReadOnly Property SectionAbbvrName() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.SectionAbbvrNameColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.RankAndName column object.
    ''' </summary>
    Public ReadOnly Property RankAndNameColumn() As BaseClasses.Data.StringColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(29), BaseClasses.Data.StringColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.RankAndName column object.
    ''' </summary>
    Public Shared ReadOnly Property RankAndName() As BaseClasses.Data.StringColumn
        Get
            Return View_MaxPersonalEducationView.Instance.RankAndNameColumn
        End Get
    End Property
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.RankLevel column object.
    ''' </summary>
    Public ReadOnly Property RankLevelColumn() As BaseClasses.Data.NumberColumn
        Get
            Return CType(Me.TableDefinition.ColumnList(30), BaseClasses.Data.NumberColumn)
        End Get
    End Property


    
    ''' <summary>
    ''' This is a convenience property that provides direct access to the table's View_MaxPersonalEducation_.RankLevel column object.
    ''' </summary>
    Public Shared ReadOnly Property RankLevel() As BaseClasses.Data.NumberColumn
        Get
            Return View_MaxPersonalEducationView.Instance.RankLevelColumn
        End Get
    End Property


#End Region


#Region "Shared helper methods"

    ''' <summary>
    ''' This is a shared function that can be used to get an array of View_MaxPersonalEducationRecord records using a where clause.
    ''' </summary>
    Public Shared Function GetRecords(ByVal where As String) As View_MaxPersonalEducationRecord()

        Return GetRecords(where, Nothing, BaseTable.MIN_PAGE_NUMBER, BaseTable.MAX_BATCH_SIZE)
    End Function
    
    ''' <summary>
    ''' This is a shared function that can be used to get an array of View_MaxPersonalEducationRecord records using a where clause.
    ''' </summary>
    Public Shared Function GetRecords(ByVal join As BaseFilter, ByVal where As String) As View_MaxPersonalEducationRecord()

        Return GetRecords(join, where, Nothing, BaseTable.MIN_PAGE_NUMBER, BaseTable.MAX_BATCH_SIZE)
    End Function

    ''' <summary>
    ''' This is a shared function that can be used to get an array of View_MaxPersonalEducationRecord records using a where and order by clause.
    ''' </summary>
    Public Shared Function GetRecords( _
     ByVal where As String, _
     ByVal orderBy As OrderBy) As View_MaxPersonalEducationRecord()

        Return GetRecords(where, orderBy, BaseTable.MIN_PAGE_NUMBER, BaseTable.MAX_BATCH_SIZE)
    End Function

    ''' <summary>
    ''' This is a shared function that can be used to get an array of View_MaxPersonalEducationRecord records using a where and order by clause.
    ''' </summary>
    Public Shared Function GetRecords( _
     ByVal join As BaseFilter, _
     ByVal where As String, _
     ByVal orderBy As OrderBy) As View_MaxPersonalEducationRecord()

        Return GetRecords(join, where, orderBy, BaseTable.MIN_PAGE_NUMBER, BaseTable.MAX_BATCH_SIZE)
    End Function
    
    ''' <summary>
    ''' This is a shared function that can be used to get an array of View_MaxPersonalEducationRecord records using a where and order by clause clause with pagination.
    ''' </summary>
    Public Shared Function GetRecords( _
     ByVal where As String, _
     ByVal orderBy As OrderBy, _
     ByVal pageIndex As Integer, _
     ByVal pageSize As Integer) As View_MaxPersonalEducationRecord()
        
        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_MaxPersonalEducationView.Instance.GetRecordList(join, whereFilter, Nothing, orderBy, pageIndex, pageSize)
 
        Return CType(recList.ToArray(GetType(Persons.Business.View_MaxPersonalEducationRecord)), View_MaxPersonalEducationRecord())
    End Function

    ''' <summary>
    ''' This is a shared function that can be used to get an array of View_MaxPersonalEducationRecord records using a where and order by clause clause with pagination.
    ''' </summary>
    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_MaxPersonalEducationRecord()
        
        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_MaxPersonalEducationView.Instance.GetRecordList(join, whereFilter, Nothing, orderBy, pageIndex, pageSize)
 
        Return CType(recList.ToArray(GetType(Persons.Business.View_MaxPersonalEducationRecord)), View_MaxPersonalEducationRecord())
    End Function

    Public Shared Function GetRecords( _
     ByVal where As WhereClause, _
     ByVal orderBy As OrderBy, _
     ByVal pageIndex As Integer, _
     ByVal pageSize As Integer) As View_MaxPersonalEducationRecord()
        Dim join As BaseClasses.Data.BaseFilter = Nothing
        Dim recList As ArrayList = View_MaxPersonalEducationView.Instance.GetRecordList(join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize)

        Return CType(recList.ToArray(GetType(Persons.Business.View_MaxPersonalEducationRecord)), View_MaxPersonalEducationRecord())
    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_MaxPersonalEducationRecord()

        Dim recList As ArrayList = View_MaxPersonalEducationView.Instance.GetRecordList(join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize)

        Return CType(recList.ToArray(GetType(Persons.Business.View_MaxPersonalEducationRecord)), View_MaxPersonalEducationRecord())
    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_MaxPersonalEducationRecord()
        Dim join As BaseClasses.Data.BaseFilter = Nothing
        Dim recList As ArrayList = View_MaxPersonalEducationView.Instance.GetRecordList(join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize, totalRecords)

        Return CType(recList.ToArray(GetType(Persons.Business.View_MaxPersonalEducationRecord)), View_MaxPersonalEducationRecord())
    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_MaxPersonalEducationRecord()

        Dim recList As ArrayList = View_MaxPersonalEducationView.Instance.GetRecordList(join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize, totalRecords)

        Return CType(recList.ToArray(GetType(Persons.Business.View_MaxPersonalEducationRecord)), View_MaxPersonalEducationRecord())
    End Function
    
    ''' <summary>
    ''' This is a shared function that can be used to get total number of records that will be returned using the where clause.
    ''' </summary>
    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_MaxPersonalEducationView.Instance.GetRecordListCount(Nothing, whereFilter, Nothing, Nothing))
    End Function

''' <summary>
    ''' This is a shared function that can be used to get total number of records that will be returned using the where clause.
    ''' </summary>
    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_MaxPersonalEducationView.Instance.GetRecordListCount(join, whereFilter, Nothing, Nothing))
    End Function

    Public Shared Function GetRecordCount(ByVal where As WhereClause) As Integer
        Return CInt(View_MaxPersonalEducationView.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_MaxPersonalEducationView.Instance.GetRecordListCount(join, where.GetFilter(), Nothing, Nothing))
    End Function

    ''' <summary>
    ''' This is a shared function that can be used to get a View_MaxPersonalEducationRecord record using a where clause.
    ''' </summary>
    Public Shared Function GetRecord(ByVal where As String) As View_MaxPersonalEducationRecord
        Dim orderBy As OrderBy = Nothing
        Return GetRecord(where, orderBy)
    End Function

    ''' <summary>
    ''' This is a shared function that can be used to get a View_MaxPersonalEducationRecord record using a where clause.
    ''' </summary>
    Public Shared Function GetRecord(ByVal join As BaseFilter, ByVal where As String) As View_MaxPersonalEducationRecord
        Dim orderBy As OrderBy = Nothing
        Return GetRecord(join, where, orderBy)
    End Function

    ''' <summary>
    ''' This is a shared function that can be used to get a View_MaxPersonalEducationRecord record using a where and order by clause.
    ''' </summary>
    Public Shared Function GetRecord( _
     ByVal where As String, _
     ByVal orderBy As OrderBy) As View_MaxPersonalEducationRecord

        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_MaxPersonalEducationView.Instance.GetRecordList(join, whereFilter, Nothing, orderBy, BaseTable.MIN_PAGE_NUMBER, BaseTable.MIN_BATCH_SIZE)

        Dim rec As View_MaxPersonalEducationRecord = Nothing
        If recList.Count > 0 Then
            rec = CType(recList(0), View_MaxPersonalEducationRecord)
        End If

        Return rec
    End Function

    ''' <summary>
    ''' This is a shared function that can be used to get a View_MaxPersonalEducationRecord record using a where and order by clause.
    ''' </summary>
    Public Shared Function GetRecord( _
     ByVal join As BaseFilter, _
     ByVal where As String, _
     ByVal orderBy As OrderBy) As View_MaxPersonalEducationRecord

        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_MaxPersonalEducationView.Instance.GetRecordList(join, whereFilter, Nothing, orderBy, BaseTable.MIN_PAGE_NUMBER, BaseTable.MIN_BATCH_SIZE)

        Dim rec As View_MaxPersonalEducationRecord = Nothing
        If recList.Count > 0 Then
            rec = CType(recList(0), View_MaxPersonalEducationRecord)
        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_MaxPersonalEducationView.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_MaxPersonalEducationView.Instance.GetColumnValues(retCol, join, where.GetFilter(), Nothing, orderBy, BaseTable.MIN_PAGE_NUMBER, maxItems)

    End Function


    ''' <summary>
    ''' This is a shared function that can be used to get a DataTable to bound with a data bound control using a where clause.
    ''' </summary>
    Public Shared Function GetDataTable(ByVal where As String) As System.Data.DataTable

        Dim recs() As View_MaxPersonalEducationRecord = GetRecords(where)
        Return View_MaxPersonalEducationView.Instance.CreateDataTable(recs, Nothing)
    End Function
    
    ''' <summary>
    ''' This is a shared function that can be used to get a DataTable to bound with a data bound control using a where clause.
    ''' </summary>
    Public Shared Function GetDataTable(ByVal join As BaseFilter, ByVal where As String) As System.Data.DataTable

        Dim recs() As View_MaxPersonalEducationRecord = GetRecords(join, where)
        Return View_MaxPersonalEducationView.Instance.CreateDataTable(recs, Nothing)
    End Function
    

    ''' <summary>
    ''' 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.
    ''' </summary>
    Public Shared Function GetDataTable(ByVal where As String, ByVal orderBy As OrderBy) As System.Data.DataTable

        Dim recs() As View_MaxPersonalEducationRecord = GetRecords(where, orderBy)
        Return View_MaxPersonalEducationView.Instance.CreateDataTable(recs, Nothing)
    End Function

    ''' <summary>
    ''' 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.
    ''' </summary>
    Public Shared Function GetDataTable(ByVal join As BaseFilter, ByVal where As String, ByVal orderBy As OrderBy) As System.Data.DataTable

        Dim recs() As View_MaxPersonalEducationRecord = GetRecords(join, where, orderBy)
        Return View_MaxPersonalEducationView.Instance.CreateDataTable(recs, Nothing)
    End Function


    ''' <summary>
    ''' 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.
    ''' </summary>
    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_MaxPersonalEducationRecord = GetRecords(where, orderBy, pageIndex, pageSize)
        Return View_MaxPersonalEducationView.Instance.CreateDataTable(recs, Nothing)
    End Function

    ''' <summary>
    ''' 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.
    ''' </summary>
    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_MaxPersonalEducationRecord = GetRecords(join, where, orderBy, pageIndex, pageSize)
        Return View_MaxPersonalEducationView.Instance.CreateDataTable(recs, Nothing)
    End Function


    ''' <summary>
    ''' This is a shared function that can be used to delete records using a where clause.
    ''' </summary>
    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_MaxPersonalEducationView.Instance.DeleteRecordList(whereFilter)
    End Sub

    ''' <summary>
    ''' This is a shared function that can be used to export records using a where clause.
    ''' </summary>
    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_MaxPersonalEducationView.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_MaxPersonalEducationView.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_MaxPersonalEducationView.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_MaxPersonalEducationView.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_MaxPersonalEducationView.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_MaxPersonalEducationView.Instance.GetColumnStatistics(colSel, join, where.GetFilter(), Nothing, orderBy, pageIndex, pageSize)

    End Function    

    ''' <summary>
    '''  This method returns the columns in the table.
    ''' </summary>
    Public Shared Function GetColumns() As BaseColumn()
        Return View_MaxPersonalEducationView.Instance.TableDefinition.Columns
    End Function

    ''' <summary>
    '''  This method returns the columnlist in the table.
    ''' </summary>  
    Public Shared Function GetColumnList() As ColumnList
        Return View_MaxPersonalEducationView.Instance.TableDefinition.ColumnList
    End Function


    ''' <summary>
    ''' This method creates a new record and returns it to be edited.
    ''' </summary>
    Public Shared Function CreateNewRecord() As IRecord
        Return View_MaxPersonalEducationView.Instance.CreateRecord()
    End Function

    ''' <summary>
    ''' This method creates a new record and returns it to be edited.
    ''' </summary>
    ''' <param name="tempId">ID of the new record.</param>  
    Public Shared Function CreateNewRecord(ByVal tempId As String) As IRecord
        Return View_MaxPersonalEducationView.Instance.CreateRecord(tempId)
    End Function

    ''' <summary>
    ''' This method checks if column is editable.
    ''' </summary>
    ''' <param name="columnName">Name of the column to check.</param>
    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

    ''' <summary>
    ''' This method gets the specified column.
    ''' </summary>
    ''' <param name="uniqueColumnName">Unique name of the column to fetch.</param>
    Public Shared Function GetColumn(ByVal uniqueColumnName As String) As BaseColumn
        Dim column As BaseColumn = View_MaxPersonalEducationView.Instance.TableDefinition.ColumnList.GetByUniqueName(uniqueColumnName)
        Return column
    End Function     

    ' Convenience method for getting a record using a string-based record identifier
    Public Shared Function GetRecord(ByVal id As String, ByVal bMutable As Boolean) As View_MaxPersonalEducationRecord
        Return CType(View_MaxPersonalEducationView.Instance.GetRecordData(id, bMutable), View_MaxPersonalEducationRecord)
    End Function

    ' Convenience method for getting a record using a KeyValue record identifier
    Public Shared Function GetRecord(ByVal id As KeyValue, ByVal bMutable As Boolean) As View_MaxPersonalEducationRecord
        Return CType(View_MaxPersonalEducationView.Instance.GetRecordData(id, bMutable), View_MaxPersonalEducationRecord)
    End Function

    ' Convenience method for creating a record
    Public Overloads Function NewRecord( _
        ByVal PersonalIdValue As String, _
        ByVal RankIdValue As String, _
        ByVal ShortRankNormalValue As String, _
        ByVal PersonalNameValue As String, _
        ByVal PersonalLastNameValue As String, _
        ByVal SectionNameValue As String, _
        ByVal LevelValue As String, _
        ByVal StartDateValue As String, _
        ByVal EndDateValue As String, _
        ByVal CourseValue As String, _
        ByVal CourseAbbrValue As String, _
        ByVal InstitueValue As String, _
        ByVal FacultryValue As String, _
        ByVal LevelIdValue As String, _
        ByVal EdYearValue As String, _
        ByVal EducationPeriodValue As String, _
        ByVal EducationTypeValue As String, _
        ByVal CourseNoValue As String, _
        ByVal ScoreNoValue As String, _
        ByVal NoAllValue As String, _
        ByVal ScoreValue As String, _
        ByVal CommandValue As String, _
        ByVal CommandDateValue As String, _
        ByVal CountryValue As String, _
        ByVal DateRankValue As String, _
        ByVal DatePrevRankValue As String, _
        ByVal StatusIdValue As String, _
        ByVal RankLevelNameValue As String, _
        ByVal SectionAbbvrNameValue As String, _
        ByVal RankAndNameValue As String, _
        ByVal RankLevelValue As String _
    ) As KeyValue
        Dim rec As IPrimaryKeyRecord = CType(Me.CreateRecord(), IPrimaryKeyRecord)
                rec.SetString(PersonalIdValue, PersonalIdColumn)
        rec.SetString(RankIdValue, RankIdColumn)
        rec.SetString(ShortRankNormalValue, ShortRankNormalColumn)
        rec.SetString(PersonalNameValue, PersonalNameColumn)
        rec.SetString(PersonalLastNameValue, PersonalLastNameColumn)
        rec.SetString(SectionNameValue, SectionNameColumn)
        rec.SetString(LevelValue, LevelColumn)
        rec.SetString(StartDateValue, StartDateColumn)
        rec.SetString(EndDateValue, EndDateColumn)
        rec.SetString(CourseValue, CourseColumn)
        rec.SetString(CourseAbbrValue, CourseAbbrColumn)
        rec.SetString(InstitueValue, InstitueColumn)
        rec.SetString(FacultryValue, FacultryColumn)
        rec.SetString(LevelIdValue, LevelIdColumn)
        rec.SetString(EdYearValue, EdYearColumn)
        rec.SetString(EducationPeriodValue, EducationPeriodColumn)
        rec.SetString(EducationTypeValue, EducationTypeColumn)
        rec.SetString(CourseNoValue, CourseNoColumn)
        rec.SetString(ScoreNoValue, ScoreNoColumn)
        rec.SetString(NoAllValue, NoAllColumn)
        rec.SetString(ScoreValue, ScoreColumn)
        rec.SetString(CommandValue, CommandColumn)
        rec.SetString(CommandDateValue, CommandDateColumn)
        rec.SetString(CountryValue, CountryColumn)
        rec.SetString(DateRankValue, DateRankColumn)
        rec.SetString(DatePrevRankValue, DatePrevRankColumn)
        rec.SetString(StatusIdValue, StatusIdColumn)
        rec.SetString(RankLevelNameValue, RankLevelNameColumn)
        rec.SetString(SectionAbbvrNameValue, SectionAbbvrNameColumn)
        rec.SetString(RankAndNameValue, RankAndNameColumn)
        rec.SetString(RankLevelValue, RankLevelColumn)


        rec.Create() 'update the DB so any DB-initialized fields (like autoincrement IDs) can be initialized

        Dim key As KeyValue = rec.GetID()
        Return key
    End Function

    ''' <summary>
    '''  This method deletes a specified record
    ''' </summary>
    ''' <param name="kv">Keyvalue of the record to be deleted.</param>
    Public Shared Sub DeleteRecord(ByVal kv As KeyValue)
        View_MaxPersonalEducationView.Instance.DeleteOneRecord(kv)
    End Sub

    ''' <summary>
    ''' This method checks if record exist in the database using the keyvalue provided.
    ''' </summary>
    ''' <param name="kv">Key value of the record.</param>
    Public Shared Function DoesRecordExist(ByVal kv As KeyValue) As Boolean
        Dim recordExist As Boolean = True
        Try
            View_MaxPersonalEducationView.GetRecord(kv, False)
        Catch ex As Exception
            recordExist = False
        End Try
        Return recordExist
    End Function
    
    ''' <summary>
    '''  This method returns all the primary columns in the table.
    ''' </summary>
    Public Shared Function GetPrimaryKeyColumns() As ColumnList
        If (Not IsNothing(View_MaxPersonalEducationView.Instance.TableDefinition.PrimaryKey)) Then
            Return View_MaxPersonalEducationView.Instance.TableDefinition.PrimaryKey.Columns
        Else
            Return Nothing
        End If
    End Function

    ''' <summary>
    ''' This method takes a key and returns a keyvalue.
    ''' </summary>
    ''' <param name="key">key could be array of primary key values in case of composite primary key or a string containing single primary key value in case of non-composite primary key.</param>
    Public Shared Function GetKeyValue(ByVal key As Object) As KeyValue
        Dim kv As KeyValue = Nothing

        If (Not (IsNothing(View_MaxPersonalEducationView.Instance.TableDefinition.PrimaryKey))) Then

            Dim isCompositePrimaryKey As Boolean = False
            isCompositePrimaryKey = View_MaxPersonalEducationView.Instance.TableDefinition.PrimaryKey.IsCompositeKey

            If ((isCompositePrimaryKey) AndAlso (key.GetType.IsArray())) Then

                ' If the key is composite, then construct a key value.
                kv = New KeyValue
                Dim fullKeyString As String = ""
                Dim keyArray As Array = CType(key, Array)
                If (Not IsNothing(keyArray)) Then
                    Dim length As Integer = keyArray.Length
                    Dim pkColumns As ColumnList = View_MaxPersonalEducationView.Instance.TableDefinition.PrimaryKey.Columns
                    Dim pkColumn As BaseColumn
                    Dim index As Integer = 0
                    For Each pkColumn In pkColumns
                        Dim keyString As String = CType(keyArray.GetValue(index), String)
                        If (View_MaxPersonalEducationView.Instance.TableDefinition.TableType = BaseClasses.Data.TableDefinition.TableTypes.Virtual) Then
                            kv.AddElement(pkColumn.UniqueName, keyString)
                        Else
                            kv.AddElement(pkColumn.InternalName, keyString)
                        End If
                        index = index + 1
                    Next pkColumn
                End If

            Else
                ' If the key is not composite, then get the key value.
                kv = View_MaxPersonalEducationView.Instance.TableDefinition.PrimaryKey.ParseValue(CType(key, String))
            End If
        End If
        Return kv
    End Function    


	 ''' <summary>
     ''' This method takes a record and a Column and returns an evaluated value of DFKA formula.
     ''' </summary>
	Public Shared Function GetDFKA(ByVal rec As BaseRecord, ByVal col As BaseColumn) As String
	    Dim fkColumn As ForeignKey = View_MaxPersonalEducationView.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 "= <Primary table>.<Field name>, 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

	''' <summary>
    ''' This method takes a keyValue and a Column and returns an evaluated value of DFKA formula.
    ''' </summary>
	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_MaxPersonalEducationView.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 "= <Primary table>.<Field name>, 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

	''' <summary>
    ''' Evaluates the formula
    ''' </summary>
	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
