/Visual Studio 2008/VBVstoExcelWorkbook/SchoolDataSet.Designer.vb
# · Visual Basic · 10581 lines · 9213 code · 1150 blank · 218 comment · 13 complexity · 93897e8b697efd5e60ab1eed0f5a6537 MD5 · raw file
- '------------------------------------------------------------------------------
- ' <auto-generated>
- ' This code was generated by a tool.
- ' Runtime Version:2.0.50727.4927
- '
- ' Changes to this file may cause incorrect behavior and will be lost if
- ' the code is regenerated.
- ' </auto-generated>
- '------------------------------------------------------------------------------
-
- Option Strict Off
- Option Explicit On
-
-
-
- '''<summary>
- '''Represents a strongly typed in-memory cache of data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
- Global.System.Xml.Serialization.XmlRootAttribute("SchoolDataSet"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
- Partial Public Class SchoolDataSet
- Inherits Global.System.Data.DataSet
-
- Private tableCourse As CourseDataTable
-
- Private tableCourseGrade As CourseGradeDataTable
-
- Private tableCourseInstructor As CourseInstructorDataTable
-
- Private tableDepartment As DepartmentDataTable
-
- Private tableOfficeAssignment As OfficeAssignmentDataTable
-
- Private tableOnlineCourse As OnlineCourseDataTable
-
- Private tableOnsiteCourse As OnsiteCourseDataTable
-
- Private tablePerson As PersonDataTable
-
- Private tableGetStudentGrades As GetStudentGradesDataTable
-
- Private tableInsertOfficeAssignment As InsertOfficeAssignmentDataTable
-
- Private tableInsertPerson As InsertPersonDataTable
-
- Private tableUpdateOfficeAssignment As UpdateOfficeAssignmentDataTable
-
- Private tableCourseList As CourseListDataTable
-
- Private tableStudentList As StudentListDataTable
-
- Private relationFK_Course_Department As Global.System.Data.DataRelation
-
- Private relationFK_CourseGrade_Course As Global.System.Data.DataRelation
-
- Private relationFK_CourseGrade_Student As Global.System.Data.DataRelation
-
- Private relationFK_CourseInstructor_Course As Global.System.Data.DataRelation
-
- Private relationFK_CourseInstructor_Person As Global.System.Data.DataRelation
-
- Private relationFK_OfficeAssignment_Person As Global.System.Data.DataRelation
-
- Private relationFK_OnlineCourse_Course As Global.System.Data.DataRelation
-
- Private relationFK_OnsiteCourse_Course As Global.System.Data.DataRelation
-
- Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.BeginInit
- Me.InitClass
- Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
- AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
- AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context, false)
- If (Me.IsBinarySerialized(info, context) = true) Then
- Me.InitVars(false)
- Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
- AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
- AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
- Return
- End If
- Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
- If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
- Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet
- ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
- If (Not (ds.Tables("Course")) Is Nothing) Then
- MyBase.Tables.Add(New CourseDataTable(ds.Tables("Course")))
- End If
- If (Not (ds.Tables("CourseGrade")) Is Nothing) Then
- MyBase.Tables.Add(New CourseGradeDataTable(ds.Tables("CourseGrade")))
- End If
- If (Not (ds.Tables("CourseInstructor")) Is Nothing) Then
- MyBase.Tables.Add(New CourseInstructorDataTable(ds.Tables("CourseInstructor")))
- End If
- If (Not (ds.Tables("Department")) Is Nothing) Then
- MyBase.Tables.Add(New DepartmentDataTable(ds.Tables("Department")))
- End If
- If (Not (ds.Tables("OfficeAssignment")) Is Nothing) Then
- MyBase.Tables.Add(New OfficeAssignmentDataTable(ds.Tables("OfficeAssignment")))
- End If
- If (Not (ds.Tables("OnlineCourse")) Is Nothing) Then
- MyBase.Tables.Add(New OnlineCourseDataTable(ds.Tables("OnlineCourse")))
- End If
- If (Not (ds.Tables("OnsiteCourse")) Is Nothing) Then
- MyBase.Tables.Add(New OnsiteCourseDataTable(ds.Tables("OnsiteCourse")))
- End If
- If (Not (ds.Tables("Person")) Is Nothing) Then
- MyBase.Tables.Add(New PersonDataTable(ds.Tables("Person")))
- End If
- If (Not (ds.Tables("GetStudentGrades")) Is Nothing) Then
- MyBase.Tables.Add(New GetStudentGradesDataTable(ds.Tables("GetStudentGrades")))
- End If
- If (Not (ds.Tables("InsertOfficeAssignment")) Is Nothing) Then
- MyBase.Tables.Add(New InsertOfficeAssignmentDataTable(ds.Tables("InsertOfficeAssignment")))
- End If
- If (Not (ds.Tables("InsertPerson")) Is Nothing) Then
- MyBase.Tables.Add(New InsertPersonDataTable(ds.Tables("InsertPerson")))
- End If
- If (Not (ds.Tables("UpdateOfficeAssignment")) Is Nothing) Then
- MyBase.Tables.Add(New UpdateOfficeAssignmentDataTable(ds.Tables("UpdateOfficeAssignment")))
- End If
- If (Not (ds.Tables("CourseList")) Is Nothing) Then
- MyBase.Tables.Add(New CourseListDataTable(ds.Tables("CourseList")))
- End If
- If (Not (ds.Tables("StudentList")) Is Nothing) Then
- MyBase.Tables.Add(New StudentListDataTable(ds.Tables("StudentList")))
- End If
- Me.DataSetName = ds.DataSetName
- Me.Prefix = ds.Prefix
- Me.Namespace = ds.Namespace
- Me.Locale = ds.Locale
- Me.CaseSensitive = ds.CaseSensitive
- Me.EnforceConstraints = ds.EnforceConstraints
- Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
- Me.InitVars
- Else
- Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
- End If
- Me.GetSerializationData(info, context)
- Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
- AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
- AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property Course() As CourseDataTable
- Get
- Return Me.tableCourse
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property CourseGrade() As CourseGradeDataTable
- Get
- Return Me.tableCourseGrade
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property CourseInstructor() As CourseInstructorDataTable
- Get
- Return Me.tableCourseInstructor
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property Department() As DepartmentDataTable
- Get
- Return Me.tableDepartment
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property OfficeAssignment() As OfficeAssignmentDataTable
- Get
- Return Me.tableOfficeAssignment
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property OnlineCourse() As OnlineCourseDataTable
- Get
- Return Me.tableOnlineCourse
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property OnsiteCourse() As OnsiteCourseDataTable
- Get
- Return Me.tableOnsiteCourse
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property Person() As PersonDataTable
- Get
- Return Me.tablePerson
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property GetStudentGrades() As GetStudentGradesDataTable
- Get
- Return Me.tableGetStudentGrades
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property InsertOfficeAssignment() As InsertOfficeAssignmentDataTable
- Get
- Return Me.tableInsertOfficeAssignment
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property InsertPerson() As InsertPersonDataTable
- Get
- Return Me.tableInsertPerson
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property UpdateOfficeAssignment() As UpdateOfficeAssignmentDataTable
- Get
- Return Me.tableUpdateOfficeAssignment
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property CourseList() As CourseListDataTable
- Get
- Return Me.tableCourseList
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false), _
- Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
- Public ReadOnly Property StudentList() As StudentListDataTable
- Get
- Return Me.tableStudentList
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.BrowsableAttribute(true), _
- Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _
- Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
- Get
- Return Me._schemaSerializationMode
- End Get
- Set
- Me._schemaSerializationMode = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
- Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
- Get
- Return MyBase.Tables
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
- Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
- Get
- Return MyBase.Relations
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub InitializeDerivedDataSet()
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataSet
- Dim cln As SchoolDataSet = CType(MyBase.Clone,SchoolDataSet)
- cln.InitVars
- cln.SchemaSerializationMode = Me.SchemaSerializationMode
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function ShouldSerializeTables() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function ShouldSerializeRelations() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
- If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
- Me.Reset
- Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet
- ds.ReadXml(reader)
- If (Not (ds.Tables("Course")) Is Nothing) Then
- MyBase.Tables.Add(New CourseDataTable(ds.Tables("Course")))
- End If
- If (Not (ds.Tables("CourseGrade")) Is Nothing) Then
- MyBase.Tables.Add(New CourseGradeDataTable(ds.Tables("CourseGrade")))
- End If
- If (Not (ds.Tables("CourseInstructor")) Is Nothing) Then
- MyBase.Tables.Add(New CourseInstructorDataTable(ds.Tables("CourseInstructor")))
- End If
- If (Not (ds.Tables("Department")) Is Nothing) Then
- MyBase.Tables.Add(New DepartmentDataTable(ds.Tables("Department")))
- End If
- If (Not (ds.Tables("OfficeAssignment")) Is Nothing) Then
- MyBase.Tables.Add(New OfficeAssignmentDataTable(ds.Tables("OfficeAssignment")))
- End If
- If (Not (ds.Tables("OnlineCourse")) Is Nothing) Then
- MyBase.Tables.Add(New OnlineCourseDataTable(ds.Tables("OnlineCourse")))
- End If
- If (Not (ds.Tables("OnsiteCourse")) Is Nothing) Then
- MyBase.Tables.Add(New OnsiteCourseDataTable(ds.Tables("OnsiteCourse")))
- End If
- If (Not (ds.Tables("Person")) Is Nothing) Then
- MyBase.Tables.Add(New PersonDataTable(ds.Tables("Person")))
- End If
- If (Not (ds.Tables("GetStudentGrades")) Is Nothing) Then
- MyBase.Tables.Add(New GetStudentGradesDataTable(ds.Tables("GetStudentGrades")))
- End If
- If (Not (ds.Tables("InsertOfficeAssignment")) Is Nothing) Then
- MyBase.Tables.Add(New InsertOfficeAssignmentDataTable(ds.Tables("InsertOfficeAssignment")))
- End If
- If (Not (ds.Tables("InsertPerson")) Is Nothing) Then
- MyBase.Tables.Add(New InsertPersonDataTable(ds.Tables("InsertPerson")))
- End If
- If (Not (ds.Tables("UpdateOfficeAssignment")) Is Nothing) Then
- MyBase.Tables.Add(New UpdateOfficeAssignmentDataTable(ds.Tables("UpdateOfficeAssignment")))
- End If
- If (Not (ds.Tables("CourseList")) Is Nothing) Then
- MyBase.Tables.Add(New CourseListDataTable(ds.Tables("CourseList")))
- End If
- If (Not (ds.Tables("StudentList")) Is Nothing) Then
- MyBase.Tables.Add(New StudentListDataTable(ds.Tables("StudentList")))
- End If
- Me.DataSetName = ds.DataSetName
- Me.Prefix = ds.Prefix
- Me.Namespace = ds.Namespace
- Me.Locale = ds.Locale
- Me.CaseSensitive = ds.CaseSensitive
- Me.EnforceConstraints = ds.EnforceConstraints
- Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
- Me.InitVars
- Else
- Me.ReadXml(reader)
- Me.InitVars
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
- Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
- stream.Position = 0
- Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Overloads Sub InitVars()
- Me.InitVars(true)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Overloads Sub InitVars(ByVal initTable As Boolean)
- Me.tableCourse = CType(MyBase.Tables("Course"),CourseDataTable)
- If (initTable = true) Then
- If (Not (Me.tableCourse) Is Nothing) Then
- Me.tableCourse.InitVars
- End If
- End If
- Me.tableCourseGrade = CType(MyBase.Tables("CourseGrade"),CourseGradeDataTable)
- If (initTable = true) Then
- If (Not (Me.tableCourseGrade) Is Nothing) Then
- Me.tableCourseGrade.InitVars
- End If
- End If
- Me.tableCourseInstructor = CType(MyBase.Tables("CourseInstructor"),CourseInstructorDataTable)
- If (initTable = true) Then
- If (Not (Me.tableCourseInstructor) Is Nothing) Then
- Me.tableCourseInstructor.InitVars
- End If
- End If
- Me.tableDepartment = CType(MyBase.Tables("Department"),DepartmentDataTable)
- If (initTable = true) Then
- If (Not (Me.tableDepartment) Is Nothing) Then
- Me.tableDepartment.InitVars
- End If
- End If
- Me.tableOfficeAssignment = CType(MyBase.Tables("OfficeAssignment"),OfficeAssignmentDataTable)
- If (initTable = true) Then
- If (Not (Me.tableOfficeAssignment) Is Nothing) Then
- Me.tableOfficeAssignment.InitVars
- End If
- End If
- Me.tableOnlineCourse = CType(MyBase.Tables("OnlineCourse"),OnlineCourseDataTable)
- If (initTable = true) Then
- If (Not (Me.tableOnlineCourse) Is Nothing) Then
- Me.tableOnlineCourse.InitVars
- End If
- End If
- Me.tableOnsiteCourse = CType(MyBase.Tables("OnsiteCourse"),OnsiteCourseDataTable)
- If (initTable = true) Then
- If (Not (Me.tableOnsiteCourse) Is Nothing) Then
- Me.tableOnsiteCourse.InitVars
- End If
- End If
- Me.tablePerson = CType(MyBase.Tables("Person"),PersonDataTable)
- If (initTable = true) Then
- If (Not (Me.tablePerson) Is Nothing) Then
- Me.tablePerson.InitVars
- End If
- End If
- Me.tableGetStudentGrades = CType(MyBase.Tables("GetStudentGrades"),GetStudentGradesDataTable)
- If (initTable = true) Then
- If (Not (Me.tableGetStudentGrades) Is Nothing) Then
- Me.tableGetStudentGrades.InitVars
- End If
- End If
- Me.tableInsertOfficeAssignment = CType(MyBase.Tables("InsertOfficeAssignment"),InsertOfficeAssignmentDataTable)
- If (initTable = true) Then
- If (Not (Me.tableInsertOfficeAssignment) Is Nothing) Then
- Me.tableInsertOfficeAssignment.InitVars
- End If
- End If
- Me.tableInsertPerson = CType(MyBase.Tables("InsertPerson"),InsertPersonDataTable)
- If (initTable = true) Then
- If (Not (Me.tableInsertPerson) Is Nothing) Then
- Me.tableInsertPerson.InitVars
- End If
- End If
- Me.tableUpdateOfficeAssignment = CType(MyBase.Tables("UpdateOfficeAssignment"),UpdateOfficeAssignmentDataTable)
- If (initTable = true) Then
- If (Not (Me.tableUpdateOfficeAssignment) Is Nothing) Then
- Me.tableUpdateOfficeAssignment.InitVars
- End If
- End If
- Me.tableCourseList = CType(MyBase.Tables("CourseList"),CourseListDataTable)
- If (initTable = true) Then
- If (Not (Me.tableCourseList) Is Nothing) Then
- Me.tableCourseList.InitVars
- End If
- End If
- Me.tableStudentList = CType(MyBase.Tables("StudentList"),StudentListDataTable)
- If (initTable = true) Then
- If (Not (Me.tableStudentList) Is Nothing) Then
- Me.tableStudentList.InitVars
- End If
- End If
- Me.relationFK_Course_Department = Me.Relations("FK_Course_Department")
- Me.relationFK_CourseGrade_Course = Me.Relations("FK_CourseGrade_Course")
- Me.relationFK_CourseGrade_Student = Me.Relations("FK_CourseGrade_Student")
- Me.relationFK_CourseInstructor_Course = Me.Relations("FK_CourseInstructor_Course")
- Me.relationFK_CourseInstructor_Person = Me.Relations("FK_CourseInstructor_Person")
- Me.relationFK_OfficeAssignment_Person = Me.Relations("FK_OfficeAssignment_Person")
- Me.relationFK_OnlineCourse_Course = Me.Relations("FK_OnlineCourse_Course")
- Me.relationFK_OnsiteCourse_Course = Me.Relations("FK_OnsiteCourse_Course")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.DataSetName = "SchoolDataSet"
- Me.Prefix = ""
- Me.Namespace = "http://tempuri.org/SchoolDataSet.xsd"
- Me.EnforceConstraints = true
- Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
- Me.tableCourse = New CourseDataTable
- MyBase.Tables.Add(Me.tableCourse)
- Me.tableCourseGrade = New CourseGradeDataTable
- MyBase.Tables.Add(Me.tableCourseGrade)
- Me.tableCourseInstructor = New CourseInstructorDataTable
- MyBase.Tables.Add(Me.tableCourseInstructor)
- Me.tableDepartment = New DepartmentDataTable
- MyBase.Tables.Add(Me.tableDepartment)
- Me.tableOfficeAssignment = New OfficeAssignmentDataTable
- MyBase.Tables.Add(Me.tableOfficeAssignment)
- Me.tableOnlineCourse = New OnlineCourseDataTable
- MyBase.Tables.Add(Me.tableOnlineCourse)
- Me.tableOnsiteCourse = New OnsiteCourseDataTable
- MyBase.Tables.Add(Me.tableOnsiteCourse)
- Me.tablePerson = New PersonDataTable
- MyBase.Tables.Add(Me.tablePerson)
- Me.tableGetStudentGrades = New GetStudentGradesDataTable
- MyBase.Tables.Add(Me.tableGetStudentGrades)
- Me.tableInsertOfficeAssignment = New InsertOfficeAssignmentDataTable
- MyBase.Tables.Add(Me.tableInsertOfficeAssignment)
- Me.tableInsertPerson = New InsertPersonDataTable
- MyBase.Tables.Add(Me.tableInsertPerson)
- Me.tableUpdateOfficeAssignment = New UpdateOfficeAssignmentDataTable
- MyBase.Tables.Add(Me.tableUpdateOfficeAssignment)
- Me.tableCourseList = New CourseListDataTable
- MyBase.Tables.Add(Me.tableCourseList)
- Me.tableStudentList = New StudentListDataTable
- MyBase.Tables.Add(Me.tableStudentList)
- Me.relationFK_Course_Department = New Global.System.Data.DataRelation("FK_Course_Department", New Global.System.Data.DataColumn() {Me.tableDepartment.DepartmentIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourse.DepartmentIDColumn}, false)
- Me.Relations.Add(Me.relationFK_Course_Department)
- Me.relationFK_CourseGrade_Course = New Global.System.Data.DataRelation("FK_CourseGrade_Course", New Global.System.Data.DataColumn() {Me.tableCourse.CourseIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourseGrade.CourseIDColumn}, false)
- Me.Relations.Add(Me.relationFK_CourseGrade_Course)
- Me.relationFK_CourseGrade_Student = New Global.System.Data.DataRelation("FK_CourseGrade_Student", New Global.System.Data.DataColumn() {Me.tablePerson.PersonIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourseGrade.StudentIDColumn}, false)
- Me.Relations.Add(Me.relationFK_CourseGrade_Student)
- Me.relationFK_CourseInstructor_Course = New Global.System.Data.DataRelation("FK_CourseInstructor_Course", New Global.System.Data.DataColumn() {Me.tableCourse.CourseIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourseInstructor.CourseIDColumn}, false)
- Me.Relations.Add(Me.relationFK_CourseInstructor_Course)
- Me.relationFK_CourseInstructor_Person = New Global.System.Data.DataRelation("FK_CourseInstructor_Person", New Global.System.Data.DataColumn() {Me.tablePerson.PersonIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourseInstructor.PersonIDColumn}, false)
- Me.Relations.Add(Me.relationFK_CourseInstructor_Person)
- Me.relationFK_OfficeAssignment_Person = New Global.System.Data.DataRelation("FK_OfficeAssignment_Person", New Global.System.Data.DataColumn() {Me.tablePerson.PersonIDColumn}, New Global.System.Data.DataColumn() {Me.tableOfficeAssignment.InstructorIDColumn}, false)
- Me.Relations.Add(Me.relationFK_OfficeAssignment_Person)
- Me.relationFK_OnlineCourse_Course = New Global.System.Data.DataRelation("FK_OnlineCourse_Course", New Global.System.Data.DataColumn() {Me.tableCourse.CourseIDColumn}, New Global.System.Data.DataColumn() {Me.tableOnlineCourse.CourseIDColumn}, false)
- Me.Relations.Add(Me.relationFK_OnlineCourse_Course)
- Me.relationFK_OnsiteCourse_Course = New Global.System.Data.DataRelation("FK_OnsiteCourse_Course", New Global.System.Data.DataColumn() {Me.tableCourse.CourseIDColumn}, New Global.System.Data.DataColumn() {Me.tableOnsiteCourse.CourseIDColumn}, false)
- Me.Relations.Add(Me.relationFK_OnsiteCourse_Course)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeCourse() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeCourseGrade() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeCourseInstructor() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeDepartment() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeOfficeAssignment() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeOnlineCourse() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeOnsiteCourse() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializePerson() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeGetStudentGrades() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeInsertOfficeAssignment() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeInsertPerson() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeUpdateOfficeAssignment() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeCourseList() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function ShouldSerializeStudentList() As Boolean
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
- If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
- Me.InitVars
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any.Namespace = ds.Namespace
- sequence.Items.Add(any)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
-
- Public Delegate Sub CourseRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseRowChangeEvent)
-
- Public Delegate Sub CourseGradeRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseGradeRowChangeEvent)
-
- Public Delegate Sub CourseInstructorRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseInstructorRowChangeEvent)
-
- Public Delegate Sub DepartmentRowChangeEventHandler(ByVal sender As Object, ByVal e As DepartmentRowChangeEvent)
-
- Public Delegate Sub OfficeAssignmentRowChangeEventHandler(ByVal sender As Object, ByVal e As OfficeAssignmentRowChangeEvent)
-
- Public Delegate Sub OnlineCourseRowChangeEventHandler(ByVal sender As Object, ByVal e As OnlineCourseRowChangeEvent)
-
- Public Delegate Sub OnsiteCourseRowChangeEventHandler(ByVal sender As Object, ByVal e As OnsiteCourseRowChangeEvent)
-
- Public Delegate Sub PersonRowChangeEventHandler(ByVal sender As Object, ByVal e As PersonRowChangeEvent)
-
- Public Delegate Sub GetStudentGradesRowChangeEventHandler(ByVal sender As Object, ByVal e As GetStudentGradesRowChangeEvent)
-
- Public Delegate Sub InsertOfficeAssignmentRowChangeEventHandler(ByVal sender As Object, ByVal e As InsertOfficeAssignmentRowChangeEvent)
-
- Public Delegate Sub InsertPersonRowChangeEventHandler(ByVal sender As Object, ByVal e As InsertPersonRowChangeEvent)
-
- Public Delegate Sub UpdateOfficeAssignmentRowChangeEventHandler(ByVal sender As Object, ByVal e As UpdateOfficeAssignmentRowChangeEvent)
-
- Public Delegate Sub CourseListRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseListRowChangeEvent)
-
- Public Delegate Sub StudentListRowChangeEventHandler(ByVal sender As Object, ByVal e As StudentListRowChangeEvent)
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class CourseDataTable
- Inherits Global.System.Data.TypedTableBase(Of CourseRow)
-
- Private columnCourseID As Global.System.Data.DataColumn
-
- Private columnTitle As Global.System.Data.DataColumn
-
- Private columnCredits As Global.System.Data.DataColumn
-
- Private columnDepartmentID As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "Course"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnCourseID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property TitleColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnTitle
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property CreditsColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnCredits
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property DepartmentIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnDepartmentID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As CourseRow
- Get
- Return CType(Me.Rows(index),CourseRow)
- End Get
- End Property
-
- Public Event CourseRowChanging As CourseRowChangeEventHandler
-
- Public Event CourseRowChanged As CourseRowChangeEventHandler
-
- Public Event CourseRowDeleting As CourseRowChangeEventHandler
-
- Public Event CourseRowDeleted As CourseRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddCourseRow(ByVal row As CourseRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddCourseRow(ByVal CourseID As Integer, ByVal Title As String, ByVal Credits As Integer, ByVal parentDepartmentRowByFK_Course_Department As DepartmentRow) As CourseRow
- Dim rowCourseRow As CourseRow = CType(Me.NewRow,CourseRow)
- Dim columnValuesArray() As Object = New Object() {CourseID, Title, Credits, Nothing}
- If (Not (parentDepartmentRowByFK_Course_Department) Is Nothing) Then
- columnValuesArray(3) = parentDepartmentRowByFK_Course_Department(0)
- End If
- rowCourseRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowCourseRow)
- Return rowCourseRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function FindByCourseID(ByVal CourseID As Integer) As CourseRow
- Return CType(Me.Rows.Find(New Object() {CourseID}),CourseRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As CourseDataTable = CType(MyBase.Clone,CourseDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New CourseDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnCourseID = MyBase.Columns("CourseID")
- Me.columnTitle = MyBase.Columns("Title")
- Me.columnCredits = MyBase.Columns("Credits")
- Me.columnDepartmentID = MyBase.Columns("DepartmentID")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnCourseID)
- Me.columnTitle = New Global.System.Data.DataColumn("Title", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnTitle)
- Me.columnCredits = New Global.System.Data.DataColumn("Credits", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnCredits)
- Me.columnDepartmentID = New Global.System.Data.DataColumn("DepartmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnDepartmentID)
- Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID}, true))
- Me.columnCourseID.AllowDBNull = false
- Me.columnCourseID.Unique = true
- Me.columnTitle.AllowDBNull = false
- Me.columnTitle.MaxLength = 100
- Me.columnCredits.AllowDBNull = false
- Me.columnDepartmentID.AllowDBNull = false
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewCourseRow() As CourseRow
- Return CType(Me.NewRow,CourseRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New CourseRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(CourseRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.CourseRowChangedEvent) Is Nothing) Then
- RaiseEvent CourseRowChanged(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.CourseRowChangingEvent) Is Nothing) Then
- RaiseEvent CourseRowChanging(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.CourseRowDeletedEvent) Is Nothing) Then
- RaiseEvent CourseRowDeleted(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.CourseRowDeletingEvent) Is Nothing) Then
- RaiseEvent CourseRowDeleting(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveCourseRow(ByVal row As CourseRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "CourseDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class CourseGradeDataTable
- Inherits Global.System.Data.TypedTableBase(Of CourseGradeRow)
-
- Private columnEnrollmentID As Global.System.Data.DataColumn
-
- Private columnCourseID As Global.System.Data.DataColumn
-
- Private columnStudentID As Global.System.Data.DataColumn
-
- Private columnGrade As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "CourseGrade"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property EnrollmentIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnEnrollmentID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnCourseID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property StudentIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnStudentID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property GradeColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnGrade
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As CourseGradeRow
- Get
- Return CType(Me.Rows(index),CourseGradeRow)
- End Get
- End Property
-
- Public Event CourseGradeRowChanging As CourseGradeRowChangeEventHandler
-
- Public Event CourseGradeRowChanged As CourseGradeRowChangeEventHandler
-
- Public Event CourseGradeRowDeleting As CourseGradeRowChangeEventHandler
-
- Public Event CourseGradeRowDeleted As CourseGradeRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddCourseGradeRow(ByVal row As CourseGradeRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddCourseGradeRow(ByVal parentCourseRowByFK_CourseGrade_Course As CourseRow, ByVal parentPersonRowByFK_CourseGrade_Student As PersonRow, ByVal Grade As Decimal) As CourseGradeRow
- Dim rowCourseGradeRow As CourseGradeRow = CType(Me.NewRow,CourseGradeRow)
- Dim columnValuesArray() As Object = New Object() {Nothing, Nothing, Nothing, Grade}
- If (Not (parentCourseRowByFK_CourseGrade_Course) Is Nothing) Then
- columnValuesArray(1) = parentCourseRowByFK_CourseGrade_Course(0)
- End If
- If (Not (parentPersonRowByFK_CourseGrade_Student) Is Nothing) Then
- columnValuesArray(2) = parentPersonRowByFK_CourseGrade_Student(0)
- End If
- rowCourseGradeRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowCourseGradeRow)
- Return rowCourseGradeRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function FindByEnrollmentID(ByVal EnrollmentID As Integer) As CourseGradeRow
- Return CType(Me.Rows.Find(New Object() {EnrollmentID}),CourseGradeRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As CourseGradeDataTable = CType(MyBase.Clone,CourseGradeDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New CourseGradeDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnEnrollmentID = MyBase.Columns("EnrollmentID")
- Me.columnCourseID = MyBase.Columns("CourseID")
- Me.columnStudentID = MyBase.Columns("StudentID")
- Me.columnGrade = MyBase.Columns("Grade")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnEnrollmentID = New Global.System.Data.DataColumn("EnrollmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnEnrollmentID)
- Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnCourseID)
- Me.columnStudentID = New Global.System.Data.DataColumn("StudentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnStudentID)
- Me.columnGrade = New Global.System.Data.DataColumn("Grade", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnGrade)
- Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnEnrollmentID}, true))
- Me.columnEnrollmentID.AutoIncrement = true
- Me.columnEnrollmentID.AutoIncrementSeed = -1
- Me.columnEnrollmentID.AutoIncrementStep = -1
- Me.columnEnrollmentID.AllowDBNull = false
- Me.columnEnrollmentID.ReadOnly = true
- Me.columnEnrollmentID.Unique = true
- Me.columnCourseID.AllowDBNull = false
- Me.columnStudentID.AllowDBNull = false
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewCourseGradeRow() As CourseGradeRow
- Return CType(Me.NewRow,CourseGradeRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New CourseGradeRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(CourseGradeRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.CourseGradeRowChangedEvent) Is Nothing) Then
- RaiseEvent CourseGradeRowChanged(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.CourseGradeRowChangingEvent) Is Nothing) Then
- RaiseEvent CourseGradeRowChanging(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.CourseGradeRowDeletedEvent) Is Nothing) Then
- RaiseEvent CourseGradeRowDeleted(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.CourseGradeRowDeletingEvent) Is Nothing) Then
- RaiseEvent CourseGradeRowDeleting(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveCourseGradeRow(ByVal row As CourseGradeRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "CourseGradeDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class CourseInstructorDataTable
- Inherits Global.System.Data.TypedTableBase(Of CourseInstructorRow)
-
- Private columnCourseID As Global.System.Data.DataColumn
-
- Private columnPersonID As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "CourseInstructor"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnCourseID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property PersonIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnPersonID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As CourseInstructorRow
- Get
- Return CType(Me.Rows(index),CourseInstructorRow)
- End Get
- End Property
-
- Public Event CourseInstructorRowChanging As CourseInstructorRowChangeEventHandler
-
- Public Event CourseInstructorRowChanged As CourseInstructorRowChangeEventHandler
-
- Public Event CourseInstructorRowDeleting As CourseInstructorRowChangeEventHandler
-
- Public Event CourseInstructorRowDeleted As CourseInstructorRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddCourseInstructorRow(ByVal row As CourseInstructorRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddCourseInstructorRow(ByVal parentCourseRowByFK_CourseInstructor_Course As CourseRow, ByVal parentPersonRowByFK_CourseInstructor_Person As PersonRow) As CourseInstructorRow
- Dim rowCourseInstructorRow As CourseInstructorRow = CType(Me.NewRow,CourseInstructorRow)
- Dim columnValuesArray() As Object = New Object() {Nothing, Nothing}
- If (Not (parentCourseRowByFK_CourseInstructor_Course) Is Nothing) Then
- columnValuesArray(0) = parentCourseRowByFK_CourseInstructor_Course(0)
- End If
- If (Not (parentPersonRowByFK_CourseInstructor_Person) Is Nothing) Then
- columnValuesArray(1) = parentPersonRowByFK_CourseInstructor_Person(0)
- End If
- rowCourseInstructorRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowCourseInstructorRow)
- Return rowCourseInstructorRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function FindByCourseIDPersonID(ByVal CourseID As Integer, ByVal PersonID As Integer) As CourseInstructorRow
- Return CType(Me.Rows.Find(New Object() {CourseID, PersonID}),CourseInstructorRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As CourseInstructorDataTable = CType(MyBase.Clone,CourseInstructorDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New CourseInstructorDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnCourseID = MyBase.Columns("CourseID")
- Me.columnPersonID = MyBase.Columns("PersonID")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnCourseID)
- Me.columnPersonID = New Global.System.Data.DataColumn("PersonID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnPersonID)
- Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID, Me.columnPersonID}, true))
- Me.columnCourseID.AllowDBNull = false
- Me.columnPersonID.AllowDBNull = false
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewCourseInstructorRow() As CourseInstructorRow
- Return CType(Me.NewRow,CourseInstructorRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New CourseInstructorRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(CourseInstructorRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.CourseInstructorRowChangedEvent) Is Nothing) Then
- RaiseEvent CourseInstructorRowChanged(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.CourseInstructorRowChangingEvent) Is Nothing) Then
- RaiseEvent CourseInstructorRowChanging(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.CourseInstructorRowDeletedEvent) Is Nothing) Then
- RaiseEvent CourseInstructorRowDeleted(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.CourseInstructorRowDeletingEvent) Is Nothing) Then
- RaiseEvent CourseInstructorRowDeleting(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveCourseInstructorRow(ByVal row As CourseInstructorRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "CourseInstructorDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class DepartmentDataTable
- Inherits Global.System.Data.TypedTableBase(Of DepartmentRow)
-
- Private columnDepartmentID As Global.System.Data.DataColumn
-
- Private columnName As Global.System.Data.DataColumn
-
- Private columnBudget As Global.System.Data.DataColumn
-
- Private columnStartDate As Global.System.Data.DataColumn
-
- Private columnAdministrator As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "Department"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property DepartmentIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnDepartmentID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property NameColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnName
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property BudgetColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnBudget
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property StartDateColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnStartDate
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property AdministratorColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnAdministrator
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As DepartmentRow
- Get
- Return CType(Me.Rows(index),DepartmentRow)
- End Get
- End Property
-
- Public Event DepartmentRowChanging As DepartmentRowChangeEventHandler
-
- Public Event DepartmentRowChanged As DepartmentRowChangeEventHandler
-
- Public Event DepartmentRowDeleting As DepartmentRowChangeEventHandler
-
- Public Event DepartmentRowDeleted As DepartmentRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddDepartmentRow(ByVal row As DepartmentRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddDepartmentRow(ByVal DepartmentID As Integer, ByVal Name As String, ByVal Budget As Decimal, ByVal StartDate As Date, ByVal Administrator As Integer) As DepartmentRow
- Dim rowDepartmentRow As DepartmentRow = CType(Me.NewRow,DepartmentRow)
- Dim columnValuesArray() As Object = New Object() {DepartmentID, Name, Budget, StartDate, Administrator}
- rowDepartmentRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowDepartmentRow)
- Return rowDepartmentRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function FindByDepartmentID(ByVal DepartmentID As Integer) As DepartmentRow
- Return CType(Me.Rows.Find(New Object() {DepartmentID}),DepartmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As DepartmentDataTable = CType(MyBase.Clone,DepartmentDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New DepartmentDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnDepartmentID = MyBase.Columns("DepartmentID")
- Me.columnName = MyBase.Columns("Name")
- Me.columnBudget = MyBase.Columns("Budget")
- Me.columnStartDate = MyBase.Columns("StartDate")
- Me.columnAdministrator = MyBase.Columns("Administrator")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnDepartmentID = New Global.System.Data.DataColumn("DepartmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnDepartmentID)
- Me.columnName = New Global.System.Data.DataColumn("Name", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnName)
- Me.columnBudget = New Global.System.Data.DataColumn("Budget", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnBudget)
- Me.columnStartDate = New Global.System.Data.DataColumn("StartDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnStartDate)
- Me.columnAdministrator = New Global.System.Data.DataColumn("Administrator", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnAdministrator)
- Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnDepartmentID}, true))
- Me.columnDepartmentID.AllowDBNull = false
- Me.columnDepartmentID.Unique = true
- Me.columnName.AllowDBNull = false
- Me.columnName.MaxLength = 50
- Me.columnBudget.AllowDBNull = false
- Me.columnStartDate.AllowDBNull = false
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewDepartmentRow() As DepartmentRow
- Return CType(Me.NewRow,DepartmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New DepartmentRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(DepartmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.DepartmentRowChangedEvent) Is Nothing) Then
- RaiseEvent DepartmentRowChanged(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.DepartmentRowChangingEvent) Is Nothing) Then
- RaiseEvent DepartmentRowChanging(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.DepartmentRowDeletedEvent) Is Nothing) Then
- RaiseEvent DepartmentRowDeleted(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.DepartmentRowDeletingEvent) Is Nothing) Then
- RaiseEvent DepartmentRowDeleting(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveDepartmentRow(ByVal row As DepartmentRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "DepartmentDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class OfficeAssignmentDataTable
- Inherits Global.System.Data.TypedTableBase(Of OfficeAssignmentRow)
-
- Private columnInstructorID As Global.System.Data.DataColumn
-
- Private columnLocation As Global.System.Data.DataColumn
-
- Private columnTimestamp As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "OfficeAssignment"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property InstructorIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnInstructorID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property LocationColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnLocation
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property TimestampColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnTimestamp
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As OfficeAssignmentRow
- Get
- Return CType(Me.Rows(index),OfficeAssignmentRow)
- End Get
- End Property
-
- Public Event OfficeAssignmentRowChanging As OfficeAssignmentRowChangeEventHandler
-
- Public Event OfficeAssignmentRowChanged As OfficeAssignmentRowChangeEventHandler
-
- Public Event OfficeAssignmentRowDeleting As OfficeAssignmentRowChangeEventHandler
-
- Public Event OfficeAssignmentRowDeleted As OfficeAssignmentRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddOfficeAssignmentRow(ByVal row As OfficeAssignmentRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddOfficeAssignmentRow(ByVal parentPersonRowByFK_OfficeAssignment_Person As PersonRow, ByVal Location As String, ByVal Timestamp() As Byte) As OfficeAssignmentRow
- Dim rowOfficeAssignmentRow As OfficeAssignmentRow = CType(Me.NewRow,OfficeAssignmentRow)
- Dim columnValuesArray() As Object = New Object() {Nothing, Location, Timestamp}
- If (Not (parentPersonRowByFK_OfficeAssignment_Person) Is Nothing) Then
- columnValuesArray(0) = parentPersonRowByFK_OfficeAssignment_Person(0)
- End If
- rowOfficeAssignmentRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowOfficeAssignmentRow)
- Return rowOfficeAssignmentRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function FindByInstructorID(ByVal InstructorID As Integer) As OfficeAssignmentRow
- Return CType(Me.Rows.Find(New Object() {InstructorID}),OfficeAssignmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As OfficeAssignmentDataTable = CType(MyBase.Clone,OfficeAssignmentDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New OfficeAssignmentDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnInstructorID = MyBase.Columns("InstructorID")
- Me.columnLocation = MyBase.Columns("Location")
- Me.columnTimestamp = MyBase.Columns("Timestamp")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnInstructorID = New Global.System.Data.DataColumn("InstructorID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnInstructorID)
- Me.columnLocation = New Global.System.Data.DataColumn("Location", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnLocation)
- Me.columnTimestamp = New Global.System.Data.DataColumn("Timestamp", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnTimestamp)
- Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnInstructorID}, true))
- Me.columnInstructorID.AllowDBNull = false
- Me.columnInstructorID.Unique = true
- Me.columnLocation.AllowDBNull = false
- Me.columnLocation.MaxLength = 50
- Me.columnTimestamp.ReadOnly = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewOfficeAssignmentRow() As OfficeAssignmentRow
- Return CType(Me.NewRow,OfficeAssignmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New OfficeAssignmentRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(OfficeAssignmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.OfficeAssignmentRowChangedEvent) Is Nothing) Then
- RaiseEvent OfficeAssignmentRowChanged(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.OfficeAssignmentRowChangingEvent) Is Nothing) Then
- RaiseEvent OfficeAssignmentRowChanging(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.OfficeAssignmentRowDeletedEvent) Is Nothing) Then
- RaiseEvent OfficeAssignmentRowDeleted(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.OfficeAssignmentRowDeletingEvent) Is Nothing) Then
- RaiseEvent OfficeAssignmentRowDeleting(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveOfficeAssignmentRow(ByVal row As OfficeAssignmentRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "OfficeAssignmentDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class OnlineCourseDataTable
- Inherits Global.System.Data.TypedTableBase(Of OnlineCourseRow)
-
- Private columnCourseID As Global.System.Data.DataColumn
-
- Private columnURL As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "OnlineCourse"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnCourseID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property URLColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnURL
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As OnlineCourseRow
- Get
- Return CType(Me.Rows(index),OnlineCourseRow)
- End Get
- End Property
-
- Public Event OnlineCourseRowChanging As OnlineCourseRowChangeEventHandler
-
- Public Event OnlineCourseRowChanged As OnlineCourseRowChangeEventHandler
-
- Public Event OnlineCourseRowDeleting As OnlineCourseRowChangeEventHandler
-
- Public Event OnlineCourseRowDeleted As OnlineCourseRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddOnlineCourseRow(ByVal row As OnlineCourseRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddOnlineCourseRow(ByVal parentCourseRowByFK_OnlineCourse_Course As CourseRow, ByVal URL As String) As OnlineCourseRow
- Dim rowOnlineCourseRow As OnlineCourseRow = CType(Me.NewRow,OnlineCourseRow)
- Dim columnValuesArray() As Object = New Object() {Nothing, URL}
- If (Not (parentCourseRowByFK_OnlineCourse_Course) Is Nothing) Then
- columnValuesArray(0) = parentCourseRowByFK_OnlineCourse_Course(0)
- End If
- rowOnlineCourseRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowOnlineCourseRow)
- Return rowOnlineCourseRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function FindByCourseID(ByVal CourseID As Integer) As OnlineCourseRow
- Return CType(Me.Rows.Find(New Object() {CourseID}),OnlineCourseRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As OnlineCourseDataTable = CType(MyBase.Clone,OnlineCourseDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New OnlineCourseDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnCourseID = MyBase.Columns("CourseID")
- Me.columnURL = MyBase.Columns("URL")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnCourseID)
- Me.columnURL = New Global.System.Data.DataColumn("URL", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnURL)
- Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID}, true))
- Me.columnCourseID.AllowDBNull = false
- Me.columnCourseID.Unique = true
- Me.columnURL.AllowDBNull = false
- Me.columnURL.MaxLength = 100
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewOnlineCourseRow() As OnlineCourseRow
- Return CType(Me.NewRow,OnlineCourseRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New OnlineCourseRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(OnlineCourseRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.OnlineCourseRowChangedEvent) Is Nothing) Then
- RaiseEvent OnlineCourseRowChanged(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.OnlineCourseRowChangingEvent) Is Nothing) Then
- RaiseEvent OnlineCourseRowChanging(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.OnlineCourseRowDeletedEvent) Is Nothing) Then
- RaiseEvent OnlineCourseRowDeleted(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.OnlineCourseRowDeletingEvent) Is Nothing) Then
- RaiseEvent OnlineCourseRowDeleting(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveOnlineCourseRow(ByVal row As OnlineCourseRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "OnlineCourseDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class OnsiteCourseDataTable
- Inherits Global.System.Data.TypedTableBase(Of OnsiteCourseRow)
-
- Private columnCourseID As Global.System.Data.DataColumn
-
- Private columnLocation As Global.System.Data.DataColumn
-
- Private columnDays As Global.System.Data.DataColumn
-
- Private columnTime As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "OnsiteCourse"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnCourseID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property LocationColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnLocation
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property DaysColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnDays
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property TimeColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnTime
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As OnsiteCourseRow
- Get
- Return CType(Me.Rows(index),OnsiteCourseRow)
- End Get
- End Property
-
- Public Event OnsiteCourseRowChanging As OnsiteCourseRowChangeEventHandler
-
- Public Event OnsiteCourseRowChanged As OnsiteCourseRowChangeEventHandler
-
- Public Event OnsiteCourseRowDeleting As OnsiteCourseRowChangeEventHandler
-
- Public Event OnsiteCourseRowDeleted As OnsiteCourseRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddOnsiteCourseRow(ByVal row As OnsiteCourseRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddOnsiteCourseRow(ByVal parentCourseRowByFK_OnsiteCourse_Course As CourseRow, ByVal Location As String, ByVal Days As String, ByVal Time As Date) As OnsiteCourseRow
- Dim rowOnsiteCourseRow As OnsiteCourseRow = CType(Me.NewRow,OnsiteCourseRow)
- Dim columnValuesArray() As Object = New Object() {Nothing, Location, Days, Time}
- If (Not (parentCourseRowByFK_OnsiteCourse_Course) Is Nothing) Then
- columnValuesArray(0) = parentCourseRowByFK_OnsiteCourse_Course(0)
- End If
- rowOnsiteCourseRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowOnsiteCourseRow)
- Return rowOnsiteCourseRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function FindByCourseID(ByVal CourseID As Integer) As OnsiteCourseRow
- Return CType(Me.Rows.Find(New Object() {CourseID}),OnsiteCourseRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As OnsiteCourseDataTable = CType(MyBase.Clone,OnsiteCourseDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New OnsiteCourseDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnCourseID = MyBase.Columns("CourseID")
- Me.columnLocation = MyBase.Columns("Location")
- Me.columnDays = MyBase.Columns("Days")
- Me.columnTime = MyBase.Columns("Time")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnCourseID)
- Me.columnLocation = New Global.System.Data.DataColumn("Location", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnLocation)
- Me.columnDays = New Global.System.Data.DataColumn("Days", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnDays)
- Me.columnTime = New Global.System.Data.DataColumn("Time", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnTime)
- Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID}, true))
- Me.columnCourseID.AllowDBNull = false
- Me.columnCourseID.Unique = true
- Me.columnLocation.AllowDBNull = false
- Me.columnLocation.MaxLength = 50
- Me.columnDays.AllowDBNull = false
- Me.columnDays.MaxLength = 50
- Me.columnTime.AllowDBNull = false
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewOnsiteCourseRow() As OnsiteCourseRow
- Return CType(Me.NewRow,OnsiteCourseRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New OnsiteCourseRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(OnsiteCourseRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.OnsiteCourseRowChangedEvent) Is Nothing) Then
- RaiseEvent OnsiteCourseRowChanged(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.OnsiteCourseRowChangingEvent) Is Nothing) Then
- RaiseEvent OnsiteCourseRowChanging(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.OnsiteCourseRowDeletedEvent) Is Nothing) Then
- RaiseEvent OnsiteCourseRowDeleted(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.OnsiteCourseRowDeletingEvent) Is Nothing) Then
- RaiseEvent OnsiteCourseRowDeleting(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveOnsiteCourseRow(ByVal row As OnsiteCourseRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "OnsiteCourseDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class PersonDataTable
- Inherits Global.System.Data.TypedTableBase(Of PersonRow)
-
- Private columnPersonID As Global.System.Data.DataColumn
-
- Private columnLastName As Global.System.Data.DataColumn
-
- Private columnFirstName As Global.System.Data.DataColumn
-
- Private columnPersonCategory As Global.System.Data.DataColumn
-
- Private columnHireDate As Global.System.Data.DataColumn
-
- Private columnEnrollmentDate As Global.System.Data.DataColumn
-
- Private columnPicture As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "Person"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property PersonIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnPersonID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property LastNameColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnLastName
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property FirstNameColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnFirstName
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property PersonCategoryColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnPersonCategory
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property HireDateColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnHireDate
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property EnrollmentDateColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnEnrollmentDate
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property PictureColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnPicture
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As PersonRow
- Get
- Return CType(Me.Rows(index),PersonRow)
- End Get
- End Property
-
- Public Event PersonRowChanging As PersonRowChangeEventHandler
-
- Public Event PersonRowChanged As PersonRowChangeEventHandler
-
- Public Event PersonRowDeleting As PersonRowChangeEventHandler
-
- Public Event PersonRowDeleted As PersonRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddPersonRow(ByVal row As PersonRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddPersonRow(ByVal LastName As String, ByVal FirstName As String, ByVal PersonCategory As Short, ByVal HireDate As Date, ByVal EnrollmentDate As Date, ByVal Picture() As Byte) As PersonRow
- Dim rowPersonRow As PersonRow = CType(Me.NewRow,PersonRow)
- Dim columnValuesArray() As Object = New Object() {Nothing, LastName, FirstName, PersonCategory, HireDate, EnrollmentDate, Picture}
- rowPersonRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowPersonRow)
- Return rowPersonRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function FindByPersonID(ByVal PersonID As Integer) As PersonRow
- Return CType(Me.Rows.Find(New Object() {PersonID}),PersonRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As PersonDataTable = CType(MyBase.Clone,PersonDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New PersonDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnPersonID = MyBase.Columns("PersonID")
- Me.columnLastName = MyBase.Columns("LastName")
- Me.columnFirstName = MyBase.Columns("FirstName")
- Me.columnPersonCategory = MyBase.Columns("PersonCategory")
- Me.columnHireDate = MyBase.Columns("HireDate")
- Me.columnEnrollmentDate = MyBase.Columns("EnrollmentDate")
- Me.columnPicture = MyBase.Columns("Picture")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnPersonID = New Global.System.Data.DataColumn("PersonID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnPersonID)
- Me.columnLastName = New Global.System.Data.DataColumn("LastName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnLastName)
- Me.columnFirstName = New Global.System.Data.DataColumn("FirstName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnFirstName)
- Me.columnPersonCategory = New Global.System.Data.DataColumn("PersonCategory", GetType(Short), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnPersonCategory)
- Me.columnHireDate = New Global.System.Data.DataColumn("HireDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnHireDate)
- Me.columnEnrollmentDate = New Global.System.Data.DataColumn("EnrollmentDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnEnrollmentDate)
- Me.columnPicture = New Global.System.Data.DataColumn("Picture", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnPicture)
- Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnPersonID}, true))
- Me.columnPersonID.AutoIncrement = true
- Me.columnPersonID.AutoIncrementSeed = -1
- Me.columnPersonID.AutoIncrementStep = -1
- Me.columnPersonID.AllowDBNull = false
- Me.columnPersonID.ReadOnly = true
- Me.columnPersonID.Unique = true
- Me.columnLastName.AllowDBNull = false
- Me.columnLastName.MaxLength = 50
- Me.columnFirstName.AllowDBNull = false
- Me.columnFirstName.MaxLength = 50
- Me.columnPersonCategory.AllowDBNull = false
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewPersonRow() As PersonRow
- Return CType(Me.NewRow,PersonRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New PersonRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(PersonRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.PersonRowChangedEvent) Is Nothing) Then
- RaiseEvent PersonRowChanged(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.PersonRowChangingEvent) Is Nothing) Then
- RaiseEvent PersonRowChanging(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.PersonRowDeletedEvent) Is Nothing) Then
- RaiseEvent PersonRowDeleted(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.PersonRowDeletingEvent) Is Nothing) Then
- RaiseEvent PersonRowDeleting(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemovePersonRow(ByVal row As PersonRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "PersonDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class GetStudentGradesDataTable
- Inherits Global.System.Data.TypedTableBase(Of GetStudentGradesRow)
-
- Private columnEnrollmentID As Global.System.Data.DataColumn
-
- Private columnGrade As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "GetStudentGrades"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property EnrollmentIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnEnrollmentID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property GradeColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnGrade
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As GetStudentGradesRow
- Get
- Return CType(Me.Rows(index),GetStudentGradesRow)
- End Get
- End Property
-
- Public Event GetStudentGradesRowChanging As GetStudentGradesRowChangeEventHandler
-
- Public Event GetStudentGradesRowChanged As GetStudentGradesRowChangeEventHandler
-
- Public Event GetStudentGradesRowDeleting As GetStudentGradesRowChangeEventHandler
-
- Public Event GetStudentGradesRowDeleted As GetStudentGradesRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddGetStudentGradesRow(ByVal row As GetStudentGradesRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddGetStudentGradesRow(ByVal Grade As Decimal) As GetStudentGradesRow
- Dim rowGetStudentGradesRow As GetStudentGradesRow = CType(Me.NewRow,GetStudentGradesRow)
- Dim columnValuesArray() As Object = New Object() {Nothing, Grade}
- rowGetStudentGradesRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowGetStudentGradesRow)
- Return rowGetStudentGradesRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function FindByEnrollmentID(ByVal EnrollmentID As Integer) As GetStudentGradesRow
- Return CType(Me.Rows.Find(New Object() {EnrollmentID}),GetStudentGradesRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As GetStudentGradesDataTable = CType(MyBase.Clone,GetStudentGradesDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New GetStudentGradesDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnEnrollmentID = MyBase.Columns("EnrollmentID")
- Me.columnGrade = MyBase.Columns("Grade")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnEnrollmentID = New Global.System.Data.DataColumn("EnrollmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnEnrollmentID)
- Me.columnGrade = New Global.System.Data.DataColumn("Grade", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnGrade)
- Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnEnrollmentID}, true))
- Me.columnEnrollmentID.AutoIncrement = true
- Me.columnEnrollmentID.AllowDBNull = false
- Me.columnEnrollmentID.ReadOnly = true
- Me.columnEnrollmentID.Unique = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewGetStudentGradesRow() As GetStudentGradesRow
- Return CType(Me.NewRow,GetStudentGradesRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New GetStudentGradesRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(GetStudentGradesRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.GetStudentGradesRowChangedEvent) Is Nothing) Then
- RaiseEvent GetStudentGradesRowChanged(Me, New GetStudentGradesRowChangeEvent(CType(e.Row,GetStudentGradesRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.GetStudentGradesRowChangingEvent) Is Nothing) Then
- RaiseEvent GetStudentGradesRowChanging(Me, New GetStudentGradesRowChangeEvent(CType(e.Row,GetStudentGradesRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.GetStudentGradesRowDeletedEvent) Is Nothing) Then
- RaiseEvent GetStudentGradesRowDeleted(Me, New GetStudentGradesRowChangeEvent(CType(e.Row,GetStudentGradesRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.GetStudentGradesRowDeletingEvent) Is Nothing) Then
- RaiseEvent GetStudentGradesRowDeleting(Me, New GetStudentGradesRowChangeEvent(CType(e.Row,GetStudentGradesRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveGetStudentGradesRow(ByVal row As GetStudentGradesRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "GetStudentGradesDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class InsertOfficeAssignmentDataTable
- Inherits Global.System.Data.TypedTableBase(Of InsertOfficeAssignmentRow)
-
- Private columnTimestamp As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "InsertOfficeAssignment"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property TimestampColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnTimestamp
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As InsertOfficeAssignmentRow
- Get
- Return CType(Me.Rows(index),InsertOfficeAssignmentRow)
- End Get
- End Property
-
- Public Event InsertOfficeAssignmentRowChanging As InsertOfficeAssignmentRowChangeEventHandler
-
- Public Event InsertOfficeAssignmentRowChanged As InsertOfficeAssignmentRowChangeEventHandler
-
- Public Event InsertOfficeAssignmentRowDeleting As InsertOfficeAssignmentRowChangeEventHandler
-
- Public Event InsertOfficeAssignmentRowDeleted As InsertOfficeAssignmentRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddInsertOfficeAssignmentRow(ByVal row As InsertOfficeAssignmentRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddInsertOfficeAssignmentRow(ByVal Timestamp() As Byte) As InsertOfficeAssignmentRow
- Dim rowInsertOfficeAssignmentRow As InsertOfficeAssignmentRow = CType(Me.NewRow,InsertOfficeAssignmentRow)
- Dim columnValuesArray() As Object = New Object() {Timestamp}
- rowInsertOfficeAssignmentRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowInsertOfficeAssignmentRow)
- Return rowInsertOfficeAssignmentRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As InsertOfficeAssignmentDataTable = CType(MyBase.Clone,InsertOfficeAssignmentDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New InsertOfficeAssignmentDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnTimestamp = MyBase.Columns("Timestamp")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnTimestamp = New Global.System.Data.DataColumn("Timestamp", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnTimestamp)
- Me.columnTimestamp.ReadOnly = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewInsertOfficeAssignmentRow() As InsertOfficeAssignmentRow
- Return CType(Me.NewRow,InsertOfficeAssignmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New InsertOfficeAssignmentRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(InsertOfficeAssignmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.InsertOfficeAssignmentRowChangedEvent) Is Nothing) Then
- RaiseEvent InsertOfficeAssignmentRowChanged(Me, New InsertOfficeAssignmentRowChangeEvent(CType(e.Row,InsertOfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.InsertOfficeAssignmentRowChangingEvent) Is Nothing) Then
- RaiseEvent InsertOfficeAssignmentRowChanging(Me, New InsertOfficeAssignmentRowChangeEvent(CType(e.Row,InsertOfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.InsertOfficeAssignmentRowDeletedEvent) Is Nothing) Then
- RaiseEvent InsertOfficeAssignmentRowDeleted(Me, New InsertOfficeAssignmentRowChangeEvent(CType(e.Row,InsertOfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.InsertOfficeAssignmentRowDeletingEvent) Is Nothing) Then
- RaiseEvent InsertOfficeAssignmentRowDeleting(Me, New InsertOfficeAssignmentRowChangeEvent(CType(e.Row,InsertOfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveInsertOfficeAssignmentRow(ByVal row As InsertOfficeAssignmentRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "InsertOfficeAssignmentDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class InsertPersonDataTable
- Inherits Global.System.Data.TypedTableBase(Of InsertPersonRow)
-
- Private columnNewPersonID As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "InsertPerson"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property NewPersonIDColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnNewPersonID
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As InsertPersonRow
- Get
- Return CType(Me.Rows(index),InsertPersonRow)
- End Get
- End Property
-
- Public Event InsertPersonRowChanging As InsertPersonRowChangeEventHandler
-
- Public Event InsertPersonRowChanged As InsertPersonRowChangeEventHandler
-
- Public Event InsertPersonRowDeleting As InsertPersonRowChangeEventHandler
-
- Public Event InsertPersonRowDeleted As InsertPersonRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddInsertPersonRow(ByVal row As InsertPersonRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddInsertPersonRow(ByVal NewPersonID As Decimal) As InsertPersonRow
- Dim rowInsertPersonRow As InsertPersonRow = CType(Me.NewRow,InsertPersonRow)
- Dim columnValuesArray() As Object = New Object() {NewPersonID}
- rowInsertPersonRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowInsertPersonRow)
- Return rowInsertPersonRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As InsertPersonDataTable = CType(MyBase.Clone,InsertPersonDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New InsertPersonDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnNewPersonID = MyBase.Columns("NewPersonID")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnNewPersonID = New Global.System.Data.DataColumn("NewPersonID", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnNewPersonID)
- Me.columnNewPersonID.ReadOnly = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewInsertPersonRow() As InsertPersonRow
- Return CType(Me.NewRow,InsertPersonRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New InsertPersonRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(InsertPersonRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.InsertPersonRowChangedEvent) Is Nothing) Then
- RaiseEvent InsertPersonRowChanged(Me, New InsertPersonRowChangeEvent(CType(e.Row,InsertPersonRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.InsertPersonRowChangingEvent) Is Nothing) Then
- RaiseEvent InsertPersonRowChanging(Me, New InsertPersonRowChangeEvent(CType(e.Row,InsertPersonRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.InsertPersonRowDeletedEvent) Is Nothing) Then
- RaiseEvent InsertPersonRowDeleted(Me, New InsertPersonRowChangeEvent(CType(e.Row,InsertPersonRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.InsertPersonRowDeletingEvent) Is Nothing) Then
- RaiseEvent InsertPersonRowDeleting(Me, New InsertPersonRowChangeEvent(CType(e.Row,InsertPersonRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveInsertPersonRow(ByVal row As InsertPersonRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "InsertPersonDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class UpdateOfficeAssignmentDataTable
- Inherits Global.System.Data.TypedTableBase(Of UpdateOfficeAssignmentRow)
-
- Private columnTimestamp As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "UpdateOfficeAssignment"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property TimestampColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnTimestamp
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As UpdateOfficeAssignmentRow
- Get
- Return CType(Me.Rows(index),UpdateOfficeAssignmentRow)
- End Get
- End Property
-
- Public Event UpdateOfficeAssignmentRowChanging As UpdateOfficeAssignmentRowChangeEventHandler
-
- Public Event UpdateOfficeAssignmentRowChanged As UpdateOfficeAssignmentRowChangeEventHandler
-
- Public Event UpdateOfficeAssignmentRowDeleting As UpdateOfficeAssignmentRowChangeEventHandler
-
- Public Event UpdateOfficeAssignmentRowDeleted As UpdateOfficeAssignmentRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddUpdateOfficeAssignmentRow(ByVal row As UpdateOfficeAssignmentRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddUpdateOfficeAssignmentRow(ByVal Timestamp() As Byte) As UpdateOfficeAssignmentRow
- Dim rowUpdateOfficeAssignmentRow As UpdateOfficeAssignmentRow = CType(Me.NewRow,UpdateOfficeAssignmentRow)
- Dim columnValuesArray() As Object = New Object() {Timestamp}
- rowUpdateOfficeAssignmentRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowUpdateOfficeAssignmentRow)
- Return rowUpdateOfficeAssignmentRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As UpdateOfficeAssignmentDataTable = CType(MyBase.Clone,UpdateOfficeAssignmentDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New UpdateOfficeAssignmentDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnTimestamp = MyBase.Columns("Timestamp")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnTimestamp = New Global.System.Data.DataColumn("Timestamp", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnTimestamp)
- Me.columnTimestamp.ReadOnly = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewUpdateOfficeAssignmentRow() As UpdateOfficeAssignmentRow
- Return CType(Me.NewRow,UpdateOfficeAssignmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New UpdateOfficeAssignmentRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(UpdateOfficeAssignmentRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.UpdateOfficeAssignmentRowChangedEvent) Is Nothing) Then
- RaiseEvent UpdateOfficeAssignmentRowChanged(Me, New UpdateOfficeAssignmentRowChangeEvent(CType(e.Row,UpdateOfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.UpdateOfficeAssignmentRowChangingEvent) Is Nothing) Then
- RaiseEvent UpdateOfficeAssignmentRowChanging(Me, New UpdateOfficeAssignmentRowChangeEvent(CType(e.Row,UpdateOfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.UpdateOfficeAssignmentRowDeletedEvent) Is Nothing) Then
- RaiseEvent UpdateOfficeAssignmentRowDeleted(Me, New UpdateOfficeAssignmentRowChangeEvent(CType(e.Row,UpdateOfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.UpdateOfficeAssignmentRowDeletingEvent) Is Nothing) Then
- RaiseEvent UpdateOfficeAssignmentRowDeleting(Me, New UpdateOfficeAssignmentRowChangeEvent(CType(e.Row,UpdateOfficeAssignmentRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveUpdateOfficeAssignmentRow(ByVal row As UpdateOfficeAssignmentRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "UpdateOfficeAssignmentDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class CourseListDataTable
- Inherits Global.System.Data.TypedTableBase(Of CourseListRow)
-
- Private columnTitle As Global.System.Data.DataColumn
-
- Private columnCredits As Global.System.Data.DataColumn
-
- Private columnDepartmentName As Global.System.Data.DataColumn
-
- Private columnInstructor As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "CourseList"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property TitleColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnTitle
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property CreditsColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnCredits
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property DepartmentNameColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnDepartmentName
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property InstructorColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnInstructor
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As CourseListRow
- Get
- Return CType(Me.Rows(index),CourseListRow)
- End Get
- End Property
-
- Public Event CourseListRowChanging As CourseListRowChangeEventHandler
-
- Public Event CourseListRowChanged As CourseListRowChangeEventHandler
-
- Public Event CourseListRowDeleting As CourseListRowChangeEventHandler
-
- Public Event CourseListRowDeleted As CourseListRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddCourseListRow(ByVal row As CourseListRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddCourseListRow(ByVal Title As String, ByVal Credits As Integer, ByVal DepartmentName As String, ByVal Instructor As String) As CourseListRow
- Dim rowCourseListRow As CourseListRow = CType(Me.NewRow,CourseListRow)
- Dim columnValuesArray() As Object = New Object() {Title, Credits, DepartmentName, Instructor}
- rowCourseListRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowCourseListRow)
- Return rowCourseListRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As CourseListDataTable = CType(MyBase.Clone,CourseListDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New CourseListDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnTitle = MyBase.Columns("Title")
- Me.columnCredits = MyBase.Columns("Credits")
- Me.columnDepartmentName = MyBase.Columns("DepartmentName")
- Me.columnInstructor = MyBase.Columns("Instructor")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnTitle = New Global.System.Data.DataColumn("Title", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnTitle)
- Me.columnCredits = New Global.System.Data.DataColumn("Credits", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnCredits)
- Me.columnDepartmentName = New Global.System.Data.DataColumn("DepartmentName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnDepartmentName)
- Me.columnInstructor = New Global.System.Data.DataColumn("Instructor", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnInstructor)
- Me.columnTitle.AllowDBNull = false
- Me.columnTitle.MaxLength = 100
- Me.columnCredits.AllowDBNull = false
- Me.columnDepartmentName.MaxLength = 50
- Me.columnInstructor.ReadOnly = true
- Me.columnInstructor.MaxLength = 101
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewCourseListRow() As CourseListRow
- Return CType(Me.NewRow,CourseListRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New CourseListRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(CourseListRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.CourseListRowChangedEvent) Is Nothing) Then
- RaiseEvent CourseListRowChanged(Me, New CourseListRowChangeEvent(CType(e.Row,CourseListRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.CourseListRowChangingEvent) Is Nothing) Then
- RaiseEvent CourseListRowChanging(Me, New CourseListRowChangeEvent(CType(e.Row,CourseListRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.CourseListRowDeletedEvent) Is Nothing) Then
- RaiseEvent CourseListRowDeleted(Me, New CourseListRowChangeEvent(CType(e.Row,CourseListRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.CourseListRowDeletingEvent) Is Nothing) Then
- RaiseEvent CourseListRowDeleting(Me, New CourseListRowChangeEvent(CType(e.Row,CourseListRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveCourseListRow(ByVal row As CourseListRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "CourseListDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents the strongly named DataTable class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.Serializable(), _
- Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
- Partial Public Class StudentListDataTable
- Inherits Global.System.Data.TypedTableBase(Of StudentListRow)
-
- Private columnStudentName As Global.System.Data.DataColumn
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.TableName = "StudentList"
- Me.BeginInit
- Me.InitClass
- Me.EndInit
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal table As Global.System.Data.DataTable)
- MyBase.New
- Me.TableName = table.TableName
- If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
- Me.CaseSensitive = table.CaseSensitive
- End If
- If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
- Me.Locale = table.Locale
- End If
- If (table.Namespace <> table.DataSet.Namespace) Then
- Me.Namespace = table.Namespace
- End If
- Me.Prefix = table.Prefix
- Me.MinimumCapacity = table.MinimumCapacity
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
- MyBase.New(info, context)
- Me.InitVars
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property StudentNameColumn() As Global.System.Data.DataColumn
- Get
- Return Me.columnStudentName
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property Count() As Integer
- Get
- Return Me.Rows.Count
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Default ReadOnly Property Item(ByVal index As Integer) As StudentListRow
- Get
- Return CType(Me.Rows(index),StudentListRow)
- End Get
- End Property
-
- Public Event StudentListRowChanging As StudentListRowChangeEventHandler
-
- Public Event StudentListRowChanged As StudentListRowChangeEventHandler
-
- Public Event StudentListRowDeleting As StudentListRowChangeEventHandler
-
- Public Event StudentListRowDeleted As StudentListRowChangeEventHandler
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Sub AddStudentListRow(ByVal row As StudentListRow)
- Me.Rows.Add(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overloads Function AddStudentListRow(ByVal StudentName As String) As StudentListRow
- Dim rowStudentListRow As StudentListRow = CType(Me.NewRow,StudentListRow)
- Dim columnValuesArray() As Object = New Object() {StudentName}
- rowStudentListRow.ItemArray = columnValuesArray
- Me.Rows.Add(rowStudentListRow)
- Return rowStudentListRow
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overrides Function Clone() As Global.System.Data.DataTable
- Dim cln As StudentListDataTable = CType(MyBase.Clone,StudentListDataTable)
- cln.InitVars
- Return cln
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
- Return New StudentListDataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub InitVars()
- Me.columnStudentName = MyBase.Columns("StudentName")
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitClass()
- Me.columnStudentName = New Global.System.Data.DataColumn("StudentName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
- MyBase.Columns.Add(Me.columnStudentName)
- Me.columnStudentName.ReadOnly = true
- Me.columnStudentName.MaxLength = 101
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function NewStudentListRow() As StudentListRow
- Return CType(Me.NewRow,StudentListRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
- Return New StudentListRow(builder)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Function GetRowType() As Global.System.Type
- Return GetType(StudentListRow)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanged(e)
- If (Not (Me.StudentListRowChangedEvent) Is Nothing) Then
- RaiseEvent StudentListRowChanged(Me, New StudentListRowChangeEvent(CType(e.Row,StudentListRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowChanging(e)
- If (Not (Me.StudentListRowChangingEvent) Is Nothing) Then
- RaiseEvent StudentListRowChanging(Me, New StudentListRowChangeEvent(CType(e.Row,StudentListRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleted(e)
- If (Not (Me.StudentListRowDeletedEvent) Is Nothing) Then
- RaiseEvent StudentListRowDeleted(Me, New StudentListRowChangeEvent(CType(e.Row,StudentListRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
- MyBase.OnRowDeleting(e)
- If (Not (Me.StudentListRowDeletingEvent) Is Nothing) Then
- RaiseEvent StudentListRowDeleting(Me, New StudentListRowChangeEvent(CType(e.Row,StudentListRow), e.Action))
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub RemoveStudentListRow(ByVal row As StudentListRow)
- Me.Rows.Remove(row)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
- Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
- Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
- Dim ds As SchoolDataSet = New SchoolDataSet
- Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any1.Namespace = "http://www.w3.org/2001/XMLSchema"
- any1.MinOccurs = New Decimal(0)
- any1.MaxOccurs = Decimal.MaxValue
- any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any1)
- Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
- any2.MinOccurs = New Decimal(1)
- any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
- sequence.Items.Add(any2)
- Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute1.Name = "namespace"
- attribute1.FixedValue = ds.Namespace
- type.Attributes.Add(attribute1)
- Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
- attribute2.Name = "tableTypeName"
- attribute2.FixedValue = "StudentListDataTable"
- type.Attributes.Add(attribute2)
- type.Particle = sequence
- Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
- If xs.Contains(dsSchema.TargetNamespace) Then
- Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
- Try
- Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
- dsSchema.Write(s1)
- Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
- Do While schemas.MoveNext
- schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
- s2.SetLength(0)
- schema.Write(s2)
- If (s1.Length = s2.Length) Then
- s1.Position = 0
- s2.Position = 0
-
- Do While ((s1.Position <> s1.Length) _
- AndAlso (s1.ReadByte = s2.ReadByte))
-
-
- Loop
- If (s1.Position = s1.Length) Then
- Return type
- End If
- End If
-
- Loop
- Finally
- If (Not (s1) Is Nothing) Then
- s1.Close
- End If
- If (Not (s2) Is Nothing) Then
- s2.Close
- End If
- End Try
- End If
- xs.Add(dsSchema)
- Return type
- End Function
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class CourseRow
- Inherits Global.System.Data.DataRow
-
- Private tableCourse As CourseDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableCourse = CType(Me.Table,CourseDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property CourseID() As Integer
- Get
- Return CType(Me(Me.tableCourse.CourseIDColumn),Integer)
- End Get
- Set
- Me(Me.tableCourse.CourseIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Title() As String
- Get
- Return CType(Me(Me.tableCourse.TitleColumn),String)
- End Get
- Set
- Me(Me.tableCourse.TitleColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Credits() As Integer
- Get
- Return CType(Me(Me.tableCourse.CreditsColumn),Integer)
- End Get
- Set
- Me(Me.tableCourse.CreditsColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property DepartmentID() As Integer
- Get
- Return CType(Me(Me.tableCourse.DepartmentIDColumn),Integer)
- End Get
- Set
- Me(Me.tableCourse.DepartmentIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property DepartmentRow() As DepartmentRow
- Get
- Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_Course_Department")),DepartmentRow)
- End Get
- Set
- Me.SetParentRow(value, Me.Table.ParentRelations("FK_Course_Department"))
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function GetCourseGradeRows() As CourseGradeRow()
- If (Me.Table.ChildRelations("FK_CourseGrade_Course") Is Nothing) Then
- Return New CourseGradeRow(-1) {}
- Else
- Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseGrade_Course")),CourseGradeRow())
- End If
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function GetCourseInstructorRows() As CourseInstructorRow()
- If (Me.Table.ChildRelations("FK_CourseInstructor_Course") Is Nothing) Then
- Return New CourseInstructorRow(-1) {}
- Else
- Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseInstructor_Course")),CourseInstructorRow())
- End If
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function GetOnlineCourseRows() As OnlineCourseRow()
- If (Me.Table.ChildRelations("FK_OnlineCourse_Course") Is Nothing) Then
- Return New OnlineCourseRow(-1) {}
- Else
- Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OnlineCourse_Course")),OnlineCourseRow())
- End If
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function GetOnsiteCourseRows() As OnsiteCourseRow()
- If (Me.Table.ChildRelations("FK_OnsiteCourse_Course") Is Nothing) Then
- Return New OnsiteCourseRow(-1) {}
- Else
- Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OnsiteCourse_Course")),OnsiteCourseRow())
- End If
- End Function
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class CourseGradeRow
- Inherits Global.System.Data.DataRow
-
- Private tableCourseGrade As CourseGradeDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableCourseGrade = CType(Me.Table,CourseGradeDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property EnrollmentID() As Integer
- Get
- Return CType(Me(Me.tableCourseGrade.EnrollmentIDColumn),Integer)
- End Get
- Set
- Me(Me.tableCourseGrade.EnrollmentIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property CourseID() As Integer
- Get
- Return CType(Me(Me.tableCourseGrade.CourseIDColumn),Integer)
- End Get
- Set
- Me(Me.tableCourseGrade.CourseIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property StudentID() As Integer
- Get
- Return CType(Me(Me.tableCourseGrade.StudentIDColumn),Integer)
- End Get
- Set
- Me(Me.tableCourseGrade.StudentIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Grade() As Decimal
- Get
- Try
- Return CType(Me(Me.tableCourseGrade.GradeColumn),Decimal)
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'Grade' in table 'CourseGrade' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableCourseGrade.GradeColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property CourseRow() As CourseRow
- Get
- Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseGrade_Course")),CourseRow)
- End Get
- Set
- Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseGrade_Course"))
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property PersonRow() As PersonRow
- Get
- Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseGrade_Student")),PersonRow)
- End Get
- Set
- Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseGrade_Student"))
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsGradeNull() As Boolean
- Return Me.IsNull(Me.tableCourseGrade.GradeColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetGradeNull()
- Me(Me.tableCourseGrade.GradeColumn) = Global.System.Convert.DBNull
- End Sub
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class CourseInstructorRow
- Inherits Global.System.Data.DataRow
-
- Private tableCourseInstructor As CourseInstructorDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableCourseInstructor = CType(Me.Table,CourseInstructorDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property CourseID() As Integer
- Get
- Return CType(Me(Me.tableCourseInstructor.CourseIDColumn),Integer)
- End Get
- Set
- Me(Me.tableCourseInstructor.CourseIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property PersonID() As Integer
- Get
- Return CType(Me(Me.tableCourseInstructor.PersonIDColumn),Integer)
- End Get
- Set
- Me(Me.tableCourseInstructor.PersonIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property CourseRow() As CourseRow
- Get
- Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseInstructor_Course")),CourseRow)
- End Get
- Set
- Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseInstructor_Course"))
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property PersonRow() As PersonRow
- Get
- Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseInstructor_Person")),PersonRow)
- End Get
- Set
- Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseInstructor_Person"))
- End Set
- End Property
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class DepartmentRow
- Inherits Global.System.Data.DataRow
-
- Private tableDepartment As DepartmentDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableDepartment = CType(Me.Table,DepartmentDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property DepartmentID() As Integer
- Get
- Return CType(Me(Me.tableDepartment.DepartmentIDColumn),Integer)
- End Get
- Set
- Me(Me.tableDepartment.DepartmentIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Name() As String
- Get
- Return CType(Me(Me.tableDepartment.NameColumn),String)
- End Get
- Set
- Me(Me.tableDepartment.NameColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Budget() As Decimal
- Get
- Return CType(Me(Me.tableDepartment.BudgetColumn),Decimal)
- End Get
- Set
- Me(Me.tableDepartment.BudgetColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property StartDate() As Date
- Get
- Return CType(Me(Me.tableDepartment.StartDateColumn),Date)
- End Get
- Set
- Me(Me.tableDepartment.StartDateColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Administrator() As Integer
- Get
- Try
- Return CType(Me(Me.tableDepartment.AdministratorColumn),Integer)
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'Administrator' in table 'Department' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableDepartment.AdministratorColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsAdministratorNull() As Boolean
- Return Me.IsNull(Me.tableDepartment.AdministratorColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetAdministratorNull()
- Me(Me.tableDepartment.AdministratorColumn) = Global.System.Convert.DBNull
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function GetCourseRows() As CourseRow()
- If (Me.Table.ChildRelations("FK_Course_Department") Is Nothing) Then
- Return New CourseRow(-1) {}
- Else
- Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_Course_Department")),CourseRow())
- End If
- End Function
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class OfficeAssignmentRow
- Inherits Global.System.Data.DataRow
-
- Private tableOfficeAssignment As OfficeAssignmentDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableOfficeAssignment = CType(Me.Table,OfficeAssignmentDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property InstructorID() As Integer
- Get
- Return CType(Me(Me.tableOfficeAssignment.InstructorIDColumn),Integer)
- End Get
- Set
- Me(Me.tableOfficeAssignment.InstructorIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Location() As String
- Get
- Return CType(Me(Me.tableOfficeAssignment.LocationColumn),String)
- End Get
- Set
- Me(Me.tableOfficeAssignment.LocationColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Timestamp() As Byte()
- Get
- Try
- Return CType(Me(Me.tableOfficeAssignment.TimestampColumn),Byte())
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'Timestamp' in table 'OfficeAssignment' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableOfficeAssignment.TimestampColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property PersonRow() As PersonRow
- Get
- Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OfficeAssignment_Person")),PersonRow)
- End Get
- Set
- Me.SetParentRow(value, Me.Table.ParentRelations("FK_OfficeAssignment_Person"))
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsTimestampNull() As Boolean
- Return Me.IsNull(Me.tableOfficeAssignment.TimestampColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetTimestampNull()
- Me(Me.tableOfficeAssignment.TimestampColumn) = Global.System.Convert.DBNull
- End Sub
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class OnlineCourseRow
- Inherits Global.System.Data.DataRow
-
- Private tableOnlineCourse As OnlineCourseDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableOnlineCourse = CType(Me.Table,OnlineCourseDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property CourseID() As Integer
- Get
- Return CType(Me(Me.tableOnlineCourse.CourseIDColumn),Integer)
- End Get
- Set
- Me(Me.tableOnlineCourse.CourseIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property URL() As String
- Get
- Return CType(Me(Me.tableOnlineCourse.URLColumn),String)
- End Get
- Set
- Me(Me.tableOnlineCourse.URLColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property CourseRow() As CourseRow
- Get
- Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OnlineCourse_Course")),CourseRow)
- End Get
- Set
- Me.SetParentRow(value, Me.Table.ParentRelations("FK_OnlineCourse_Course"))
- End Set
- End Property
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class OnsiteCourseRow
- Inherits Global.System.Data.DataRow
-
- Private tableOnsiteCourse As OnsiteCourseDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableOnsiteCourse = CType(Me.Table,OnsiteCourseDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property CourseID() As Integer
- Get
- Return CType(Me(Me.tableOnsiteCourse.CourseIDColumn),Integer)
- End Get
- Set
- Me(Me.tableOnsiteCourse.CourseIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Location() As String
- Get
- Return CType(Me(Me.tableOnsiteCourse.LocationColumn),String)
- End Get
- Set
- Me(Me.tableOnsiteCourse.LocationColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Days() As String
- Get
- Return CType(Me(Me.tableOnsiteCourse.DaysColumn),String)
- End Get
- Set
- Me(Me.tableOnsiteCourse.DaysColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Time() As Date
- Get
- Return CType(Me(Me.tableOnsiteCourse.TimeColumn),Date)
- End Get
- Set
- Me(Me.tableOnsiteCourse.TimeColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property CourseRow() As CourseRow
- Get
- Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OnsiteCourse_Course")),CourseRow)
- End Get
- Set
- Me.SetParentRow(value, Me.Table.ParentRelations("FK_OnsiteCourse_Course"))
- End Set
- End Property
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class PersonRow
- Inherits Global.System.Data.DataRow
-
- Private tablePerson As PersonDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tablePerson = CType(Me.Table,PersonDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property PersonID() As Integer
- Get
- Return CType(Me(Me.tablePerson.PersonIDColumn),Integer)
- End Get
- Set
- Me(Me.tablePerson.PersonIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property LastName() As String
- Get
- Return CType(Me(Me.tablePerson.LastNameColumn),String)
- End Get
- Set
- Me(Me.tablePerson.LastNameColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property FirstName() As String
- Get
- Return CType(Me(Me.tablePerson.FirstNameColumn),String)
- End Get
- Set
- Me(Me.tablePerson.FirstNameColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property PersonCategory() As Short
- Get
- Return CType(Me(Me.tablePerson.PersonCategoryColumn),Short)
- End Get
- Set
- Me(Me.tablePerson.PersonCategoryColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property HireDate() As Date
- Get
- Try
- Return CType(Me(Me.tablePerson.HireDateColumn),Date)
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'HireDate' in table 'Person' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tablePerson.HireDateColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property EnrollmentDate() As Date
- Get
- Try
- Return CType(Me(Me.tablePerson.EnrollmentDateColumn),Date)
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'EnrollmentDate' in table 'Person' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tablePerson.EnrollmentDateColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Picture() As Byte()
- Get
- Try
- Return CType(Me(Me.tablePerson.PictureColumn),Byte())
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'Picture' in table 'Person' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tablePerson.PictureColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsHireDateNull() As Boolean
- Return Me.IsNull(Me.tablePerson.HireDateColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetHireDateNull()
- Me(Me.tablePerson.HireDateColumn) = Global.System.Convert.DBNull
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsEnrollmentDateNull() As Boolean
- Return Me.IsNull(Me.tablePerson.EnrollmentDateColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetEnrollmentDateNull()
- Me(Me.tablePerson.EnrollmentDateColumn) = Global.System.Convert.DBNull
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsPictureNull() As Boolean
- Return Me.IsNull(Me.tablePerson.PictureColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetPictureNull()
- Me(Me.tablePerson.PictureColumn) = Global.System.Convert.DBNull
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function GetCourseGradeRows() As CourseGradeRow()
- If (Me.Table.ChildRelations("FK_CourseGrade_Student") Is Nothing) Then
- Return New CourseGradeRow(-1) {}
- Else
- Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseGrade_Student")),CourseGradeRow())
- End If
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function GetCourseInstructorRows() As CourseInstructorRow()
- If (Me.Table.ChildRelations("FK_CourseInstructor_Person") Is Nothing) Then
- Return New CourseInstructorRow(-1) {}
- Else
- Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseInstructor_Person")),CourseInstructorRow())
- End If
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function GetOfficeAssignmentRows() As OfficeAssignmentRow()
- If (Me.Table.ChildRelations("FK_OfficeAssignment_Person") Is Nothing) Then
- Return New OfficeAssignmentRow(-1) {}
- Else
- Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OfficeAssignment_Person")),OfficeAssignmentRow())
- End If
- End Function
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class GetStudentGradesRow
- Inherits Global.System.Data.DataRow
-
- Private tableGetStudentGrades As GetStudentGradesDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableGetStudentGrades = CType(Me.Table,GetStudentGradesDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property EnrollmentID() As Integer
- Get
- Return CType(Me(Me.tableGetStudentGrades.EnrollmentIDColumn),Integer)
- End Get
- Set
- Me(Me.tableGetStudentGrades.EnrollmentIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Grade() As Decimal
- Get
- Try
- Return CType(Me(Me.tableGetStudentGrades.GradeColumn),Decimal)
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'Grade' in table 'GetStudentGrades' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableGetStudentGrades.GradeColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsGradeNull() As Boolean
- Return Me.IsNull(Me.tableGetStudentGrades.GradeColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetGradeNull()
- Me(Me.tableGetStudentGrades.GradeColumn) = Global.System.Convert.DBNull
- End Sub
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class InsertOfficeAssignmentRow
- Inherits Global.System.Data.DataRow
-
- Private tableInsertOfficeAssignment As InsertOfficeAssignmentDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableInsertOfficeAssignment = CType(Me.Table,InsertOfficeAssignmentDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Timestamp() As Byte()
- Get
- Try
- Return CType(Me(Me.tableInsertOfficeAssignment.TimestampColumn),Byte())
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'Timestamp' in table 'InsertOfficeAssignment' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableInsertOfficeAssignment.TimestampColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsTimestampNull() As Boolean
- Return Me.IsNull(Me.tableInsertOfficeAssignment.TimestampColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetTimestampNull()
- Me(Me.tableInsertOfficeAssignment.TimestampColumn) = Global.System.Convert.DBNull
- End Sub
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class InsertPersonRow
- Inherits Global.System.Data.DataRow
-
- Private tableInsertPerson As InsertPersonDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableInsertPerson = CType(Me.Table,InsertPersonDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property NewPersonID() As Decimal
- Get
- Try
- Return CType(Me(Me.tableInsertPerson.NewPersonIDColumn),Decimal)
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'NewPersonID' in table 'InsertPerson' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableInsertPerson.NewPersonIDColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsNewPersonIDNull() As Boolean
- Return Me.IsNull(Me.tableInsertPerson.NewPersonIDColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetNewPersonIDNull()
- Me(Me.tableInsertPerson.NewPersonIDColumn) = Global.System.Convert.DBNull
- End Sub
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class UpdateOfficeAssignmentRow
- Inherits Global.System.Data.DataRow
-
- Private tableUpdateOfficeAssignment As UpdateOfficeAssignmentDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableUpdateOfficeAssignment = CType(Me.Table,UpdateOfficeAssignmentDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Timestamp() As Byte()
- Get
- Try
- Return CType(Me(Me.tableUpdateOfficeAssignment.TimestampColumn),Byte())
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'Timestamp' in table 'UpdateOfficeAssignment' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableUpdateOfficeAssignment.TimestampColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsTimestampNull() As Boolean
- Return Me.IsNull(Me.tableUpdateOfficeAssignment.TimestampColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetTimestampNull()
- Me(Me.tableUpdateOfficeAssignment.TimestampColumn) = Global.System.Convert.DBNull
- End Sub
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class CourseListRow
- Inherits Global.System.Data.DataRow
-
- Private tableCourseList As CourseListDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableCourseList = CType(Me.Table,CourseListDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Title() As String
- Get
- Return CType(Me(Me.tableCourseList.TitleColumn),String)
- End Get
- Set
- Me(Me.tableCourseList.TitleColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Credits() As Integer
- Get
- Return CType(Me(Me.tableCourseList.CreditsColumn),Integer)
- End Get
- Set
- Me(Me.tableCourseList.CreditsColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property DepartmentName() As String
- Get
- Try
- Return CType(Me(Me.tableCourseList.DepartmentNameColumn),String)
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'DepartmentName' in table 'CourseList' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableCourseList.DepartmentNameColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property Instructor() As String
- Get
- Try
- Return CType(Me(Me.tableCourseList.InstructorColumn),String)
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'Instructor' in table 'CourseList' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableCourseList.InstructorColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsDepartmentNameNull() As Boolean
- Return Me.IsNull(Me.tableCourseList.DepartmentNameColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetDepartmentNameNull()
- Me(Me.tableCourseList.DepartmentNameColumn) = Global.System.Convert.DBNull
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsInstructorNull() As Boolean
- Return Me.IsNull(Me.tableCourseList.InstructorColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetInstructorNull()
- Me(Me.tableCourseList.InstructorColumn) = Global.System.Convert.DBNull
- End Sub
- End Class
-
- '''<summary>
- '''Represents strongly named DataRow class.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Partial Public Class StudentListRow
- Inherits Global.System.Data.DataRow
-
- Private tableStudentList As StudentListDataTable
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
- MyBase.New(rb)
- Me.tableStudentList = CType(Me.Table,StudentListDataTable)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property StudentName() As String
- Get
- Try
- Return CType(Me(Me.tableStudentList.StudentNameColumn),String)
- Catch e As Global.System.InvalidCastException
- Throw New Global.System.Data.StrongTypingException("The value for column 'StudentName' in table 'StudentList' is DBNull.", e)
- End Try
- End Get
- Set
- Me(Me.tableStudentList.StudentNameColumn) = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function IsStudentNameNull() As Boolean
- Return Me.IsNull(Me.tableStudentList.StudentNameColumn)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub SetStudentNameNull()
- Me(Me.tableStudentList.StudentNameColumn) = Global.System.Convert.DBNull
- End Sub
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class CourseRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As CourseRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As CourseRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As CourseRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class CourseGradeRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As CourseGradeRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As CourseGradeRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As CourseGradeRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class CourseInstructorRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As CourseInstructorRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As CourseInstructorRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As CourseInstructorRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class DepartmentRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As DepartmentRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As DepartmentRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As DepartmentRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class OfficeAssignmentRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As OfficeAssignmentRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As OfficeAssignmentRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As OfficeAssignmentRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class OnlineCourseRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As OnlineCourseRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As OnlineCourseRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As OnlineCourseRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class OnsiteCourseRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As OnsiteCourseRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As OnsiteCourseRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As OnsiteCourseRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class PersonRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As PersonRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As PersonRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As PersonRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class GetStudentGradesRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As GetStudentGradesRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As GetStudentGradesRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As GetStudentGradesRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class InsertOfficeAssignmentRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As InsertOfficeAssignmentRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As InsertOfficeAssignmentRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As InsertOfficeAssignmentRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class InsertPersonRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As InsertPersonRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As InsertPersonRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As InsertPersonRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class UpdateOfficeAssignmentRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As UpdateOfficeAssignmentRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As UpdateOfficeAssignmentRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As UpdateOfficeAssignmentRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class CourseListRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As CourseListRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As CourseListRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As CourseListRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
-
- '''<summary>
- '''Row event argument class
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Class StudentListRowChangeEvent
- Inherits Global.System.EventArgs
-
- Private eventRow As StudentListRow
-
- Private eventAction As Global.System.Data.DataRowAction
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New(ByVal row As StudentListRow, ByVal action As Global.System.Data.DataRowAction)
- MyBase.New
- Me.eventRow = row
- Me.eventAction = action
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Row() As StudentListRow
- Get
- Return Me.eventRow
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public ReadOnly Property Action() As Global.System.Data.DataRowAction
- Get
- Return Me.eventAction
- End Get
- End Property
- End Class
- End Class
-
- Namespace SchoolDataSetTableAdapters
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class CourseTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "Course"
- tableMapping.ColumnMappings.Add("CourseID", "CourseID")
- tableMapping.ColumnMappings.Add("Title", "Title")
- tableMapping.ColumnMappings.Add("Credits", "Credits")
- tableMapping.ColumnMappings.Add("DepartmentID", "DepartmentID")
- Me._adapter.TableMappings.Add(tableMapping)
- Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.DeleteCommand.Connection = Me.Connection
- Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Course] WHERE (([CourseID] = @Original_CourseID) AND ([Title] "& _
- "= @Original_Title) AND ([Credits] = @Original_Credits) AND ([DepartmentID] = @Or"& _
- "iginal_DepartmentID))"
- Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Title", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Title", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Credits", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Credits", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.InsertCommand.Connection = Me.Connection
- Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Course] ([CourseID], [Title], [Credits], [DepartmentID]) VALUE"& _
- "S (@CourseID, @Title, @Credits, @DepartmentID);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Title, Credits"& _
- ", DepartmentID FROM Course WHERE (CourseID = @CourseID)"
- Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Title", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Title", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Credits", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Credits", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.UpdateCommand.Connection = Me.Connection
- Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Course] SET [CourseID] = @CourseID, [Title] = @Title, [Credits] = @"& _
- "Credits, [DepartmentID] = @DepartmentID WHERE (([CourseID] = @Original_CourseID)"& _
- " AND ([Title] = @Original_Title) AND ([Credits] = @Original_Credits) AND ([Depar"& _
- "tmentID] = @Original_DepartmentID));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Title, Credits, Departmen"& _
- "tID FROM Course WHERE (CourseID = @CourseID)"
- Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Title", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Title", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Credits", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Credits", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Title", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Title", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Credits", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Credits", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT CourseID, Title, Credits, DepartmentID FROM dbo.Course"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.CourseDataTable) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData() As SchoolDataSet.CourseDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- Dim dataTable As SchoolDataSet.CourseDataTable = New SchoolDataSet.CourseDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.CourseDataTable) As Integer
- Return Me.Adapter.Update(dataTable)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
- Return Me.Adapter.Update(dataSet, "Course")
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(dataRows)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
- Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_Title As String, ByVal Original_Credits As Integer, ByVal Original_DepartmentID As Integer) As Integer
- Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
- If (Original_Title Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Title")
- Else
- Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Title,String)
- End If
- Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Credits,Integer)
- Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_DepartmentID,Integer)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
- If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.DeleteCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.DeleteCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
- Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal Title As String, ByVal Credits As Integer, ByVal DepartmentID As Integer) As Integer
- Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
- If (Title Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Title")
- Else
- Me.Adapter.InsertCommand.Parameters(1).Value = CType(Title,String)
- End If
- Me.Adapter.InsertCommand.Parameters(2).Value = CType(Credits,Integer)
- Me.Adapter.InsertCommand.Parameters(3).Value = CType(DepartmentID,Integer)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
- If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.InsertCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.InsertCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal Title As String, ByVal Credits As Integer, ByVal DepartmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_Title As String, ByVal Original_Credits As Integer, ByVal Original_DepartmentID As Integer) As Integer
- Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
- If (Title Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Title")
- Else
- Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Title,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Credits,Integer)
- Me.Adapter.UpdateCommand.Parameters(3).Value = CType(DepartmentID,Integer)
- Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_CourseID,Integer)
- If (Original_Title Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Title")
- Else
- Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_Title,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_Credits,Integer)
- Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_DepartmentID,Integer)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
- If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.UpdateCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.UpdateCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal Title As String, ByVal Credits As Integer, ByVal DepartmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_Title As String, ByVal Original_Credits As Integer, ByVal Original_DepartmentID As Integer) As Integer
- Return Me.Update(Original_CourseID, Title, Credits, DepartmentID, Original_CourseID, Original_Title, Original_Credits, Original_DepartmentID)
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class CourseGradeTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "CourseGrade"
- tableMapping.ColumnMappings.Add("EnrollmentID", "EnrollmentID")
- tableMapping.ColumnMappings.Add("CourseID", "CourseID")
- tableMapping.ColumnMappings.Add("StudentID", "StudentID")
- tableMapping.ColumnMappings.Add("Grade", "Grade")
- Me._adapter.TableMappings.Add(tableMapping)
- Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.DeleteCommand.Connection = Me.Connection
- Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[CourseGrade] WHERE (([EnrollmentID] = @Original_EnrollmentID) "& _
- "AND ([CourseID] = @Original_CourseID) AND ([StudentID] = @Original_StudentID) AN"& _
- "D ((@IsNull_Grade = 1 AND [Grade] IS NULL) OR ([Grade] = @Original_Grade)))"
- Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_EnrollmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_StudentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StudentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Grade", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Grade", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Grade", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 2, "Grade", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.InsertCommand.Connection = Me.Connection
- Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[CourseGrade] ([CourseID], [StudentID], [Grade]) VALUES (@Cours"& _
- "eID, @StudentID, @Grade);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT EnrollmentID, CourseID, StudentID, Grade FROM "& _
- "CourseGrade WHERE (EnrollmentID = SCOPE_IDENTITY())"
- Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StudentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StudentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Grade", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 2, "Grade", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.UpdateCommand.Connection = Me.Connection
- Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[CourseGrade] SET [CourseID] = @CourseID, [StudentID] = @StudentID, "& _
- "[Grade] = @Grade WHERE (([EnrollmentID] = @Original_EnrollmentID) AND ([CourseID"& _
- "] = @Original_CourseID) AND ([StudentID] = @Original_StudentID) AND ((@IsNull_Gr"& _
- "ade = 1 AND [Grade] IS NULL) OR ([Grade] = @Original_Grade)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT Enrollmen"& _
- "tID, CourseID, StudentID, Grade FROM CourseGrade WHERE (EnrollmentID = @Enrollme"& _
- "ntID)"
- Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StudentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StudentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Grade", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 2, "Grade", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_EnrollmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_StudentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StudentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Grade", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Grade", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Grade", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 2, "Grade", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EnrollmentID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT EnrollmentID, CourseID, StudentID, Grade FROM dbo.CourseGrade"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.CourseGradeDataTable) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData() As SchoolDataSet.CourseGradeDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- Dim dataTable As SchoolDataSet.CourseGradeDataTable = New SchoolDataSet.CourseGradeDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.CourseGradeDataTable) As Integer
- Return Me.Adapter.Update(dataTable)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
- Return Me.Adapter.Update(dataSet, "CourseGrade")
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(dataRows)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
- Public Overloads Overridable Function Delete(ByVal Original_EnrollmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_StudentID As Integer, ByVal Original_Grade As Global.System.Nullable(Of Decimal)) As Integer
- Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_EnrollmentID,Integer)
- Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_CourseID,Integer)
- Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_StudentID,Integer)
- If (Original_Grade.HasValue = true) Then
- Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
- Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_Grade.Value,Decimal)
- Else
- Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
- Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
- If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.DeleteCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.DeleteCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
- Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal StudentID As Integer, ByVal Grade As Global.System.Nullable(Of Decimal)) As Integer
- Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
- Me.Adapter.InsertCommand.Parameters(1).Value = CType(StudentID,Integer)
- If (Grade.HasValue = true) Then
- Me.Adapter.InsertCommand.Parameters(2).Value = CType(Grade.Value,Decimal)
- Else
- Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
- If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.InsertCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.InsertCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal StudentID As Integer, ByVal Grade As Global.System.Nullable(Of Decimal), ByVal Original_EnrollmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_StudentID As Integer, ByVal Original_Grade As Global.System.Nullable(Of Decimal), ByVal EnrollmentID As Integer) As Integer
- Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
- Me.Adapter.UpdateCommand.Parameters(1).Value = CType(StudentID,Integer)
- If (Grade.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Grade.Value,Decimal)
- Else
- Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
- End If
- Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_EnrollmentID,Integer)
- Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_CourseID,Integer)
- Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_StudentID,Integer)
- If (Original_Grade.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Grade.Value,Decimal)
- Else
- Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object)
- Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value
- End If
- Me.Adapter.UpdateCommand.Parameters(8).Value = CType(EnrollmentID,Integer)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
- If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.UpdateCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.UpdateCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal StudentID As Integer, ByVal Grade As Global.System.Nullable(Of Decimal), ByVal Original_EnrollmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_StudentID As Integer, ByVal Original_Grade As Global.System.Nullable(Of Decimal)) As Integer
- Return Me.Update(CourseID, StudentID, Grade, Original_EnrollmentID, Original_CourseID, Original_StudentID, Original_Grade, Original_EnrollmentID)
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class CourseInstructorTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "CourseInstructor"
- tableMapping.ColumnMappings.Add("CourseID", "CourseID")
- tableMapping.ColumnMappings.Add("PersonID", "PersonID")
- Me._adapter.TableMappings.Add(tableMapping)
- Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.DeleteCommand.Connection = Me.Connection
- Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[CourseInstructor] WHERE (([CourseID] = @Original_CourseID) AND"& _
- " ([PersonID] = @Original_PersonID))"
- Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.InsertCommand.Connection = Me.Connection
- Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[CourseInstructor] ([CourseID], [PersonID]) VALUES (@CourseID, "& _
- "@PersonID);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, PersonID FROM CourseInstructor WHERE (CourseID = @"& _
- "CourseID) AND (PersonID = @PersonID)"
- Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.UpdateCommand.Connection = Me.Connection
- Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[CourseInstructor] SET [CourseID] = @CourseID, [PersonID] = @PersonI"& _
- "D WHERE (([CourseID] = @Original_CourseID) AND ([PersonID] = @Original_PersonID)"& _
- ");"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, PersonID FROM CourseInstructor WHERE (CourseID = @CourseID)"& _
- " AND (PersonID = @PersonID)"
- Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT CourseID, PersonID FROM dbo.CourseInstructor"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.CourseInstructorDataTable) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData() As SchoolDataSet.CourseInstructorDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- Dim dataTable As SchoolDataSet.CourseInstructorDataTable = New SchoolDataSet.CourseInstructorDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.CourseInstructorDataTable) As Integer
- Return Me.Adapter.Update(dataTable)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
- Return Me.Adapter.Update(dataSet, "CourseInstructor")
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(dataRows)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
- Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_PersonID As Integer) As Integer
- Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
- Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_PersonID,Integer)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
- If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.DeleteCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.DeleteCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
- Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal PersonID As Integer) As Integer
- Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
- Me.Adapter.InsertCommand.Parameters(1).Value = CType(PersonID,Integer)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
- If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.InsertCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.InsertCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal PersonID As Integer, ByVal Original_CourseID As Integer, ByVal Original_PersonID As Integer) As Integer
- Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
- Me.Adapter.UpdateCommand.Parameters(1).Value = CType(PersonID,Integer)
- Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_CourseID,Integer)
- Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_PersonID,Integer)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
- If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.UpdateCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.UpdateCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal Original_CourseID As Integer, ByVal Original_PersonID As Integer) As Integer
- Return Me.Update(Original_CourseID, Original_PersonID, Original_CourseID, Original_PersonID)
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class DepartmentTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "Department"
- tableMapping.ColumnMappings.Add("DepartmentID", "DepartmentID")
- tableMapping.ColumnMappings.Add("Name", "Name")
- tableMapping.ColumnMappings.Add("Budget", "Budget")
- tableMapping.ColumnMappings.Add("StartDate", "StartDate")
- tableMapping.ColumnMappings.Add("Administrator", "Administrator")
- Me._adapter.TableMappings.Add(tableMapping)
- Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.DeleteCommand.Connection = Me.Connection
- Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Department] WHERE (([DepartmentID] = @Original_DepartmentID) A"& _
- "ND ([Name] = @Original_Name) AND ([Budget] = @Original_Budget) AND ([StartDate] "& _
- "= @Original_StartDate) AND ((@IsNull_Administrator = 1 AND [Administrator] IS NU"& _
- "LL) OR ([Administrator] = @Original_Administrator)))"
- Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Name", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Budget", Global.System.Data.SqlDbType.Money, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Budget", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_StartDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StartDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.InsertCommand.Connection = Me.Connection
- Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Department] ([DepartmentID], [Name], [Budget], [StartDate], [A"& _
- "dministrator]) VALUES (@DepartmentID, @Name, @Budget, @StartDate, @Administrator"& _
- ");"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT DepartmentID, Name, Budget, StartDate, Administrator FROM Department "& _
- "WHERE (DepartmentID = @DepartmentID)"
- Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Name", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Budget", Global.System.Data.SqlDbType.Money, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Budget", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StartDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StartDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.UpdateCommand.Connection = Me.Connection
- Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Department] SET [DepartmentID] = @DepartmentID, [Name] = @Name, [Bu"& _
- "dget] = @Budget, [StartDate] = @StartDate, [Administrator] = @Administrator WHER"& _
- "E (([DepartmentID] = @Original_DepartmentID) AND ([Name] = @Original_Name) AND ("& _
- "[Budget] = @Original_Budget) AND ([StartDate] = @Original_StartDate) AND ((@IsNu"& _
- "ll_Administrator = 1 AND [Administrator] IS NULL) OR ([Administrator] = @Origina"& _
- "l_Administrator)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT DepartmentID, Name, Budget, StartDate, Administrator"& _
- " FROM Department WHERE (DepartmentID = @DepartmentID)"
- Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Name", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Budget", Global.System.Data.SqlDbType.Money, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Budget", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StartDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StartDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Name", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Budget", Global.System.Data.SqlDbType.Money, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Budget", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_StartDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StartDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT DepartmentID, Name, Budget, StartDate, Administrator FROM dbo.Department"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.DepartmentDataTable) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData() As SchoolDataSet.DepartmentDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- Dim dataTable As SchoolDataSet.DepartmentDataTable = New SchoolDataSet.DepartmentDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.DepartmentDataTable) As Integer
- Return Me.Adapter.Update(dataTable)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
- Return Me.Adapter.Update(dataSet, "Department")
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(dataRows)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
- Public Overloads Overridable Function Delete(ByVal Original_DepartmentID As Integer, ByVal Original_Name As String, ByVal Original_Budget As Decimal, ByVal Original_StartDate As Date, ByVal Original_Administrator As Global.System.Nullable(Of Integer)) As Integer
- Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_DepartmentID,Integer)
- If (Original_Name Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Name")
- Else
- Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Name,String)
- End If
- Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Budget,Decimal)
- Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_StartDate,Date)
- If (Original_Administrator.HasValue = true) Then
- Me.Adapter.DeleteCommand.Parameters(4).Value = CType(0,Object)
- Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_Administrator.Value,Integer)
- Else
- Me.Adapter.DeleteCommand.Parameters(4).Value = CType(1,Object)
- Me.Adapter.DeleteCommand.Parameters(5).Value = Global.System.DBNull.Value
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
- If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.DeleteCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.DeleteCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
- Public Overloads Overridable Function Insert(ByVal DepartmentID As Integer, ByVal Name As String, ByVal Budget As Decimal, ByVal StartDate As Date, ByVal Administrator As Global.System.Nullable(Of Integer)) As Integer
- Me.Adapter.InsertCommand.Parameters(0).Value = CType(DepartmentID,Integer)
- If (Name Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Name")
- Else
- Me.Adapter.InsertCommand.Parameters(1).Value = CType(Name,String)
- End If
- Me.Adapter.InsertCommand.Parameters(2).Value = CType(Budget,Decimal)
- Me.Adapter.InsertCommand.Parameters(3).Value = CType(StartDate,Date)
- If (Administrator.HasValue = true) Then
- Me.Adapter.InsertCommand.Parameters(4).Value = CType(Administrator.Value,Integer)
- Else
- Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
- If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.InsertCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.InsertCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal DepartmentID As Integer, ByVal Name As String, ByVal Budget As Decimal, ByVal StartDate As Date, ByVal Administrator As Global.System.Nullable(Of Integer), ByVal Original_DepartmentID As Integer, ByVal Original_Name As String, ByVal Original_Budget As Decimal, ByVal Original_StartDate As Date, ByVal Original_Administrator As Global.System.Nullable(Of Integer)) As Integer
- Me.Adapter.UpdateCommand.Parameters(0).Value = CType(DepartmentID,Integer)
- If (Name Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Name")
- Else
- Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Name,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Budget,Decimal)
- Me.Adapter.UpdateCommand.Parameters(3).Value = CType(StartDate,Date)
- If (Administrator.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Administrator.Value,Integer)
- Else
- Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
- End If
- Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_DepartmentID,Integer)
- If (Original_Name Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Name")
- Else
- Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_Name,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Budget,Decimal)
- Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_StartDate,Date)
- If (Original_Administrator.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_Administrator.Value,Integer)
- Else
- Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object)
- Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
- If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.UpdateCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.UpdateCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal Name As String, ByVal Budget As Decimal, ByVal StartDate As Date, ByVal Administrator As Global.System.Nullable(Of Integer), ByVal Original_DepartmentID As Integer, ByVal Original_Name As String, ByVal Original_Budget As Decimal, ByVal Original_StartDate As Date, ByVal Original_Administrator As Global.System.Nullable(Of Integer)) As Integer
- Return Me.Update(Original_DepartmentID, Name, Budget, StartDate, Administrator, Original_DepartmentID, Original_Name, Original_Budget, Original_StartDate, Original_Administrator)
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class OfficeAssignmentTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "OfficeAssignment"
- tableMapping.ColumnMappings.Add("InstructorID", "InstructorID")
- tableMapping.ColumnMappings.Add("Location", "Location")
- tableMapping.ColumnMappings.Add("Timestamp", "Timestamp")
- Me._adapter.TableMappings.Add(tableMapping)
- Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.DeleteCommand.Connection = Me.Connection
- Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OfficeAssignment] WHERE (([InstructorID] = @Original_Instructo"& _
- "rID) AND ([Timestamp] = @Original_Timestamp))"
- Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_InstructorID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "InstructorID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Timestamp", Global.System.Data.SqlDbType.Timestamp, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Timestamp", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.InsertCommand.Connection = Me.Connection
- Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OfficeAssignment] ([InstructorID], [Location]) VALUES (@Instru"& _
- "ctorID, @Location);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT InstructorID, Location, Timestamp FROM OfficeAssignm"& _
- "ent WHERE (InstructorID = @InstructorID)"
- Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@InstructorID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "InstructorID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.UpdateCommand.Connection = Me.Connection
- Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OfficeAssignment] SET [InstructorID] = @InstructorID, [Location] = "& _
- "@Location WHERE (([InstructorID] = @Original_InstructorID) AND ([Timestamp] = @O"& _
- "riginal_Timestamp));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT InstructorID, Location, Timestamp FROM OfficeAssign"& _
- "ment WHERE (InstructorID = @InstructorID)"
- Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@InstructorID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "InstructorID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_InstructorID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "InstructorID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Timestamp", Global.System.Data.SqlDbType.Timestamp, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Timestamp", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT InstructorID, Location, Timestamp FROM dbo.OfficeAssignment"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.OfficeAssignmentDataTable) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData() As SchoolDataSet.OfficeAssignmentDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- Dim dataTable As SchoolDataSet.OfficeAssignmentDataTable = New SchoolDataSet.OfficeAssignmentDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.OfficeAssignmentDataTable) As Integer
- Return Me.Adapter.Update(dataTable)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
- Return Me.Adapter.Update(dataSet, "OfficeAssignment")
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(dataRows)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
- Public Overloads Overridable Function Delete(ByVal Original_InstructorID As Integer, ByVal Original_Timestamp() As Byte) As Integer
- Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_InstructorID,Integer)
- If (Original_Timestamp Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Timestamp")
- Else
- Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Timestamp,Byte())
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
- If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.DeleteCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.DeleteCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
- Public Overloads Overridable Function Insert(ByVal InstructorID As Integer, ByVal Location As String) As Integer
- Me.Adapter.InsertCommand.Parameters(0).Value = CType(InstructorID,Integer)
- If (Location Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Location")
- Else
- Me.Adapter.InsertCommand.Parameters(1).Value = CType(Location,String)
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
- If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.InsertCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.InsertCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal InstructorID As Integer, ByVal Location As String, ByVal Original_InstructorID As Integer, ByVal Original_Timestamp() As Byte) As Integer
- Me.Adapter.UpdateCommand.Parameters(0).Value = CType(InstructorID,Integer)
- If (Location Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Location")
- Else
- Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Location,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_InstructorID,Integer)
- If (Original_Timestamp Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Timestamp")
- Else
- Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_Timestamp,Byte())
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
- If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.UpdateCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.UpdateCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal Location As String, ByVal Original_InstructorID As Integer, ByVal Original_Timestamp() As Byte) As Integer
- Return Me.Update(Original_InstructorID, Location, Original_InstructorID, Original_Timestamp)
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class OnlineCourseTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "OnlineCourse"
- tableMapping.ColumnMappings.Add("CourseID", "CourseID")
- tableMapping.ColumnMappings.Add("URL", "URL")
- Me._adapter.TableMappings.Add(tableMapping)
- Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.DeleteCommand.Connection = Me.Connection
- Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OnlineCourse] WHERE (([CourseID] = @Original_CourseID) AND ([U"& _
- "RL] = @Original_URL))"
- Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_URL", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "URL", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.InsertCommand.Connection = Me.Connection
- Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OnlineCourse] ([CourseID], [URL]) VALUES (@CourseID, @URL);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"S"& _
- "ELECT CourseID, URL FROM OnlineCourse WHERE (CourseID = @CourseID)"
- Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@URL", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "URL", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.UpdateCommand.Connection = Me.Connection
- Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OnlineCourse] SET [CourseID] = @CourseID, [URL] = @URL WHERE (([Cou"& _
- "rseID] = @Original_CourseID) AND ([URL] = @Original_URL));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, URL"& _
- " FROM OnlineCourse WHERE (CourseID = @CourseID)"
- Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@URL", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "URL", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_URL", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "URL", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT CourseID, URL FROM dbo.OnlineCourse"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.OnlineCourseDataTable) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData() As SchoolDataSet.OnlineCourseDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- Dim dataTable As SchoolDataSet.OnlineCourseDataTable = New SchoolDataSet.OnlineCourseDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.OnlineCourseDataTable) As Integer
- Return Me.Adapter.Update(dataTable)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
- Return Me.Adapter.Update(dataSet, "OnlineCourse")
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(dataRows)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
- Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_URL As String) As Integer
- Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
- If (Original_URL Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_URL")
- Else
- Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_URL,String)
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
- If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.DeleteCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.DeleteCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
- Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal URL As String) As Integer
- Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
- If (URL Is Nothing) Then
- Throw New Global.System.ArgumentNullException("URL")
- Else
- Me.Adapter.InsertCommand.Parameters(1).Value = CType(URL,String)
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
- If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.InsertCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.InsertCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal URL As String, ByVal Original_CourseID As Integer, ByVal Original_URL As String) As Integer
- Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
- If (URL Is Nothing) Then
- Throw New Global.System.ArgumentNullException("URL")
- Else
- Me.Adapter.UpdateCommand.Parameters(1).Value = CType(URL,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_CourseID,Integer)
- If (Original_URL Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_URL")
- Else
- Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_URL,String)
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
- If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.UpdateCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.UpdateCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal URL As String, ByVal Original_CourseID As Integer, ByVal Original_URL As String) As Integer
- Return Me.Update(Original_CourseID, URL, Original_CourseID, Original_URL)
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class OnsiteCourseTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "OnsiteCourse"
- tableMapping.ColumnMappings.Add("CourseID", "CourseID")
- tableMapping.ColumnMappings.Add("Location", "Location")
- tableMapping.ColumnMappings.Add("Days", "Days")
- tableMapping.ColumnMappings.Add("Time", "Time")
- Me._adapter.TableMappings.Add(tableMapping)
- Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.DeleteCommand.Connection = Me.Connection
- Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OnsiteCourse] WHERE (([CourseID] = @Original_CourseID) AND ([L"& _
- "ocation] = @Original_Location) AND ([Days] = @Original_Days) AND ([Time] = @Orig"& _
- "inal_Time))"
- Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Days", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Days", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Time", Global.System.Data.SqlDbType.SmallDateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Time", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.InsertCommand.Connection = Me.Connection
- Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OnsiteCourse] ([CourseID], [Location], [Days], [Time]) VALUES "& _
- "(@CourseID, @Location, @Days, @Time);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Location, Days, Time FRO"& _
- "M OnsiteCourse WHERE (CourseID = @CourseID)"
- Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Days", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Days", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Time", Global.System.Data.SqlDbType.SmallDateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Time", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.UpdateCommand.Connection = Me.Connection
- Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OnsiteCourse] SET [CourseID] = @CourseID, [Location] = @Location, ["& _
- "Days] = @Days, [Time] = @Time WHERE (([CourseID] = @Original_CourseID) AND ([Loc"& _
- "ation] = @Original_Location) AND ([Days] = @Original_Days) AND ([Time] = @Origin"& _
- "al_Time));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Location, Days, Time FROM OnsiteCourse WHERE (Cours"& _
- "eID = @CourseID)"
- Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Days", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Days", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Time", Global.System.Data.SqlDbType.SmallDateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Time", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Days", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Days", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Time", Global.System.Data.SqlDbType.SmallDateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Time", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT CourseID, Location, Days, Time FROM dbo.OnsiteCourse"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.OnsiteCourseDataTable) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData() As SchoolDataSet.OnsiteCourseDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- Dim dataTable As SchoolDataSet.OnsiteCourseDataTable = New SchoolDataSet.OnsiteCourseDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.OnsiteCourseDataTable) As Integer
- Return Me.Adapter.Update(dataTable)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
- Return Me.Adapter.Update(dataSet, "OnsiteCourse")
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(dataRows)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
- Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_Location As String, ByVal Original_Days As String, ByVal Original_Time As Date) As Integer
- Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
- If (Original_Location Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Location")
- Else
- Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Location,String)
- End If
- If (Original_Days Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Days")
- Else
- Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Days,String)
- End If
- Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_Time,Date)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
- If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.DeleteCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.DeleteCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
- Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal Location As String, ByVal Days As String, ByVal Time As Date) As Integer
- Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
- If (Location Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Location")
- Else
- Me.Adapter.InsertCommand.Parameters(1).Value = CType(Location,String)
- End If
- If (Days Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Days")
- Else
- Me.Adapter.InsertCommand.Parameters(2).Value = CType(Days,String)
- End If
- Me.Adapter.InsertCommand.Parameters(3).Value = CType(Time,Date)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
- If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.InsertCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.InsertCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal Location As String, ByVal Days As String, ByVal Time As Date, ByVal Original_CourseID As Integer, ByVal Original_Location As String, ByVal Original_Days As String, ByVal Original_Time As Date) As Integer
- Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
- If (Location Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Location")
- Else
- Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Location,String)
- End If
- If (Days Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Days")
- Else
- Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Days,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Time,Date)
- Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_CourseID,Integer)
- If (Original_Location Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Location")
- Else
- Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_Location,String)
- End If
- If (Original_Days Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_Days")
- Else
- Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_Days,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Time,Date)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
- If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.UpdateCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.UpdateCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal Location As String, ByVal Days As String, ByVal Time As Date, ByVal Original_CourseID As Integer, ByVal Original_Location As String, ByVal Original_Days As String, ByVal Original_Time As Date) As Integer
- Return Me.Update(Original_CourseID, Location, Days, Time, Original_CourseID, Original_Location, Original_Days, Original_Time)
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class PersonTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "Person"
- tableMapping.ColumnMappings.Add("PersonID", "PersonID")
- tableMapping.ColumnMappings.Add("LastName", "LastName")
- tableMapping.ColumnMappings.Add("FirstName", "FirstName")
- tableMapping.ColumnMappings.Add("PersonCategory", "PersonCategory")
- tableMapping.ColumnMappings.Add("HireDate", "HireDate")
- tableMapping.ColumnMappings.Add("EnrollmentDate", "EnrollmentDate")
- tableMapping.ColumnMappings.Add("Picture", "Picture")
- Me._adapter.TableMappings.Add(tableMapping)
- Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.DeleteCommand.Connection = Me.Connection
- Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Person] WHERE (([PersonID] = @Original_PersonID) AND ([LastNam"& _
- "e] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ([PersonCat"& _
- "egory] = @Original_PersonCategory) AND ((@IsNull_HireDate = 1 AND [HireDate] IS "& _
- "NULL) OR ([HireDate] = @Original_HireDate)) AND ((@IsNull_EnrollmentDate = 1 AND"& _
- " [EnrollmentDate] IS NULL) OR ([EnrollmentDate] = @Original_EnrollmentDate)))"
- Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_LastName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LastName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_FirstName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FirstName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonCategory", Global.System.Data.SqlDbType.SmallInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonCategory", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_HireDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HireDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_EnrollmentDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
- Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.InsertCommand.Connection = Me.Connection
- Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Person] ([LastName], [FirstName], [PersonCategory], [HireDate]"& _
- ", [EnrollmentDate], [Picture]) VALUES (@LastName, @FirstName, @PersonCategory, @"& _
- "HireDate, @EnrollmentDate, @Picture);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT PersonID, LastName, FirstName, Per"& _
- "sonCategory, HireDate, EnrollmentDate, Picture FROM Person WHERE (PersonID = SCO"& _
- "PE_IDENTITY())"
- Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LastName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LastName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FirstName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FirstName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonCategory", Global.System.Data.SqlDbType.SmallInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonCategory", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HireDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Picture", Global.System.Data.SqlDbType.Image, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Picture", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
- Me._adapter.UpdateCommand.Connection = Me.Connection
- Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Person] SET [LastName] = @LastName, [FirstName] = @FirstName, [Pers"& _
- "onCategory] = @PersonCategory, [HireDate] = @HireDate, [EnrollmentDate] = @Enrol"& _
- "lmentDate, [Picture] = @Picture WHERE (([PersonID] = @Original_PersonID) AND ([L"& _
- "astName] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ([Per"& _
- "sonCategory] = @Original_PersonCategory) AND ((@IsNull_HireDate = 1 AND [HireDat"& _
- "e] IS NULL) OR ([HireDate] = @Original_HireDate)) AND ((@IsNull_EnrollmentDate ="& _
- " 1 AND [EnrollmentDate] IS NULL) OR ([EnrollmentDate] = @Original_EnrollmentDate"& _
- ")));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT PersonID, LastName, FirstName, PersonCategory, HireDate, Enrollment"& _
- "Date, Picture FROM Person WHERE (PersonID = @PersonID)"
- Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LastName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LastName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FirstName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FirstName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonCategory", Global.System.Data.SqlDbType.SmallInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonCategory", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HireDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Picture", Global.System.Data.SqlDbType.Image, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Picture", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_LastName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LastName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_FirstName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FirstName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonCategory", Global.System.Data.SqlDbType.SmallInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonCategory", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_HireDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HireDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_EnrollmentDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
- Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT PersonID, LastName, FirstName, PersonCategory, HireDate, EnrollmentDate, P"& _
- "icture FROM dbo.Person"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.PersonDataTable) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData() As SchoolDataSet.PersonDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- Dim dataTable As SchoolDataSet.PersonDataTable = New SchoolDataSet.PersonDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.PersonDataTable) As Integer
- Return Me.Adapter.Update(dataTable)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
- Return Me.Adapter.Update(dataSet, "Person")
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
- Return Me.Adapter.Update(dataRows)
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
- Public Overloads Overridable Function Delete(ByVal Original_PersonID As Integer, ByVal Original_LastName As String, ByVal Original_FirstName As String, ByVal Original_PersonCategory As Short, ByVal Original_HireDate As Global.System.Nullable(Of Date), ByVal Original_EnrollmentDate As Global.System.Nullable(Of Date)) As Integer
- Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_PersonID,Integer)
- If (Original_LastName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_LastName")
- Else
- Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_LastName,String)
- End If
- If (Original_FirstName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_FirstName")
- Else
- Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_FirstName,String)
- End If
- Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_PersonCategory,Short)
- If (Original_HireDate.HasValue = true) Then
- Me.Adapter.DeleteCommand.Parameters(4).Value = CType(0,Object)
- Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_HireDate.Value,Date)
- Else
- Me.Adapter.DeleteCommand.Parameters(4).Value = CType(1,Object)
- Me.Adapter.DeleteCommand.Parameters(5).Value = Global.System.DBNull.Value
- End If
- If (Original_EnrollmentDate.HasValue = true) Then
- Me.Adapter.DeleteCommand.Parameters(6).Value = CType(0,Object)
- Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_EnrollmentDate.Value,Date)
- Else
- Me.Adapter.DeleteCommand.Parameters(6).Value = CType(1,Object)
- Me.Adapter.DeleteCommand.Parameters(7).Value = Global.System.DBNull.Value
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
- If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.DeleteCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.DeleteCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
- Public Overloads Overridable Function Insert(ByVal LastName As String, ByVal FirstName As String, ByVal PersonCategory As Short, ByVal HireDate As Global.System.Nullable(Of Date), ByVal EnrollmentDate As Global.System.Nullable(Of Date), ByVal Picture() As Byte) As Integer
- If (LastName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("LastName")
- Else
- Me.Adapter.InsertCommand.Parameters(0).Value = CType(LastName,String)
- End If
- If (FirstName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("FirstName")
- Else
- Me.Adapter.InsertCommand.Parameters(1).Value = CType(FirstName,String)
- End If
- Me.Adapter.InsertCommand.Parameters(2).Value = CType(PersonCategory,Short)
- If (HireDate.HasValue = true) Then
- Me.Adapter.InsertCommand.Parameters(3).Value = CType(HireDate.Value,Date)
- Else
- Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value
- End If
- If (EnrollmentDate.HasValue = true) Then
- Me.Adapter.InsertCommand.Parameters(4).Value = CType(EnrollmentDate.Value,Date)
- Else
- Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
- End If
- If (Picture Is Nothing) Then
- Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.InsertCommand.Parameters(5).Value = CType(Picture,Byte())
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
- If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.InsertCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.InsertCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal LastName As String, ByVal FirstName As String, ByVal PersonCategory As Short, ByVal HireDate As Global.System.Nullable(Of Date), ByVal EnrollmentDate As Global.System.Nullable(Of Date), ByVal Picture() As Byte, ByVal Original_PersonID As Integer, ByVal Original_LastName As String, ByVal Original_FirstName As String, ByVal Original_PersonCategory As Short, ByVal Original_HireDate As Global.System.Nullable(Of Date), ByVal Original_EnrollmentDate As Global.System.Nullable(Of Date), ByVal PersonID As Integer) As Integer
- If (LastName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("LastName")
- Else
- Me.Adapter.UpdateCommand.Parameters(0).Value = CType(LastName,String)
- End If
- If (FirstName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("FirstName")
- Else
- Me.Adapter.UpdateCommand.Parameters(1).Value = CType(FirstName,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(2).Value = CType(PersonCategory,Short)
- If (HireDate.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(3).Value = CType(HireDate.Value,Date)
- Else
- Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value
- End If
- If (EnrollmentDate.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(4).Value = CType(EnrollmentDate.Value,Date)
- Else
- Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
- End If
- If (Picture Is Nothing) Then
- Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Picture,Byte())
- End If
- Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_PersonID,Integer)
- If (Original_LastName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_LastName")
- Else
- Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_LastName,String)
- End If
- If (Original_FirstName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("Original_FirstName")
- Else
- Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_FirstName,String)
- End If
- Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_PersonCategory,Short)
- If (Original_HireDate.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_HireDate.Value,Date)
- Else
- Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object)
- Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value
- End If
- If (Original_EnrollmentDate.HasValue = true) Then
- Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object)
- Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_EnrollmentDate.Value,Date)
- Else
- Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object)
- Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value
- End If
- Me.Adapter.UpdateCommand.Parameters(14).Value = CType(PersonID,Integer)
- Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
- If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- Me.Adapter.UpdateCommand.Connection.Open
- End If
- Try
- Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
- Return returnValue
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- Me.Adapter.UpdateCommand.Connection.Close
- End If
- End Try
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
- Public Overloads Overridable Function Update(ByVal LastName As String, ByVal FirstName As String, ByVal PersonCategory As Short, ByVal HireDate As Global.System.Nullable(Of Date), ByVal EnrollmentDate As Global.System.Nullable(Of Date), ByVal Picture() As Byte, ByVal Original_PersonID As Integer, ByVal Original_LastName As String, ByVal Original_FirstName As String, ByVal Original_PersonCategory As Short, ByVal Original_HireDate As Global.System.Nullable(Of Date), ByVal Original_EnrollmentDate As Global.System.Nullable(Of Date)) As Integer
- Return Me.Update(LastName, FirstName, PersonCategory, HireDate, EnrollmentDate, Picture, Original_PersonID, Original_LastName, Original_FirstName, Original_PersonCategory, Original_HireDate, Original_EnrollmentDate, Original_PersonID)
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class GetStudentGradesTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "GetStudentGrades"
- tableMapping.ColumnMappings.Add("EnrollmentID", "EnrollmentID")
- tableMapping.ColumnMappings.Add("Grade", "Grade")
- Me._adapter.TableMappings.Add(tableMapping)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "dbo.GetStudentGrades"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StudentID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.GetStudentGradesDataTable, ByVal StudentID As Global.System.Nullable(Of Integer)) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (StudentID.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(1).Value = CType(StudentID.Value,Integer)
- Else
- Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
- End If
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData(ByVal StudentID As Global.System.Nullable(Of Integer)) As SchoolDataSet.GetStudentGradesDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (StudentID.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(1).Value = CType(StudentID.Value,Integer)
- Else
- Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
- End If
- Dim dataTable As SchoolDataSet.GetStudentGradesDataTable = New SchoolDataSet.GetStudentGradesDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class InsertOfficeAssignmentTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "InsertOfficeAssignment"
- tableMapping.ColumnMappings.Add("Timestamp", "Timestamp")
- Me._adapter.TableMappings.Add(tableMapping)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "dbo.InsertOfficeAssignment"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@InstructorID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.InsertOfficeAssignmentDataTable, ByVal InstructorID As Global.System.Nullable(Of Integer), ByVal Location As String) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (InstructorID.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(1).Value = CType(InstructorID.Value,Integer)
- Else
- Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
- End If
- If (Location Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(2).Value = CType(Location,String)
- End If
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData(ByVal InstructorID As Global.System.Nullable(Of Integer), ByVal Location As String) As SchoolDataSet.InsertOfficeAssignmentDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (InstructorID.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(1).Value = CType(InstructorID.Value,Integer)
- Else
- Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
- End If
- If (Location Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(2).Value = CType(Location,String)
- End If
- Dim dataTable As SchoolDataSet.InsertOfficeAssignmentDataTable = New SchoolDataSet.InsertOfficeAssignmentDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class InsertPersonTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "InsertPerson"
- tableMapping.ColumnMappings.Add("NewPersonID", "NewPersonID")
- Me._adapter.TableMappings.Add(tableMapping)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "dbo.InsertPerson"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LastName", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FirstName", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HireDate", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.InsertPersonDataTable, ByVal LastName As String, ByVal FirstName As String, ByVal HireDate As Global.System.Nullable(Of Date), ByVal EnrollmentDate As Global.System.Nullable(Of Date)) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (LastName Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(1).Value = CType(LastName,String)
- End If
- If (FirstName Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(2).Value = CType(FirstName,String)
- End If
- If (HireDate.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(3).Value = CType(HireDate.Value,Date)
- Else
- Me.Adapter.SelectCommand.Parameters(3).Value = Global.System.DBNull.Value
- End If
- If (EnrollmentDate.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(4).Value = CType(EnrollmentDate.Value,Date)
- Else
- Me.Adapter.SelectCommand.Parameters(4).Value = Global.System.DBNull.Value
- End If
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData(ByVal LastName As String, ByVal FirstName As String, ByVal HireDate As Global.System.Nullable(Of Date), ByVal EnrollmentDate As Global.System.Nullable(Of Date)) As SchoolDataSet.InsertPersonDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (LastName Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(1).Value = CType(LastName,String)
- End If
- If (FirstName Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(2).Value = CType(FirstName,String)
- End If
- If (HireDate.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(3).Value = CType(HireDate.Value,Date)
- Else
- Me.Adapter.SelectCommand.Parameters(3).Value = Global.System.DBNull.Value
- End If
- If (EnrollmentDate.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(4).Value = CType(EnrollmentDate.Value,Date)
- Else
- Me.Adapter.SelectCommand.Parameters(4).Value = Global.System.DBNull.Value
- End If
- Dim dataTable As SchoolDataSet.InsertPersonDataTable = New SchoolDataSet.InsertPersonDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class UpdateOfficeAssignmentTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "UpdateOfficeAssignment"
- tableMapping.ColumnMappings.Add("Timestamp", "Timestamp")
- Me._adapter.TableMappings.Add(tableMapping)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "dbo.UpdateOfficeAssignment"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@InstructorID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OrigTimestamp", Global.System.Data.SqlDbType.Timestamp, 8, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.UpdateOfficeAssignmentDataTable, ByVal InstructorID As Global.System.Nullable(Of Integer), ByVal Location As String, ByVal OrigTimestamp() As Byte) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (InstructorID.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(1).Value = CType(InstructorID.Value,Integer)
- Else
- Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
- End If
- If (Location Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(2).Value = CType(Location,String)
- End If
- If (OrigTimestamp Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(3).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(3).Value = CType(OrigTimestamp,Byte())
- End If
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetData(ByVal InstructorID As Global.System.Nullable(Of Integer), ByVal Location As String, ByVal OrigTimestamp() As Byte) As SchoolDataSet.UpdateOfficeAssignmentDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (InstructorID.HasValue = true) Then
- Me.Adapter.SelectCommand.Parameters(1).Value = CType(InstructorID.Value,Integer)
- Else
- Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
- End If
- If (Location Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(2).Value = CType(Location,String)
- End If
- If (OrigTimestamp Is Nothing) Then
- Me.Adapter.SelectCommand.Parameters(3).Value = Global.System.DBNull.Value
- Else
- Me.Adapter.SelectCommand.Parameters(3).Value = CType(OrigTimestamp,Byte())
- End If
- Dim dataTable As SchoolDataSet.UpdateOfficeAssignmentDataTable = New SchoolDataSet.UpdateOfficeAssignmentDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class CourseListTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "CourseList"
- tableMapping.ColumnMappings.Add("Title", "Title")
- tableMapping.ColumnMappings.Add("Credits", "Credits")
- tableMapping.ColumnMappings.Add("DepartmentName", "DepartmentName")
- tableMapping.ColumnMappings.Add("Instructor", "Instructor")
- Me._adapter.TableMappings.Add(tableMapping)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT Course.Title, Course.Credits, Department.Name AS DepartmentName, In"& _
- "structors.FirstName + ' ' + Instructors.LastName AS Instructor"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM "& _
- "CourseGrade LEFT OUTER JOIN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" Person AS Students ON Cour"& _
- "seGrade.StudentID = Students.PersonID RIGHT OUTER JOIN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" "& _
- " Person AS Instructors RIGHT OUTER JOIN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CourseInstruct"& _
- "or RIGHT OUTER JOIN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" Course ON CourseInstructor.CourseI"& _
- "D = Course.CourseID LEFT OUTER JOIN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" Department ON Cour"& _
- "se.DepartmentID = Department.DepartmentID ON Instructors.PersonID = CourseInstru"& _
- "ctor.PersonID ON "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" CourseGrade.CourseID = Course.Course"& _
- "ID"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (Students.FirstName + ' ' + Students.LastName = @StudentName)"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StudentName", Global.System.Data.SqlDbType.NVarChar, 1024, Global.System.Data.ParameterDirection.Input, 0, 0, "", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function FillCourseList(ByVal dataTable As SchoolDataSet.CourseListDataTable, ByVal StudentName As String) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (StudentName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("StudentName")
- Else
- Me.Adapter.SelectCommand.Parameters(0).Value = CType(StudentName,String)
- End If
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetCourseList(ByVal StudentName As String) As SchoolDataSet.CourseListDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (StudentName Is Nothing) Then
- Throw New Global.System.ArgumentNullException("StudentName")
- Else
- Me.Adapter.SelectCommand.Parameters(0).Value = CType(StudentName,String)
- End If
- Dim dataTable As SchoolDataSet.CourseListDataTable = New SchoolDataSet.CourseListDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class StudentListTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
-
- Private _connection As Global.System.Data.SqlClient.SqlConnection
-
- Private _transaction As Global.System.Data.SqlClient.SqlTransaction
-
- Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
-
- Private _clearBeforeFill As Boolean
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Sub New()
- MyBase.New
- Me.ClearBeforeFill = true
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
- Get
- If (Me._adapter Is Nothing) Then
- Me.InitAdapter
- End If
- Return Me._adapter
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
- Get
- If (Me._connection Is Nothing) Then
- Me.InitConnection
- End If
- Return Me._connection
- End Get
- Set
- Me._connection = value
- If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
- Me.Adapter.InsertCommand.Connection = value
- End If
- If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
- Me.Adapter.DeleteCommand.Connection = value
- End If
- If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
- Me.Adapter.UpdateCommand.Connection = value
- End If
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- If (Not (Me.CommandCollection(i)) Is Nothing) Then
- CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
- End If
- i = (i + 1)
- Loop
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
- Get
- Return Me._transaction
- End Get
- Set
- Me._transaction = value
- Dim i As Integer = 0
- Do While (i < Me.CommandCollection.Length)
- Me.CommandCollection(i).Transaction = Me._transaction
- i = (i + 1)
- Loop
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
- Me.Adapter.DeleteCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
- Me.Adapter.InsertCommand.Transaction = Me._transaction
- End If
- If ((Not (Me.Adapter) Is Nothing) _
- AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
- Me.Adapter.UpdateCommand.Transaction = Me._transaction
- End If
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property ClearBeforeFill() As Boolean
- Get
- Return Me._clearBeforeFill
- End Get
- Set
- Me._clearBeforeFill = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitAdapter()
- Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
- Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
- tableMapping.SourceTable = "Table"
- tableMapping.DataSetTable = "StudentList"
- tableMapping.ColumnMappings.Add("StudentName", "StudentName")
- Me._adapter.TableMappings.Add(tableMapping)
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitConnection()
- Me._connection = New Global.System.Data.SqlClient.SqlConnection
- Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- Me._commandCollection(0).Connection = Me.Connection
- Me._commandCollection(0).CommandText = "SELECT FirstName + ' ' + LastName AS StudentName"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM Person"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)& _
- "WHERE (HireDate IS NULL)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"ORDER BY StudentName"
- Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
- Public Overloads Overridable Function FillStudentList(ByVal dataTable As SchoolDataSet.StudentListDataTable) As Integer
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- If (Me.ClearBeforeFill = true) Then
- dataTable.Clear
- End If
- Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
- Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
- Public Overloads Overridable Function GetStudentList() As SchoolDataSet.StudentListDataTable
- Me.Adapter.SelectCommand = Me.CommandCollection(0)
- Dim dataTable As SchoolDataSet.StudentListDataTable = New SchoolDataSet.StudentListDataTable
- Me.Adapter.Fill(dataTable)
- Return dataTable
- End Function
- End Class
-
- '''<summary>
- '''Represents the connection and commands used to retrieve and save data.
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DataObjectAttribute(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
- ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Partial Public Class QueriesTableAdapter
- Inherits Global.System.ComponentModel.Component
-
- Private _commandCollection() As Global.System.Data.IDbCommand
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected ReadOnly Property CommandCollection() As Global.System.Data.IDbCommand()
- Get
- If (Me._commandCollection Is Nothing) Then
- Me.InitCommandCollection
- End If
- Return Me._commandCollection
- End Get
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Sub InitCommandCollection()
- Me._commandCollection = New Global.System.Data.IDbCommand(2) {}
- Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
- CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString)
- CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.DeleteOfficeAssignment"
- CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure
- CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- CType(Me._commandCollection(0),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@InstructorID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(1) = New Global.System.Data.SqlClient.SqlCommand
- CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString)
- CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.DeletePerson"
- CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure
- CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- CType(Me._commandCollection(1),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- Me._commandCollection(2) = New Global.System.Data.SqlClient.SqlCommand
- CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Connection = New Global.System.Data.SqlClient.SqlConnection(Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString)
- CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).CommandText = "dbo.UpdatePerson"
- CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).CommandType = Global.System.Data.CommandType.StoredProcedure
- CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@RETURN_VALUE", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.ReturnValue, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 10, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LastName", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FirstName", Global.System.Data.SqlDbType.NVarChar, 50, Global.System.Data.ParameterDirection.Input, 0, 0, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HireDate", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- CType(Me._commandCollection(2),Global.System.Data.SqlClient.SqlCommand).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 8, Global.System.Data.ParameterDirection.Input, 23, 3, Nothing, Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function DeleteOfficeAssignment(ByVal InstructorID As Global.System.Nullable(Of Integer)) As Integer
- Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(0),Global.System.Data.SqlClient.SqlCommand)
- If (InstructorID.HasValue = true) Then
- command.Parameters(1).Value = CType(InstructorID.Value,Integer)
- Else
- command.Parameters(1).Value = Global.System.DBNull.Value
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
- If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- command.Connection.Open
- End If
- Dim returnValue As Integer
- Try
- returnValue = command.ExecuteNonQuery
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- command.Connection.Close
- End If
- End Try
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function DeletePerson(ByVal PersonID As Global.System.Nullable(Of Integer)) As Integer
- Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(1),Global.System.Data.SqlClient.SqlCommand)
- If (PersonID.HasValue = true) Then
- command.Parameters(1).Value = CType(PersonID.Value,Integer)
- Else
- command.Parameters(1).Value = Global.System.DBNull.Value
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
- If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- command.Connection.Open
- End If
- Dim returnValue As Integer
- Try
- returnValue = command.ExecuteNonQuery
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- command.Connection.Close
- End If
- End Try
- Return returnValue
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
- Public Overloads Overridable Function UpdatePerson(ByVal PersonID As Global.System.Nullable(Of Integer), ByVal LastName As String, ByVal FirstName As String, ByVal HireDate As Global.System.Nullable(Of Date), ByVal EnrollmentDate As Global.System.Nullable(Of Date)) As Integer
- Dim command As Global.System.Data.SqlClient.SqlCommand = CType(Me.CommandCollection(2),Global.System.Data.SqlClient.SqlCommand)
- If (PersonID.HasValue = true) Then
- command.Parameters(1).Value = CType(PersonID.Value,Integer)
- Else
- command.Parameters(1).Value = Global.System.DBNull.Value
- End If
- If (LastName Is Nothing) Then
- command.Parameters(2).Value = Global.System.DBNull.Value
- Else
- command.Parameters(2).Value = CType(LastName,String)
- End If
- If (FirstName Is Nothing) Then
- command.Parameters(3).Value = Global.System.DBNull.Value
- Else
- command.Parameters(3).Value = CType(FirstName,String)
- End If
- If (HireDate.HasValue = true) Then
- command.Parameters(4).Value = CType(HireDate.Value,Date)
- Else
- command.Parameters(4).Value = Global.System.DBNull.Value
- End If
- If (EnrollmentDate.HasValue = true) Then
- command.Parameters(5).Value = CType(EnrollmentDate.Value,Date)
- Else
- command.Parameters(5).Value = Global.System.DBNull.Value
- End If
- Dim previousConnectionState As Global.System.Data.ConnectionState = command.Connection.State
- If ((command.Connection.State And Global.System.Data.ConnectionState.Open) _
- <> Global.System.Data.ConnectionState.Open) Then
- command.Connection.Open
- End If
- Dim returnValue As Integer
- Try
- returnValue = command.ExecuteNonQuery
- Finally
- If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
- command.Connection.Close
- End If
- End Try
- Return returnValue
- End Function
- End Class
-
- '''<summary>
- '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
- Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
- Global.System.ComponentModel.ToolboxItem(true), _
- Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD"& _
- "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
- Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")> _
- Partial Public Class TableAdapterManager
- Inherits Global.System.ComponentModel.Component
-
- Private _updateOrder As UpdateOrderOption
-
- Private _courseTableAdapter As CourseTableAdapter
-
- Private _courseGradeTableAdapter As CourseGradeTableAdapter
-
- Private _courseInstructorTableAdapter As CourseInstructorTableAdapter
-
- Private _departmentTableAdapter As DepartmentTableAdapter
-
- Private _officeAssignmentTableAdapter As OfficeAssignmentTableAdapter
-
- Private _onlineCourseTableAdapter As OnlineCourseTableAdapter
-
- Private _onsiteCourseTableAdapter As OnsiteCourseTableAdapter
-
- Private _personTableAdapter As PersonTableAdapter
-
- Private _backupDataSetBeforeUpdate As Boolean
-
- Private _connection As Global.System.Data.IDbConnection
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property UpdateOrder() As UpdateOrderOption
- Get
- Return Me._updateOrder
- End Get
- Set
- Me._updateOrder = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
- "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
- "", "System.Drawing.Design.UITypeEditor")> _
- Public Property CourseTableAdapter() As CourseTableAdapter
- Get
- Return Me._courseTableAdapter
- End Get
- Set
- Me._courseTableAdapter = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
- "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
- "", "System.Drawing.Design.UITypeEditor")> _
- Public Property CourseGradeTableAdapter() As CourseGradeTableAdapter
- Get
- Return Me._courseGradeTableAdapter
- End Get
- Set
- Me._courseGradeTableAdapter = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
- "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
- "", "System.Drawing.Design.UITypeEditor")> _
- Public Property CourseInstructorTableAdapter() As CourseInstructorTableAdapter
- Get
- Return Me._courseInstructorTableAdapter
- End Get
- Set
- Me._courseInstructorTableAdapter = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
- "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
- "", "System.Drawing.Design.UITypeEditor")> _
- Public Property DepartmentTableAdapter() As DepartmentTableAdapter
- Get
- Return Me._departmentTableAdapter
- End Get
- Set
- Me._departmentTableAdapter = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
- "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
- "", "System.Drawing.Design.UITypeEditor")> _
- Public Property OfficeAssignmentTableAdapter() As OfficeAssignmentTableAdapter
- Get
- Return Me._officeAssignmentTableAdapter
- End Get
- Set
- Me._officeAssignmentTableAdapter = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
- "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
- "", "System.Drawing.Design.UITypeEditor")> _
- Public Property OnlineCourseTableAdapter() As OnlineCourseTableAdapter
- Get
- Return Me._onlineCourseTableAdapter
- End Get
- Set
- Me._onlineCourseTableAdapter = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
- "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
- "", "System.Drawing.Design.UITypeEditor")> _
- Public Property OnsiteCourseTableAdapter() As OnsiteCourseTableAdapter
- Get
- Return Me._onsiteCourseTableAdapter
- End Get
- Set
- Me._onsiteCourseTableAdapter = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
- "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
- "", "System.Drawing.Design.UITypeEditor")> _
- Public Property PersonTableAdapter() As PersonTableAdapter
- Get
- Return Me._personTableAdapter
- End Get
- Set
- Me._personTableAdapter = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Property BackupDataSetBeforeUpdate() As Boolean
- Get
- Return Me._backupDataSetBeforeUpdate
- End Get
- Set
- Me._backupDataSetBeforeUpdate = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public Property Connection() As Global.System.Data.IDbConnection
- Get
- If (Not (Me._connection) Is Nothing) Then
- Return Me._connection
- End If
- If ((Not (Me._courseTableAdapter) Is Nothing) _
- AndAlso (Not (Me._courseTableAdapter.Connection) Is Nothing)) Then
- Return Me._courseTableAdapter.Connection
- End If
- If ((Not (Me._courseGradeTableAdapter) Is Nothing) _
- AndAlso (Not (Me._courseGradeTableAdapter.Connection) Is Nothing)) Then
- Return Me._courseGradeTableAdapter.Connection
- End If
- If ((Not (Me._courseInstructorTableAdapter) Is Nothing) _
- AndAlso (Not (Me._courseInstructorTableAdapter.Connection) Is Nothing)) Then
- Return Me._courseInstructorTableAdapter.Connection
- End If
- If ((Not (Me._departmentTableAdapter) Is Nothing) _
- AndAlso (Not (Me._departmentTableAdapter.Connection) Is Nothing)) Then
- Return Me._departmentTableAdapter.Connection
- End If
- If ((Not (Me._officeAssignmentTableAdapter) Is Nothing) _
- AndAlso (Not (Me._officeAssignmentTableAdapter.Connection) Is Nothing)) Then
- Return Me._officeAssignmentTableAdapter.Connection
- End If
- If ((Not (Me._onlineCourseTableAdapter) Is Nothing) _
- AndAlso (Not (Me._onlineCourseTableAdapter.Connection) Is Nothing)) Then
- Return Me._onlineCourseTableAdapter.Connection
- End If
- If ((Not (Me._onsiteCourseTableAdapter) Is Nothing) _
- AndAlso (Not (Me._onsiteCourseTableAdapter.Connection) Is Nothing)) Then
- Return Me._onsiteCourseTableAdapter.Connection
- End If
- If ((Not (Me._personTableAdapter) Is Nothing) _
- AndAlso (Not (Me._personTableAdapter.Connection) Is Nothing)) Then
- Return Me._personTableAdapter.Connection
- End If
- Return Nothing
- End Get
- Set
- Me._connection = value
- End Set
- End Property
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
- Global.System.ComponentModel.Browsable(false)> _
- Public ReadOnly Property TableAdapterInstanceCount() As Integer
- Get
- Dim count As Integer = 0
- If (Not (Me._courseTableAdapter) Is Nothing) Then
- count = (count + 1)
- End If
- If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
- count = (count + 1)
- End If
- If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
- count = (count + 1)
- End If
- If (Not (Me._departmentTableAdapter) Is Nothing) Then
- count = (count + 1)
- End If
- If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
- count = (count + 1)
- End If
- If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
- count = (count + 1)
- End If
- If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
- count = (count + 1)
- End If
- If (Not (Me._personTableAdapter) Is Nothing) Then
- count = (count + 1)
- End If
- Return count
- End Get
- End Property
-
- '''<summary>
- '''Update rows in top-down order.
- '''</summary>
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function UpdateUpdatedRows(ByVal dataSet As SchoolDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow), ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
- Dim result As Integer = 0
- If (Not (Me._departmentTableAdapter) Is Nothing) Then
- Dim updatedRows() As Global.System.Data.DataRow = dataSet.Department.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
- updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
- If ((Not (updatedRows) Is Nothing) _
- AndAlso (0 < updatedRows.Length)) Then
- result = (result + Me._departmentTableAdapter.Update(updatedRows))
- allChangedRows.AddRange(updatedRows)
- End If
- End If
- If (Not (Me._courseTableAdapter) Is Nothing) Then
- Dim updatedRows() As Global.System.Data.DataRow = dataSet.Course.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
- updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
- If ((Not (updatedRows) Is Nothing) _
- AndAlso (0 < updatedRows.Length)) Then
- result = (result + Me._courseTableAdapter.Update(updatedRows))
- allChangedRows.AddRange(updatedRows)
- End If
- End If
- If (Not (Me._personTableAdapter) Is Nothing) Then
- Dim updatedRows() As Global.System.Data.DataRow = dataSet.Person.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
- updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
- If ((Not (updatedRows) Is Nothing) _
- AndAlso (0 < updatedRows.Length)) Then
- result = (result + Me._personTableAdapter.Update(updatedRows))
- allChangedRows.AddRange(updatedRows)
- End If
- End If
- If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
- Dim updatedRows() As Global.System.Data.DataRow = dataSet.CourseInstructor.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
- updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
- If ((Not (updatedRows) Is Nothing) _
- AndAlso (0 < updatedRows.Length)) Then
- result = (result + Me._courseInstructorTableAdapter.Update(updatedRows))
- allChangedRows.AddRange(updatedRows)
- End If
- End If
- If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
- Dim updatedRows() As Global.System.Data.DataRow = dataSet.CourseGrade.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
- updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
- If ((Not (updatedRows) Is Nothing) _
- AndAlso (0 < updatedRows.Length)) Then
- result = (result + Me._courseGradeTableAdapter.Update(updatedRows))
- allChangedRows.AddRange(updatedRows)
- End If
- End If
- If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
- Dim updatedRows() As Global.System.Data.DataRow = dataSet.OfficeAssignment.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
- updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
- If ((Not (updatedRows) Is Nothing) _
- AndAlso (0 < updatedRows.Length)) Then
- result = (result + Me._officeAssignmentTableAdapter.Update(updatedRows))
- allChangedRows.AddRange(updatedRows)
- End If
- End If
- If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
- Dim updatedRows() As Global.System.Data.DataRow = dataSet.OnsiteCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
- updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
- If ((Not (updatedRows) Is Nothing) _
- AndAlso (0 < updatedRows.Length)) Then
- result = (result + Me._onsiteCourseTableAdapter.Update(updatedRows))
- allChangedRows.AddRange(updatedRows)
- End If
- End If
- If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
- Dim updatedRows() As Global.System.Data.DataRow = dataSet.OnlineCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
- updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
- If ((Not (updatedRows) Is Nothing) _
- AndAlso (0 < updatedRows.Length)) Then
- result = (result + Me._onlineCourseTableAdapter.Update(updatedRows))
- allChangedRows.AddRange(updatedRows)
- End If
- End If
- Return result
- End Function
-
- '''<summary>
- '''Insert rows in top-down order.
- '''</summary>
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function UpdateInsertedRows(ByVal dataSet As SchoolDataSet, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
- Dim result As Integer = 0
- If (Not (Me._departmentTableAdapter) Is Nothing) Then
- Dim addedRows() As Global.System.Data.DataRow = dataSet.Department.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
- If ((Not (addedRows) Is Nothing) _
- AndAlso (0 < addedRows.Length)) Then
- result = (result + Me._departmentTableAdapter.Update(addedRows))
- allAddedRows.AddRange(addedRows)
- End If
- End If
- If (Not (Me._courseTableAdapter) Is Nothing) Then
- Dim addedRows() As Global.System.Data.DataRow = dataSet.Course.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
- If ((Not (addedRows) Is Nothing) _
- AndAlso (0 < addedRows.Length)) Then
- result = (result + Me._courseTableAdapter.Update(addedRows))
- allAddedRows.AddRange(addedRows)
- End If
- End If
- If (Not (Me._personTableAdapter) Is Nothing) Then
- Dim addedRows() As Global.System.Data.DataRow = dataSet.Person.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
- If ((Not (addedRows) Is Nothing) _
- AndAlso (0 < addedRows.Length)) Then
- result = (result + Me._personTableAdapter.Update(addedRows))
- allAddedRows.AddRange(addedRows)
- End If
- End If
- If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
- Dim addedRows() As Global.System.Data.DataRow = dataSet.CourseInstructor.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
- If ((Not (addedRows) Is Nothing) _
- AndAlso (0 < addedRows.Length)) Then
- result = (result + Me._courseInstructorTableAdapter.Update(addedRows))
- allAddedRows.AddRange(addedRows)
- End If
- End If
- If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
- Dim addedRows() As Global.System.Data.DataRow = dataSet.CourseGrade.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
- If ((Not (addedRows) Is Nothing) _
- AndAlso (0 < addedRows.Length)) Then
- result = (result + Me._courseGradeTableAdapter.Update(addedRows))
- allAddedRows.AddRange(addedRows)
- End If
- End If
- If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
- Dim addedRows() As Global.System.Data.DataRow = dataSet.OfficeAssignment.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
- If ((Not (addedRows) Is Nothing) _
- AndAlso (0 < addedRows.Length)) Then
- result = (result + Me._officeAssignmentTableAdapter.Update(addedRows))
- allAddedRows.AddRange(addedRows)
- End If
- End If
- If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
- Dim addedRows() As Global.System.Data.DataRow = dataSet.OnsiteCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
- If ((Not (addedRows) Is Nothing) _
- AndAlso (0 < addedRows.Length)) Then
- result = (result + Me._onsiteCourseTableAdapter.Update(addedRows))
- allAddedRows.AddRange(addedRows)
- End If
- End If
- If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
- Dim addedRows() As Global.System.Data.DataRow = dataSet.OnlineCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
- If ((Not (addedRows) Is Nothing) _
- AndAlso (0 < addedRows.Length)) Then
- result = (result + Me._onlineCourseTableAdapter.Update(addedRows))
- allAddedRows.AddRange(addedRows)
- End If
- End If
- Return result
- End Function
-
- '''<summary>
- '''Delete rows in bottom-up order.
- '''</summary>
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function UpdateDeletedRows(ByVal dataSet As SchoolDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
- Dim result As Integer = 0
- If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
- Dim deletedRows() As Global.System.Data.DataRow = dataSet.OnlineCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
- If ((Not (deletedRows) Is Nothing) _
- AndAlso (0 < deletedRows.Length)) Then
- result = (result + Me._onlineCourseTableAdapter.Update(deletedRows))
- allChangedRows.AddRange(deletedRows)
- End If
- End If
- If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
- Dim deletedRows() As Global.System.Data.DataRow = dataSet.OnsiteCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
- If ((Not (deletedRows) Is Nothing) _
- AndAlso (0 < deletedRows.Length)) Then
- result = (result + Me._onsiteCourseTableAdapter.Update(deletedRows))
- allChangedRows.AddRange(deletedRows)
- End If
- End If
- If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
- Dim deletedRows() As Global.System.Data.DataRow = dataSet.OfficeAssignment.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
- If ((Not (deletedRows) Is Nothing) _
- AndAlso (0 < deletedRows.Length)) Then
- result = (result + Me._officeAssignmentTableAdapter.Update(deletedRows))
- allChangedRows.AddRange(deletedRows)
- End If
- End If
- If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
- Dim deletedRows() As Global.System.Data.DataRow = dataSet.CourseGrade.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
- If ((Not (deletedRows) Is Nothing) _
- AndAlso (0 < deletedRows.Length)) Then
- result = (result + Me._courseGradeTableAdapter.Update(deletedRows))
- allChangedRows.AddRange(deletedRows)
- End If
- End If
- If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
- Dim deletedRows() As Global.System.Data.DataRow = dataSet.CourseInstructor.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
- If ((Not (deletedRows) Is Nothing) _
- AndAlso (0 < deletedRows.Length)) Then
- result = (result + Me._courseInstructorTableAdapter.Update(deletedRows))
- allChangedRows.AddRange(deletedRows)
- End If
- End If
- If (Not (Me._personTableAdapter) Is Nothing) Then
- Dim deletedRows() As Global.System.Data.DataRow = dataSet.Person.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
- If ((Not (deletedRows) Is Nothing) _
- AndAlso (0 < deletedRows.Length)) Then
- result = (result + Me._personTableAdapter.Update(deletedRows))
- allChangedRows.AddRange(deletedRows)
- End If
- End If
- If (Not (Me._courseTableAdapter) Is Nothing) Then
- Dim deletedRows() As Global.System.Data.DataRow = dataSet.Course.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
- If ((Not (deletedRows) Is Nothing) _
- AndAlso (0 < deletedRows.Length)) Then
- result = (result + Me._courseTableAdapter.Update(deletedRows))
- allChangedRows.AddRange(deletedRows)
- End If
- End If
- If (Not (Me._departmentTableAdapter) Is Nothing) Then
- Dim deletedRows() As Global.System.Data.DataRow = dataSet.Department.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
- If ((Not (deletedRows) Is Nothing) _
- AndAlso (0 < deletedRows.Length)) Then
- result = (result + Me._departmentTableAdapter.Update(deletedRows))
- allChangedRows.AddRange(deletedRows)
- End If
- End If
- Return result
- End Function
-
- '''<summary>
- '''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
- '''</summary>
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System.Data.DataRow, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Global.System.Data.DataRow()
- If ((updatedRows Is Nothing) _
- OrElse (updatedRows.Length < 1)) Then
- Return updatedRows
- End If
- If ((allAddedRows Is Nothing) _
- OrElse (allAddedRows.Count < 1)) Then
- Return updatedRows
- End If
- Dim realUpdatedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)
- Dim i As Integer = 0
- Do While (i < updatedRows.Length)
- Dim row As Global.System.Data.DataRow = updatedRows(i)
- If (allAddedRows.Contains(row) = false) Then
- realUpdatedRows.Add(row)
- End If
- i = (i + 1)
- Loop
- Return realUpdatedRows.ToArray
- End Function
-
- '''<summary>
- '''Update all changes to the dataset.
- '''</summary>
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Overridable Function UpdateAll(ByVal dataSet As SchoolDataSet) As Integer
- If (dataSet Is Nothing) Then
- Throw New Global.System.ArgumentNullException("dataSet")
- End If
- If (dataSet.HasChanges = false) Then
- Return 0
- End If
- If ((Not (Me._courseTableAdapter) Is Nothing) _
- AndAlso (Me.MatchTableAdapterConnection(Me._courseTableAdapter.Connection) = false)) Then
- Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
- "tring.")
- End If
- If ((Not (Me._courseGradeTableAdapter) Is Nothing) _
- AndAlso (Me.MatchTableAdapterConnection(Me._courseGradeTableAdapter.Connection) = false)) Then
- Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
- "tring.")
- End If
- If ((Not (Me._courseInstructorTableAdapter) Is Nothing) _
- AndAlso (Me.MatchTableAdapterConnection(Me._courseInstructorTableAdapter.Connection) = false)) Then
- Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
- "tring.")
- End If
- If ((Not (Me._departmentTableAdapter) Is Nothing) _
- AndAlso (Me.MatchTableAdapterConnection(Me._departmentTableAdapter.Connection) = false)) Then
- Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
- "tring.")
- End If
- If ((Not (Me._officeAssignmentTableAdapter) Is Nothing) _
- AndAlso (Me.MatchTableAdapterConnection(Me._officeAssignmentTableAdapter.Connection) = false)) Then
- Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
- "tring.")
- End If
- If ((Not (Me._onlineCourseTableAdapter) Is Nothing) _
- AndAlso (Me.MatchTableAdapterConnection(Me._onlineCourseTableAdapter.Connection) = false)) Then
- Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
- "tring.")
- End If
- If ((Not (Me._onsiteCourseTableAdapter) Is Nothing) _
- AndAlso (Me.MatchTableAdapterConnection(Me._onsiteCourseTableAdapter.Connection) = false)) Then
- Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
- "tring.")
- End If
- If ((Not (Me._personTableAdapter) Is Nothing) _
- AndAlso (Me.MatchTableAdapterConnection(Me._personTableAdapter.Connection) = false)) Then
- Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
- "tring.")
- End If
- Dim workConnection As Global.System.Data.IDbConnection = Me.Connection
- If (workConnection Is Nothing) Then
- Throw New Global.System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana"& _
- "ger TableAdapter property to a valid TableAdapter instance.")
- End If
- Dim workConnOpened As Boolean = false
- If ((workConnection.State And Global.System.Data.ConnectionState.Broken) _
- = Global.System.Data.ConnectionState.Broken) Then
- workConnection.Close
- End If
- If (workConnection.State = Global.System.Data.ConnectionState.Closed) Then
- workConnection.Open
- workConnOpened = true
- End If
- Dim workTransaction As Global.System.Data.IDbTransaction = workConnection.BeginTransaction
- If (workTransaction Is Nothing) Then
- Throw New Global.System.ApplicationException("The transaction cannot begin. The current data connection does not support transa"& _
- "ctions or the current state is not allowing the transaction to begin.")
- End If
- Dim allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)
- Dim allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)
- Dim adaptersWithAcceptChangesDuringUpdate As Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter) = New Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter)
- Dim revertConnections As Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection) = New Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection)
- Dim result As Integer = 0
- Dim backupDataSet As Global.System.Data.DataSet = Nothing
- If Me.BackupDataSetBeforeUpdate Then
- backupDataSet = New Global.System.Data.DataSet
- backupDataSet.Merge(dataSet)
- End If
- Try
- '---- Prepare for update -----------
- '
- If (Not (Me._courseTableAdapter) Is Nothing) Then
- revertConnections.Add(Me._courseTableAdapter, Me._courseTableAdapter.Connection)
- Me._courseTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
- Me._courseTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
- If Me._courseTableAdapter.Adapter.AcceptChangesDuringUpdate Then
- Me._courseTableAdapter.Adapter.AcceptChangesDuringUpdate = false
- adaptersWithAcceptChangesDuringUpdate.Add(Me._courseTableAdapter.Adapter)
- End If
- End If
- If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
- revertConnections.Add(Me._courseGradeTableAdapter, Me._courseGradeTableAdapter.Connection)
- Me._courseGradeTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
- Me._courseGradeTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
- If Me._courseGradeTableAdapter.Adapter.AcceptChangesDuringUpdate Then
- Me._courseGradeTableAdapter.Adapter.AcceptChangesDuringUpdate = false
- adaptersWithAcceptChangesDuringUpdate.Add(Me._courseGradeTableAdapter.Adapter)
- End If
- End If
- If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
- revertConnections.Add(Me._courseInstructorTableAdapter, Me._courseInstructorTableAdapter.Connection)
- Me._courseInstructorTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
- Me._courseInstructorTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
- If Me._courseInstructorTableAdapter.Adapter.AcceptChangesDuringUpdate Then
- Me._courseInstructorTableAdapter.Adapter.AcceptChangesDuringUpdate = false
- adaptersWithAcceptChangesDuringUpdate.Add(Me._courseInstructorTableAdapter.Adapter)
- End If
- End If
- If (Not (Me._departmentTableAdapter) Is Nothing) Then
- revertConnections.Add(Me._departmentTableAdapter, Me._departmentTableAdapter.Connection)
- Me._departmentTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
- Me._departmentTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
- If Me._departmentTableAdapter.Adapter.AcceptChangesDuringUpdate Then
- Me._departmentTableAdapter.Adapter.AcceptChangesDuringUpdate = false
- adaptersWithAcceptChangesDuringUpdate.Add(Me._departmentTableAdapter.Adapter)
- End If
- End If
- If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
- revertConnections.Add(Me._officeAssignmentTableAdapter, Me._officeAssignmentTableAdapter.Connection)
- Me._officeAssignmentTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
- Me._officeAssignmentTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
- If Me._officeAssignmentTableAdapter.Adapter.AcceptChangesDuringUpdate Then
- Me._officeAssignmentTableAdapter.Adapter.AcceptChangesDuringUpdate = false
- adaptersWithAcceptChangesDuringUpdate.Add(Me._officeAssignmentTableAdapter.Adapter)
- End If
- End If
- If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
- revertConnections.Add(Me._onlineCourseTableAdapter, Me._onlineCourseTableAdapter.Connection)
- Me._onlineCourseTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
- Me._onlineCourseTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
- If Me._onlineCourseTableAdapter.Adapter.AcceptChangesDuringUpdate Then
- Me._onlineCourseTableAdapter.Adapter.AcceptChangesDuringUpdate = false
- adaptersWithAcceptChangesDuringUpdate.Add(Me._onlineCourseTableAdapter.Adapter)
- End If
- End If
- If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
- revertConnections.Add(Me._onsiteCourseTableAdapter, Me._onsiteCourseTableAdapter.Connection)
- Me._onsiteCourseTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
- Me._onsiteCourseTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
- If Me._onsiteCourseTableAdapter.Adapter.AcceptChangesDuringUpdate Then
- Me._onsiteCourseTableAdapter.Adapter.AcceptChangesDuringUpdate = false
- adaptersWithAcceptChangesDuringUpdate.Add(Me._onsiteCourseTableAdapter.Adapter)
- End If
- End If
- If (Not (Me._personTableAdapter) Is Nothing) Then
- revertConnections.Add(Me._personTableAdapter, Me._personTableAdapter.Connection)
- Me._personTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
- Me._personTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
- If Me._personTableAdapter.Adapter.AcceptChangesDuringUpdate Then
- Me._personTableAdapter.Adapter.AcceptChangesDuringUpdate = false
- adaptersWithAcceptChangesDuringUpdate.Add(Me._personTableAdapter.Adapter)
- End If
- End If
- '
- '---- Perform updates -----------
- '
- If (Me.UpdateOrder = UpdateOrderOption.UpdateInsertDelete) Then
- result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
- result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
- Else
- result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
- result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
- End If
- result = (result + Me.UpdateDeletedRows(dataSet, allChangedRows))
- '
- '---- Commit updates -----------
- '
- workTransaction.Commit
- If (0 < allAddedRows.Count) Then
- Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow
- allAddedRows.CopyTo(rows)
- Dim i As Integer = 0
- Do While (i < rows.Length)
- Dim row As Global.System.Data.DataRow = rows(i)
- row.AcceptChanges
- i = (i + 1)
- Loop
- End If
- If (0 < allChangedRows.Count) Then
- Dim rows((allChangedRows.Count) - 1) As Global.System.Data.DataRow
- allChangedRows.CopyTo(rows)
- Dim i As Integer = 0
- Do While (i < rows.Length)
- Dim row As Global.System.Data.DataRow = rows(i)
- row.AcceptChanges
- i = (i + 1)
- Loop
- End If
- Catch ex As Global.System.Exception
- workTransaction.Rollback
- '---- Restore the dataset -----------
- If Me.BackupDataSetBeforeUpdate Then
- Global.System.Diagnostics.Debug.Assert((Not (backupDataSet) Is Nothing))
- dataSet.Clear
- dataSet.Merge(backupDataSet)
- Else
- If (0 < allAddedRows.Count) Then
- Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow
- allAddedRows.CopyTo(rows)
- Dim i As Integer = 0
- Do While (i < rows.Length)
- Dim row As Global.System.Data.DataRow = rows(i)
- row.AcceptChanges
- row.SetAdded
- i = (i + 1)
- Loop
- End If
- End If
- Throw ex
- Finally
- If workConnOpened Then
- workConnection.Close
- End If
- If (Not (Me._courseTableAdapter) Is Nothing) Then
- Me._courseTableAdapter.Connection = CType(revertConnections(Me._courseTableAdapter),Global.System.Data.SqlClient.SqlConnection)
- Me._courseTableAdapter.Transaction = Nothing
- End If
- If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
- Me._courseGradeTableAdapter.Connection = CType(revertConnections(Me._courseGradeTableAdapter),Global.System.Data.SqlClient.SqlConnection)
- Me._courseGradeTableAdapter.Transaction = Nothing
- End If
- If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
- Me._courseInstructorTableAdapter.Connection = CType(revertConnections(Me._courseInstructorTableAdapter),Global.System.Data.SqlClient.SqlConnection)
- Me._courseInstructorTableAdapter.Transaction = Nothing
- End If
- If (Not (Me._departmentTableAdapter) Is Nothing) Then
- Me._departmentTableAdapter.Connection = CType(revertConnections(Me._departmentTableAdapter),Global.System.Data.SqlClient.SqlConnection)
- Me._departmentTableAdapter.Transaction = Nothing
- End If
- If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
- Me._officeAssignmentTableAdapter.Connection = CType(revertConnections(Me._officeAssignmentTableAdapter),Global.System.Data.SqlClient.SqlConnection)
- Me._officeAssignmentTableAdapter.Transaction = Nothing
- End If
- If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
- Me._onlineCourseTableAdapter.Connection = CType(revertConnections(Me._onlineCourseTableAdapter),Global.System.Data.SqlClient.SqlConnection)
- Me._onlineCourseTableAdapter.Transaction = Nothing
- End If
- If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
- Me._onsiteCourseTableAdapter.Connection = CType(revertConnections(Me._onsiteCourseTableAdapter),Global.System.Data.SqlClient.SqlConnection)
- Me._onsiteCourseTableAdapter.Transaction = Nothing
- End If
- If (Not (Me._personTableAdapter) Is Nothing) Then
- Me._personTableAdapter.Connection = CType(revertConnections(Me._personTableAdapter),Global.System.Data.SqlClient.SqlConnection)
- Me._personTableAdapter.Transaction = Nothing
- End If
- If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then
- Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter
- adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters)
- Dim i As Integer = 0
- Do While (i < adapters.Length)
- Dim adapter As Global.System.Data.Common.DataAdapter = adapters(i)
- adapter.AcceptChangesDuringUpdate = true
- i = (i + 1)
- Loop
- End If
- End Try
- Return result
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overridable Sub SortSelfReferenceRows(ByVal rows() As Global.System.Data.DataRow, ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
- Global.System.Array.Sort(Of Global.System.Data.DataRow)(rows, New SelfReferenceComparer(relation, childFirst))
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Protected Overridable Function MatchTableAdapterConnection(ByVal inputConnection As Global.System.Data.IDbConnection) As Boolean
- If (Not (Me._connection) Is Nothing) Then
- Return true
- End If
- If ((Me.Connection Is Nothing) _
- OrElse (inputConnection Is Nothing)) Then
- Return true
- End If
- If String.Equals(Me.Connection.ConnectionString, inputConnection.ConnectionString, Global.System.StringComparison.Ordinal) Then
- Return true
- End If
- Return false
- End Function
-
- '''<summary>
- '''Update Order Option
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Public Enum UpdateOrderOption
-
- InsertUpdateDelete = 0
-
- UpdateInsertDelete = 1
- End Enum
-
- '''<summary>
- '''Used to sort self-referenced table's rows
- '''</summary>
- <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
- Private Class SelfReferenceComparer
- Inherits Object
- Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow)
-
- Private _relation As Global.System.Data.DataRelation
-
- Private _childFirst As Integer
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Friend Sub New(ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
- MyBase.New
- Me._relation = relation
- If childFirst Then
- Me._childFirst = -1
- Else
- Me._childFirst = 1
- End If
- End Sub
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Private Function IsChildAndParent(ByVal child As Global.System.Data.DataRow, ByVal parent As Global.System.Data.DataRow) As Boolean
- Global.System.Diagnostics.Debug.Assert((Not (child) Is Nothing))
- Global.System.Diagnostics.Debug.Assert((Not (parent) Is Nothing))
- Dim newParent As Global.System.Data.DataRow = child.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
-
- Do While ((Not (newParent) Is Nothing) _
- AndAlso ((Object.ReferenceEquals(newParent, child) = false) _
- AndAlso (Object.ReferenceEquals(newParent, parent) = false)))
- newParent = newParent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
-
- Loop
- If (newParent Is Nothing) Then
- newParent = child.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
- Do While ((Not (newParent) Is Nothing) _
- AndAlso ((Object.ReferenceEquals(newParent, child) = false) _
- AndAlso (Object.ReferenceEquals(newParent, parent) = false)))
- newParent = newParent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
-
- Loop
- End If
- If Object.ReferenceEquals(newParent, parent) Then
- Return true
- End If
- Return false
- End Function
-
- <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
- Public Function Compare(ByVal row1 As Global.System.Data.DataRow, ByVal row2 As Global.System.Data.DataRow) As Integer Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow).Compare
- If Object.ReferenceEquals(row1, row2) Then
- Return 0
- End If
- If (row1 Is Nothing) Then
- Return -1
- End If
- If (row2 Is Nothing) Then
- Return 1
- End If
-
- 'Is row1 the child or grandchild of row2
- If Me.IsChildAndParent(row1, row2) Then
- Return Me._childFirst
- End If
-
- 'Is row2 the child or grandchild of row1
- If Me.IsChildAndParent(row2, row1) Then
- Return (-1 * Me._childFirst)
- End If
- Return 0
- End Function
- End Class
- End Class
- End Namespace