PageRenderTime 117ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 3ms

/Visual Studio 2008/VBVstoExcelWorkbook/SchoolDataSet.Designer.vb

#
Visual Basic | 9015 lines | 7797 code | 1047 blank | 171 comment | 13 complexity | 93897e8b697efd5e60ab1eed0f5a6537 MD5 | raw file
  1. '------------------------------------------------------------------------------
  2. ' <auto-generated>
  3. ' This code was generated by a tool.
  4. ' Runtime Version:2.0.50727.4927
  5. '
  6. ' Changes to this file may cause incorrect behavior and will be lost if
  7. ' the code is regenerated.
  8. ' </auto-generated>
  9. '------------------------------------------------------------------------------
  10. Option Strict Off
  11. Option Explicit On
  12. '''<summary>
  13. '''Represents a strongly typed in-memory cache of data.
  14. '''</summary>
  15. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  16. Global.System.Serializable(), _
  17. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  18. Global.System.ComponentModel.ToolboxItem(true), _
  19. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
  20. Global.System.Xml.Serialization.XmlRootAttribute("SchoolDataSet"), _
  21. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
  22. Partial Public Class SchoolDataSet
  23. Inherits Global.System.Data.DataSet
  24. Private tableCourse As CourseDataTable
  25. Private tableCourseGrade As CourseGradeDataTable
  26. Private tableCourseInstructor As CourseInstructorDataTable
  27. Private tableDepartment As DepartmentDataTable
  28. Private tableOfficeAssignment As OfficeAssignmentDataTable
  29. Private tableOnlineCourse As OnlineCourseDataTable
  30. Private tableOnsiteCourse As OnsiteCourseDataTable
  31. Private tablePerson As PersonDataTable
  32. Private tableGetStudentGrades As GetStudentGradesDataTable
  33. Private tableInsertOfficeAssignment As InsertOfficeAssignmentDataTable
  34. Private tableInsertPerson As InsertPersonDataTable
  35. Private tableUpdateOfficeAssignment As UpdateOfficeAssignmentDataTable
  36. Private tableCourseList As CourseListDataTable
  37. Private tableStudentList As StudentListDataTable
  38. Private relationFK_Course_Department As Global.System.Data.DataRelation
  39. Private relationFK_CourseGrade_Course As Global.System.Data.DataRelation
  40. Private relationFK_CourseGrade_Student As Global.System.Data.DataRelation
  41. Private relationFK_CourseInstructor_Course As Global.System.Data.DataRelation
  42. Private relationFK_CourseInstructor_Person As Global.System.Data.DataRelation
  43. Private relationFK_OfficeAssignment_Person As Global.System.Data.DataRelation
  44. Private relationFK_OnlineCourse_Course As Global.System.Data.DataRelation
  45. Private relationFK_OnsiteCourse_Course As Global.System.Data.DataRelation
  46. Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
  47. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  48. Public Sub New()
  49. MyBase.New
  50. Me.BeginInit
  51. Me.InitClass
  52. Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
  53. AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
  54. AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
  55. Me.EndInit
  56. End Sub
  57. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  58. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  59. MyBase.New(info, context, false)
  60. If (Me.IsBinarySerialized(info, context) = true) Then
  61. Me.InitVars(false)
  62. Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
  63. AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
  64. AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
  65. Return
  66. End If
  67. Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
  68. If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
  69. Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet
  70. ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
  71. If (Not (ds.Tables("Course")) Is Nothing) Then
  72. MyBase.Tables.Add(New CourseDataTable(ds.Tables("Course")))
  73. End If
  74. If (Not (ds.Tables("CourseGrade")) Is Nothing) Then
  75. MyBase.Tables.Add(New CourseGradeDataTable(ds.Tables("CourseGrade")))
  76. End If
  77. If (Not (ds.Tables("CourseInstructor")) Is Nothing) Then
  78. MyBase.Tables.Add(New CourseInstructorDataTable(ds.Tables("CourseInstructor")))
  79. End If
  80. If (Not (ds.Tables("Department")) Is Nothing) Then
  81. MyBase.Tables.Add(New DepartmentDataTable(ds.Tables("Department")))
  82. End If
  83. If (Not (ds.Tables("OfficeAssignment")) Is Nothing) Then
  84. MyBase.Tables.Add(New OfficeAssignmentDataTable(ds.Tables("OfficeAssignment")))
  85. End If
  86. If (Not (ds.Tables("OnlineCourse")) Is Nothing) Then
  87. MyBase.Tables.Add(New OnlineCourseDataTable(ds.Tables("OnlineCourse")))
  88. End If
  89. If (Not (ds.Tables("OnsiteCourse")) Is Nothing) Then
  90. MyBase.Tables.Add(New OnsiteCourseDataTable(ds.Tables("OnsiteCourse")))
  91. End If
  92. If (Not (ds.Tables("Person")) Is Nothing) Then
  93. MyBase.Tables.Add(New PersonDataTable(ds.Tables("Person")))
  94. End If
  95. If (Not (ds.Tables("GetStudentGrades")) Is Nothing) Then
  96. MyBase.Tables.Add(New GetStudentGradesDataTable(ds.Tables("GetStudentGrades")))
  97. End If
  98. If (Not (ds.Tables("InsertOfficeAssignment")) Is Nothing) Then
  99. MyBase.Tables.Add(New InsertOfficeAssignmentDataTable(ds.Tables("InsertOfficeAssignment")))
  100. End If
  101. If (Not (ds.Tables("InsertPerson")) Is Nothing) Then
  102. MyBase.Tables.Add(New InsertPersonDataTable(ds.Tables("InsertPerson")))
  103. End If
  104. If (Not (ds.Tables("UpdateOfficeAssignment")) Is Nothing) Then
  105. MyBase.Tables.Add(New UpdateOfficeAssignmentDataTable(ds.Tables("UpdateOfficeAssignment")))
  106. End If
  107. If (Not (ds.Tables("CourseList")) Is Nothing) Then
  108. MyBase.Tables.Add(New CourseListDataTable(ds.Tables("CourseList")))
  109. End If
  110. If (Not (ds.Tables("StudentList")) Is Nothing) Then
  111. MyBase.Tables.Add(New StudentListDataTable(ds.Tables("StudentList")))
  112. End If
  113. Me.DataSetName = ds.DataSetName
  114. Me.Prefix = ds.Prefix
  115. Me.Namespace = ds.Namespace
  116. Me.Locale = ds.Locale
  117. Me.CaseSensitive = ds.CaseSensitive
  118. Me.EnforceConstraints = ds.EnforceConstraints
  119. Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
  120. Me.InitVars
  121. Else
  122. Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
  123. End If
  124. Me.GetSerializationData(info, context)
  125. Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
  126. AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
  127. AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
  128. End Sub
  129. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  130. Global.System.ComponentModel.Browsable(false), _
  131. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  132. Public ReadOnly Property Course() As CourseDataTable
  133. Get
  134. Return Me.tableCourse
  135. End Get
  136. End Property
  137. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  138. Global.System.ComponentModel.Browsable(false), _
  139. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  140. Public ReadOnly Property CourseGrade() As CourseGradeDataTable
  141. Get
  142. Return Me.tableCourseGrade
  143. End Get
  144. End Property
  145. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  146. Global.System.ComponentModel.Browsable(false), _
  147. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  148. Public ReadOnly Property CourseInstructor() As CourseInstructorDataTable
  149. Get
  150. Return Me.tableCourseInstructor
  151. End Get
  152. End Property
  153. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  154. Global.System.ComponentModel.Browsable(false), _
  155. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  156. Public ReadOnly Property Department() As DepartmentDataTable
  157. Get
  158. Return Me.tableDepartment
  159. End Get
  160. End Property
  161. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  162. Global.System.ComponentModel.Browsable(false), _
  163. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  164. Public ReadOnly Property OfficeAssignment() As OfficeAssignmentDataTable
  165. Get
  166. Return Me.tableOfficeAssignment
  167. End Get
  168. End Property
  169. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  170. Global.System.ComponentModel.Browsable(false), _
  171. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  172. Public ReadOnly Property OnlineCourse() As OnlineCourseDataTable
  173. Get
  174. Return Me.tableOnlineCourse
  175. End Get
  176. End Property
  177. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  178. Global.System.ComponentModel.Browsable(false), _
  179. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  180. Public ReadOnly Property OnsiteCourse() As OnsiteCourseDataTable
  181. Get
  182. Return Me.tableOnsiteCourse
  183. End Get
  184. End Property
  185. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  186. Global.System.ComponentModel.Browsable(false), _
  187. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  188. Public ReadOnly Property Person() As PersonDataTable
  189. Get
  190. Return Me.tablePerson
  191. End Get
  192. End Property
  193. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  194. Global.System.ComponentModel.Browsable(false), _
  195. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  196. Public ReadOnly Property GetStudentGrades() As GetStudentGradesDataTable
  197. Get
  198. Return Me.tableGetStudentGrades
  199. End Get
  200. End Property
  201. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  202. Global.System.ComponentModel.Browsable(false), _
  203. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  204. Public ReadOnly Property InsertOfficeAssignment() As InsertOfficeAssignmentDataTable
  205. Get
  206. Return Me.tableInsertOfficeAssignment
  207. End Get
  208. End Property
  209. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  210. Global.System.ComponentModel.Browsable(false), _
  211. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  212. Public ReadOnly Property InsertPerson() As InsertPersonDataTable
  213. Get
  214. Return Me.tableInsertPerson
  215. End Get
  216. End Property
  217. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  218. Global.System.ComponentModel.Browsable(false), _
  219. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  220. Public ReadOnly Property UpdateOfficeAssignment() As UpdateOfficeAssignmentDataTable
  221. Get
  222. Return Me.tableUpdateOfficeAssignment
  223. End Get
  224. End Property
  225. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  226. Global.System.ComponentModel.Browsable(false), _
  227. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  228. Public ReadOnly Property CourseList() As CourseListDataTable
  229. Get
  230. Return Me.tableCourseList
  231. End Get
  232. End Property
  233. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  234. Global.System.ComponentModel.Browsable(false), _
  235. Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
  236. Public ReadOnly Property StudentList() As StudentListDataTable
  237. Get
  238. Return Me.tableStudentList
  239. End Get
  240. End Property
  241. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  242. Global.System.ComponentModel.BrowsableAttribute(true), _
  243. Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _
  244. Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
  245. Get
  246. Return Me._schemaSerializationMode
  247. End Get
  248. Set
  249. Me._schemaSerializationMode = value
  250. End Set
  251. End Property
  252. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  253. Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
  254. Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
  255. Get
  256. Return MyBase.Tables
  257. End Get
  258. End Property
  259. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  260. Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
  261. Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
  262. Get
  263. Return MyBase.Relations
  264. End Get
  265. End Property
  266. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  267. Protected Overrides Sub InitializeDerivedDataSet()
  268. Me.BeginInit
  269. Me.InitClass
  270. Me.EndInit
  271. End Sub
  272. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  273. Public Overrides Function Clone() As Global.System.Data.DataSet
  274. Dim cln As SchoolDataSet = CType(MyBase.Clone,SchoolDataSet)
  275. cln.InitVars
  276. cln.SchemaSerializationMode = Me.SchemaSerializationMode
  277. Return cln
  278. End Function
  279. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  280. Protected Overrides Function ShouldSerializeTables() As Boolean
  281. Return false
  282. End Function
  283. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  284. Protected Overrides Function ShouldSerializeRelations() As Boolean
  285. Return false
  286. End Function
  287. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  288. Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
  289. If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
  290. Me.Reset
  291. Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet
  292. ds.ReadXml(reader)
  293. If (Not (ds.Tables("Course")) Is Nothing) Then
  294. MyBase.Tables.Add(New CourseDataTable(ds.Tables("Course")))
  295. End If
  296. If (Not (ds.Tables("CourseGrade")) Is Nothing) Then
  297. MyBase.Tables.Add(New CourseGradeDataTable(ds.Tables("CourseGrade")))
  298. End If
  299. If (Not (ds.Tables("CourseInstructor")) Is Nothing) Then
  300. MyBase.Tables.Add(New CourseInstructorDataTable(ds.Tables("CourseInstructor")))
  301. End If
  302. If (Not (ds.Tables("Department")) Is Nothing) Then
  303. MyBase.Tables.Add(New DepartmentDataTable(ds.Tables("Department")))
  304. End If
  305. If (Not (ds.Tables("OfficeAssignment")) Is Nothing) Then
  306. MyBase.Tables.Add(New OfficeAssignmentDataTable(ds.Tables("OfficeAssignment")))
  307. End If
  308. If (Not (ds.Tables("OnlineCourse")) Is Nothing) Then
  309. MyBase.Tables.Add(New OnlineCourseDataTable(ds.Tables("OnlineCourse")))
  310. End If
  311. If (Not (ds.Tables("OnsiteCourse")) Is Nothing) Then
  312. MyBase.Tables.Add(New OnsiteCourseDataTable(ds.Tables("OnsiteCourse")))
  313. End If
  314. If (Not (ds.Tables("Person")) Is Nothing) Then
  315. MyBase.Tables.Add(New PersonDataTable(ds.Tables("Person")))
  316. End If
  317. If (Not (ds.Tables("GetStudentGrades")) Is Nothing) Then
  318. MyBase.Tables.Add(New GetStudentGradesDataTable(ds.Tables("GetStudentGrades")))
  319. End If
  320. If (Not (ds.Tables("InsertOfficeAssignment")) Is Nothing) Then
  321. MyBase.Tables.Add(New InsertOfficeAssignmentDataTable(ds.Tables("InsertOfficeAssignment")))
  322. End If
  323. If (Not (ds.Tables("InsertPerson")) Is Nothing) Then
  324. MyBase.Tables.Add(New InsertPersonDataTable(ds.Tables("InsertPerson")))
  325. End If
  326. If (Not (ds.Tables("UpdateOfficeAssignment")) Is Nothing) Then
  327. MyBase.Tables.Add(New UpdateOfficeAssignmentDataTable(ds.Tables("UpdateOfficeAssignment")))
  328. End If
  329. If (Not (ds.Tables("CourseList")) Is Nothing) Then
  330. MyBase.Tables.Add(New CourseListDataTable(ds.Tables("CourseList")))
  331. End If
  332. If (Not (ds.Tables("StudentList")) Is Nothing) Then
  333. MyBase.Tables.Add(New StudentListDataTable(ds.Tables("StudentList")))
  334. End If
  335. Me.DataSetName = ds.DataSetName
  336. Me.Prefix = ds.Prefix
  337. Me.Namespace = ds.Namespace
  338. Me.Locale = ds.Locale
  339. Me.CaseSensitive = ds.CaseSensitive
  340. Me.EnforceConstraints = ds.EnforceConstraints
  341. Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
  342. Me.InitVars
  343. Else
  344. Me.ReadXml(reader)
  345. Me.InitVars
  346. End If
  347. End Sub
  348. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  349. Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
  350. Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  351. Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
  352. stream.Position = 0
  353. Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
  354. End Function
  355. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  356. Friend Overloads Sub InitVars()
  357. Me.InitVars(true)
  358. End Sub
  359. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  360. Friend Overloads Sub InitVars(ByVal initTable As Boolean)
  361. Me.tableCourse = CType(MyBase.Tables("Course"),CourseDataTable)
  362. If (initTable = true) Then
  363. If (Not (Me.tableCourse) Is Nothing) Then
  364. Me.tableCourse.InitVars
  365. End If
  366. End If
  367. Me.tableCourseGrade = CType(MyBase.Tables("CourseGrade"),CourseGradeDataTable)
  368. If (initTable = true) Then
  369. If (Not (Me.tableCourseGrade) Is Nothing) Then
  370. Me.tableCourseGrade.InitVars
  371. End If
  372. End If
  373. Me.tableCourseInstructor = CType(MyBase.Tables("CourseInstructor"),CourseInstructorDataTable)
  374. If (initTable = true) Then
  375. If (Not (Me.tableCourseInstructor) Is Nothing) Then
  376. Me.tableCourseInstructor.InitVars
  377. End If
  378. End If
  379. Me.tableDepartment = CType(MyBase.Tables("Department"),DepartmentDataTable)
  380. If (initTable = true) Then
  381. If (Not (Me.tableDepartment) Is Nothing) Then
  382. Me.tableDepartment.InitVars
  383. End If
  384. End If
  385. Me.tableOfficeAssignment = CType(MyBase.Tables("OfficeAssignment"),OfficeAssignmentDataTable)
  386. If (initTable = true) Then
  387. If (Not (Me.tableOfficeAssignment) Is Nothing) Then
  388. Me.tableOfficeAssignment.InitVars
  389. End If
  390. End If
  391. Me.tableOnlineCourse = CType(MyBase.Tables("OnlineCourse"),OnlineCourseDataTable)
  392. If (initTable = true) Then
  393. If (Not (Me.tableOnlineCourse) Is Nothing) Then
  394. Me.tableOnlineCourse.InitVars
  395. End If
  396. End If
  397. Me.tableOnsiteCourse = CType(MyBase.Tables("OnsiteCourse"),OnsiteCourseDataTable)
  398. If (initTable = true) Then
  399. If (Not (Me.tableOnsiteCourse) Is Nothing) Then
  400. Me.tableOnsiteCourse.InitVars
  401. End If
  402. End If
  403. Me.tablePerson = CType(MyBase.Tables("Person"),PersonDataTable)
  404. If (initTable = true) Then
  405. If (Not (Me.tablePerson) Is Nothing) Then
  406. Me.tablePerson.InitVars
  407. End If
  408. End If
  409. Me.tableGetStudentGrades = CType(MyBase.Tables("GetStudentGrades"),GetStudentGradesDataTable)
  410. If (initTable = true) Then
  411. If (Not (Me.tableGetStudentGrades) Is Nothing) Then
  412. Me.tableGetStudentGrades.InitVars
  413. End If
  414. End If
  415. Me.tableInsertOfficeAssignment = CType(MyBase.Tables("InsertOfficeAssignment"),InsertOfficeAssignmentDataTable)
  416. If (initTable = true) Then
  417. If (Not (Me.tableInsertOfficeAssignment) Is Nothing) Then
  418. Me.tableInsertOfficeAssignment.InitVars
  419. End If
  420. End If
  421. Me.tableInsertPerson = CType(MyBase.Tables("InsertPerson"),InsertPersonDataTable)
  422. If (initTable = true) Then
  423. If (Not (Me.tableInsertPerson) Is Nothing) Then
  424. Me.tableInsertPerson.InitVars
  425. End If
  426. End If
  427. Me.tableUpdateOfficeAssignment = CType(MyBase.Tables("UpdateOfficeAssignment"),UpdateOfficeAssignmentDataTable)
  428. If (initTable = true) Then
  429. If (Not (Me.tableUpdateOfficeAssignment) Is Nothing) Then
  430. Me.tableUpdateOfficeAssignment.InitVars
  431. End If
  432. End If
  433. Me.tableCourseList = CType(MyBase.Tables("CourseList"),CourseListDataTable)
  434. If (initTable = true) Then
  435. If (Not (Me.tableCourseList) Is Nothing) Then
  436. Me.tableCourseList.InitVars
  437. End If
  438. End If
  439. Me.tableStudentList = CType(MyBase.Tables("StudentList"),StudentListDataTable)
  440. If (initTable = true) Then
  441. If (Not (Me.tableStudentList) Is Nothing) Then
  442. Me.tableStudentList.InitVars
  443. End If
  444. End If
  445. Me.relationFK_Course_Department = Me.Relations("FK_Course_Department")
  446. Me.relationFK_CourseGrade_Course = Me.Relations("FK_CourseGrade_Course")
  447. Me.relationFK_CourseGrade_Student = Me.Relations("FK_CourseGrade_Student")
  448. Me.relationFK_CourseInstructor_Course = Me.Relations("FK_CourseInstructor_Course")
  449. Me.relationFK_CourseInstructor_Person = Me.Relations("FK_CourseInstructor_Person")
  450. Me.relationFK_OfficeAssignment_Person = Me.Relations("FK_OfficeAssignment_Person")
  451. Me.relationFK_OnlineCourse_Course = Me.Relations("FK_OnlineCourse_Course")
  452. Me.relationFK_OnsiteCourse_Course = Me.Relations("FK_OnsiteCourse_Course")
  453. End Sub
  454. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  455. Private Sub InitClass()
  456. Me.DataSetName = "SchoolDataSet"
  457. Me.Prefix = ""
  458. Me.Namespace = "http://tempuri.org/SchoolDataSet.xsd"
  459. Me.EnforceConstraints = true
  460. Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
  461. Me.tableCourse = New CourseDataTable
  462. MyBase.Tables.Add(Me.tableCourse)
  463. Me.tableCourseGrade = New CourseGradeDataTable
  464. MyBase.Tables.Add(Me.tableCourseGrade)
  465. Me.tableCourseInstructor = New CourseInstructorDataTable
  466. MyBase.Tables.Add(Me.tableCourseInstructor)
  467. Me.tableDepartment = New DepartmentDataTable
  468. MyBase.Tables.Add(Me.tableDepartment)
  469. Me.tableOfficeAssignment = New OfficeAssignmentDataTable
  470. MyBase.Tables.Add(Me.tableOfficeAssignment)
  471. Me.tableOnlineCourse = New OnlineCourseDataTable
  472. MyBase.Tables.Add(Me.tableOnlineCourse)
  473. Me.tableOnsiteCourse = New OnsiteCourseDataTable
  474. MyBase.Tables.Add(Me.tableOnsiteCourse)
  475. Me.tablePerson = New PersonDataTable
  476. MyBase.Tables.Add(Me.tablePerson)
  477. Me.tableGetStudentGrades = New GetStudentGradesDataTable
  478. MyBase.Tables.Add(Me.tableGetStudentGrades)
  479. Me.tableInsertOfficeAssignment = New InsertOfficeAssignmentDataTable
  480. MyBase.Tables.Add(Me.tableInsertOfficeAssignment)
  481. Me.tableInsertPerson = New InsertPersonDataTable
  482. MyBase.Tables.Add(Me.tableInsertPerson)
  483. Me.tableUpdateOfficeAssignment = New UpdateOfficeAssignmentDataTable
  484. MyBase.Tables.Add(Me.tableUpdateOfficeAssignment)
  485. Me.tableCourseList = New CourseListDataTable
  486. MyBase.Tables.Add(Me.tableCourseList)
  487. Me.tableStudentList = New StudentListDataTable
  488. MyBase.Tables.Add(Me.tableStudentList)
  489. 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)
  490. Me.Relations.Add(Me.relationFK_Course_Department)
  491. 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)
  492. Me.Relations.Add(Me.relationFK_CourseGrade_Course)
  493. 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)
  494. Me.Relations.Add(Me.relationFK_CourseGrade_Student)
  495. 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)
  496. Me.Relations.Add(Me.relationFK_CourseInstructor_Course)
  497. 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)
  498. Me.Relations.Add(Me.relationFK_CourseInstructor_Person)
  499. 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)
  500. Me.Relations.Add(Me.relationFK_OfficeAssignment_Person)
  501. 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)
  502. Me.Relations.Add(Me.relationFK_OnlineCourse_Course)
  503. 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)
  504. Me.Relations.Add(Me.relationFK_OnsiteCourse_Course)
  505. End Sub
  506. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  507. Private Function ShouldSerializeCourse() As Boolean
  508. Return false
  509. End Function
  510. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  511. Private Function ShouldSerializeCourseGrade() As Boolean
  512. Return false
  513. End Function
  514. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  515. Private Function ShouldSerializeCourseInstructor() As Boolean
  516. Return false
  517. End Function
  518. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  519. Private Function ShouldSerializeDepartment() As Boolean
  520. Return false
  521. End Function
  522. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  523. Private Function ShouldSerializeOfficeAssignment() As Boolean
  524. Return false
  525. End Function
  526. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  527. Private Function ShouldSerializeOnlineCourse() As Boolean
  528. Return false
  529. End Function
  530. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  531. Private Function ShouldSerializeOnsiteCourse() As Boolean
  532. Return false
  533. End Function
  534. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  535. Private Function ShouldSerializePerson() As Boolean
  536. Return false
  537. End Function
  538. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  539. Private Function ShouldSerializeGetStudentGrades() As Boolean
  540. Return false
  541. End Function
  542. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  543. Private Function ShouldSerializeInsertOfficeAssignment() As Boolean
  544. Return false
  545. End Function
  546. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  547. Private Function ShouldSerializeInsertPerson() As Boolean
  548. Return false
  549. End Function
  550. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  551. Private Function ShouldSerializeUpdateOfficeAssignment() As Boolean
  552. Return false
  553. End Function
  554. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  555. Private Function ShouldSerializeCourseList() As Boolean
  556. Return false
  557. End Function
  558. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  559. Private Function ShouldSerializeStudentList() As Boolean
  560. Return false
  561. End Function
  562. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  563. Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
  564. If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
  565. Me.InitVars
  566. End If
  567. End Sub
  568. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  569. Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  570. Dim ds As SchoolDataSet = New SchoolDataSet
  571. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  572. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  573. Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  574. any.Namespace = ds.Namespace
  575. sequence.Items.Add(any)
  576. type.Particle = sequence
  577. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  578. If xs.Contains(dsSchema.TargetNamespace) Then
  579. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  580. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  581. Try
  582. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  583. dsSchema.Write(s1)
  584. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  585. Do While schemas.MoveNext
  586. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  587. s2.SetLength(0)
  588. schema.Write(s2)
  589. If (s1.Length = s2.Length) Then
  590. s1.Position = 0
  591. s2.Position = 0
  592. Do While ((s1.Position <> s1.Length) _
  593. AndAlso (s1.ReadByte = s2.ReadByte))
  594. Loop
  595. If (s1.Position = s1.Length) Then
  596. Return type
  597. End If
  598. End If
  599. Loop
  600. Finally
  601. If (Not (s1) Is Nothing) Then
  602. s1.Close
  603. End If
  604. If (Not (s2) Is Nothing) Then
  605. s2.Close
  606. End If
  607. End Try
  608. End If
  609. xs.Add(dsSchema)
  610. Return type
  611. End Function
  612. Public Delegate Sub CourseRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseRowChangeEvent)
  613. Public Delegate Sub CourseGradeRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseGradeRowChangeEvent)
  614. Public Delegate Sub CourseInstructorRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseInstructorRowChangeEvent)
  615. Public Delegate Sub DepartmentRowChangeEventHandler(ByVal sender As Object, ByVal e As DepartmentRowChangeEvent)
  616. Public Delegate Sub OfficeAssignmentRowChangeEventHandler(ByVal sender As Object, ByVal e As OfficeAssignmentRowChangeEvent)
  617. Public Delegate Sub OnlineCourseRowChangeEventHandler(ByVal sender As Object, ByVal e As OnlineCourseRowChangeEvent)
  618. Public Delegate Sub OnsiteCourseRowChangeEventHandler(ByVal sender As Object, ByVal e As OnsiteCourseRowChangeEvent)
  619. Public Delegate Sub PersonRowChangeEventHandler(ByVal sender As Object, ByVal e As PersonRowChangeEvent)
  620. Public Delegate Sub GetStudentGradesRowChangeEventHandler(ByVal sender As Object, ByVal e As GetStudentGradesRowChangeEvent)
  621. Public Delegate Sub InsertOfficeAssignmentRowChangeEventHandler(ByVal sender As Object, ByVal e As InsertOfficeAssignmentRowChangeEvent)
  622. Public Delegate Sub InsertPersonRowChangeEventHandler(ByVal sender As Object, ByVal e As InsertPersonRowChangeEvent)
  623. Public Delegate Sub UpdateOfficeAssignmentRowChangeEventHandler(ByVal sender As Object, ByVal e As UpdateOfficeAssignmentRowChangeEvent)
  624. Public Delegate Sub CourseListRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseListRowChangeEvent)
  625. Public Delegate Sub StudentListRowChangeEventHandler(ByVal sender As Object, ByVal e As StudentListRowChangeEvent)
  626. '''<summary>
  627. '''Represents the strongly named DataTable class.
  628. '''</summary>
  629. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  630. Global.System.Serializable(), _
  631. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  632. Partial Public Class CourseDataTable
  633. Inherits Global.System.Data.TypedTableBase(Of CourseRow)
  634. Private columnCourseID As Global.System.Data.DataColumn
  635. Private columnTitle As Global.System.Data.DataColumn
  636. Private columnCredits As Global.System.Data.DataColumn
  637. Private columnDepartmentID As Global.System.Data.DataColumn
  638. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  639. Public Sub New()
  640. MyBase.New
  641. Me.TableName = "Course"
  642. Me.BeginInit
  643. Me.InitClass
  644. Me.EndInit
  645. End Sub
  646. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  647. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  648. MyBase.New
  649. Me.TableName = table.TableName
  650. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  651. Me.CaseSensitive = table.CaseSensitive
  652. End If
  653. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  654. Me.Locale = table.Locale
  655. End If
  656. If (table.Namespace <> table.DataSet.Namespace) Then
  657. Me.Namespace = table.Namespace
  658. End If
  659. Me.Prefix = table.Prefix
  660. Me.MinimumCapacity = table.MinimumCapacity
  661. End Sub
  662. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  663. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  664. MyBase.New(info, context)
  665. Me.InitVars
  666. End Sub
  667. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  668. Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
  669. Get
  670. Return Me.columnCourseID
  671. End Get
  672. End Property
  673. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  674. Public ReadOnly Property TitleColumn() As Global.System.Data.DataColumn
  675. Get
  676. Return Me.columnTitle
  677. End Get
  678. End Property
  679. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  680. Public ReadOnly Property CreditsColumn() As Global.System.Data.DataColumn
  681. Get
  682. Return Me.columnCredits
  683. End Get
  684. End Property
  685. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  686. Public ReadOnly Property DepartmentIDColumn() As Global.System.Data.DataColumn
  687. Get
  688. Return Me.columnDepartmentID
  689. End Get
  690. End Property
  691. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  692. Global.System.ComponentModel.Browsable(false)> _
  693. Public ReadOnly Property Count() As Integer
  694. Get
  695. Return Me.Rows.Count
  696. End Get
  697. End Property
  698. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  699. Public Default ReadOnly Property Item(ByVal index As Integer) As CourseRow
  700. Get
  701. Return CType(Me.Rows(index),CourseRow)
  702. End Get
  703. End Property
  704. Public Event CourseRowChanging As CourseRowChangeEventHandler
  705. Public Event CourseRowChanged As CourseRowChangeEventHandler
  706. Public Event CourseRowDeleting As CourseRowChangeEventHandler
  707. Public Event CourseRowDeleted As CourseRowChangeEventHandler
  708. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  709. Public Overloads Sub AddCourseRow(ByVal row As CourseRow)
  710. Me.Rows.Add(row)
  711. End Sub
  712. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  713. Public Overloads Function AddCourseRow(ByVal CourseID As Integer, ByVal Title As String, ByVal Credits As Integer, ByVal parentDepartmentRowByFK_Course_Department As DepartmentRow) As CourseRow
  714. Dim rowCourseRow As CourseRow = CType(Me.NewRow,CourseRow)
  715. Dim columnValuesArray() As Object = New Object() {CourseID, Title, Credits, Nothing}
  716. If (Not (parentDepartmentRowByFK_Course_Department) Is Nothing) Then
  717. columnValuesArray(3) = parentDepartmentRowByFK_Course_Department(0)
  718. End If
  719. rowCourseRow.ItemArray = columnValuesArray
  720. Me.Rows.Add(rowCourseRow)
  721. Return rowCourseRow
  722. End Function
  723. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  724. Public Function FindByCourseID(ByVal CourseID As Integer) As CourseRow
  725. Return CType(Me.Rows.Find(New Object() {CourseID}),CourseRow)
  726. End Function
  727. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  728. Public Overrides Function Clone() As Global.System.Data.DataTable
  729. Dim cln As CourseDataTable = CType(MyBase.Clone,CourseDataTable)
  730. cln.InitVars
  731. Return cln
  732. End Function
  733. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  734. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  735. Return New CourseDataTable
  736. End Function
  737. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  738. Friend Sub InitVars()
  739. Me.columnCourseID = MyBase.Columns("CourseID")
  740. Me.columnTitle = MyBase.Columns("Title")
  741. Me.columnCredits = MyBase.Columns("Credits")
  742. Me.columnDepartmentID = MyBase.Columns("DepartmentID")
  743. End Sub
  744. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  745. Private Sub InitClass()
  746. Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  747. MyBase.Columns.Add(Me.columnCourseID)
  748. Me.columnTitle = New Global.System.Data.DataColumn("Title", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  749. MyBase.Columns.Add(Me.columnTitle)
  750. Me.columnCredits = New Global.System.Data.DataColumn("Credits", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  751. MyBase.Columns.Add(Me.columnCredits)
  752. Me.columnDepartmentID = New Global.System.Data.DataColumn("DepartmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  753. MyBase.Columns.Add(Me.columnDepartmentID)
  754. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID}, true))
  755. Me.columnCourseID.AllowDBNull = false
  756. Me.columnCourseID.Unique = true
  757. Me.columnTitle.AllowDBNull = false
  758. Me.columnTitle.MaxLength = 100
  759. Me.columnCredits.AllowDBNull = false
  760. Me.columnDepartmentID.AllowDBNull = false
  761. End Sub
  762. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  763. Public Function NewCourseRow() As CourseRow
  764. Return CType(Me.NewRow,CourseRow)
  765. End Function
  766. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  767. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  768. Return New CourseRow(builder)
  769. End Function
  770. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  771. Protected Overrides Function GetRowType() As Global.System.Type
  772. Return GetType(CourseRow)
  773. End Function
  774. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  775. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  776. MyBase.OnRowChanged(e)
  777. If (Not (Me.CourseRowChangedEvent) Is Nothing) Then
  778. RaiseEvent CourseRowChanged(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
  779. End If
  780. End Sub
  781. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  782. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  783. MyBase.OnRowChanging(e)
  784. If (Not (Me.CourseRowChangingEvent) Is Nothing) Then
  785. RaiseEvent CourseRowChanging(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
  786. End If
  787. End Sub
  788. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  789. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  790. MyBase.OnRowDeleted(e)
  791. If (Not (Me.CourseRowDeletedEvent) Is Nothing) Then
  792. RaiseEvent CourseRowDeleted(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
  793. End If
  794. End Sub
  795. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  796. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  797. MyBase.OnRowDeleting(e)
  798. If (Not (Me.CourseRowDeletingEvent) Is Nothing) Then
  799. RaiseEvent CourseRowDeleting(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
  800. End If
  801. End Sub
  802. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  803. Public Sub RemoveCourseRow(ByVal row As CourseRow)
  804. Me.Rows.Remove(row)
  805. End Sub
  806. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  807. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  808. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  809. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  810. Dim ds As SchoolDataSet = New SchoolDataSet
  811. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  812. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  813. any1.MinOccurs = New Decimal(0)
  814. any1.MaxOccurs = Decimal.MaxValue
  815. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  816. sequence.Items.Add(any1)
  817. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  818. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  819. any2.MinOccurs = New Decimal(1)
  820. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  821. sequence.Items.Add(any2)
  822. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  823. attribute1.Name = "namespace"
  824. attribute1.FixedValue = ds.Namespace
  825. type.Attributes.Add(attribute1)
  826. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  827. attribute2.Name = "tableTypeName"
  828. attribute2.FixedValue = "CourseDataTable"
  829. type.Attributes.Add(attribute2)
  830. type.Particle = sequence
  831. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  832. If xs.Contains(dsSchema.TargetNamespace) Then
  833. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  834. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  835. Try
  836. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  837. dsSchema.Write(s1)
  838. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  839. Do While schemas.MoveNext
  840. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  841. s2.SetLength(0)
  842. schema.Write(s2)
  843. If (s1.Length = s2.Length) Then
  844. s1.Position = 0
  845. s2.Position = 0
  846. Do While ((s1.Position <> s1.Length) _
  847. AndAlso (s1.ReadByte = s2.ReadByte))
  848. Loop
  849. If (s1.Position = s1.Length) Then
  850. Return type
  851. End If
  852. End If
  853. Loop
  854. Finally
  855. If (Not (s1) Is Nothing) Then
  856. s1.Close
  857. End If
  858. If (Not (s2) Is Nothing) Then
  859. s2.Close
  860. End If
  861. End Try
  862. End If
  863. xs.Add(dsSchema)
  864. Return type
  865. End Function
  866. End Class
  867. '''<summary>
  868. '''Represents the strongly named DataTable class.
  869. '''</summary>
  870. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  871. Global.System.Serializable(), _
  872. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  873. Partial Public Class CourseGradeDataTable
  874. Inherits Global.System.Data.TypedTableBase(Of CourseGradeRow)
  875. Private columnEnrollmentID As Global.System.Data.DataColumn
  876. Private columnCourseID As Global.System.Data.DataColumn
  877. Private columnStudentID As Global.System.Data.DataColumn
  878. Private columnGrade As Global.System.Data.DataColumn
  879. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  880. Public Sub New()
  881. MyBase.New
  882. Me.TableName = "CourseGrade"
  883. Me.BeginInit
  884. Me.InitClass
  885. Me.EndInit
  886. End Sub
  887. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  888. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  889. MyBase.New
  890. Me.TableName = table.TableName
  891. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  892. Me.CaseSensitive = table.CaseSensitive
  893. End If
  894. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  895. Me.Locale = table.Locale
  896. End If
  897. If (table.Namespace <> table.DataSet.Namespace) Then
  898. Me.Namespace = table.Namespace
  899. End If
  900. Me.Prefix = table.Prefix
  901. Me.MinimumCapacity = table.MinimumCapacity
  902. End Sub
  903. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  904. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  905. MyBase.New(info, context)
  906. Me.InitVars
  907. End Sub
  908. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  909. Public ReadOnly Property EnrollmentIDColumn() As Global.System.Data.DataColumn
  910. Get
  911. Return Me.columnEnrollmentID
  912. End Get
  913. End Property
  914. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  915. Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
  916. Get
  917. Return Me.columnCourseID
  918. End Get
  919. End Property
  920. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  921. Public ReadOnly Property StudentIDColumn() As Global.System.Data.DataColumn
  922. Get
  923. Return Me.columnStudentID
  924. End Get
  925. End Property
  926. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  927. Public ReadOnly Property GradeColumn() As Global.System.Data.DataColumn
  928. Get
  929. Return Me.columnGrade
  930. End Get
  931. End Property
  932. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  933. Global.System.ComponentModel.Browsable(false)> _
  934. Public ReadOnly Property Count() As Integer
  935. Get
  936. Return Me.Rows.Count
  937. End Get
  938. End Property
  939. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  940. Public Default ReadOnly Property Item(ByVal index As Integer) As CourseGradeRow
  941. Get
  942. Return CType(Me.Rows(index),CourseGradeRow)
  943. End Get
  944. End Property
  945. Public Event CourseGradeRowChanging As CourseGradeRowChangeEventHandler
  946. Public Event CourseGradeRowChanged As CourseGradeRowChangeEventHandler
  947. Public Event CourseGradeRowDeleting As CourseGradeRowChangeEventHandler
  948. Public Event CourseGradeRowDeleted As CourseGradeRowChangeEventHandler
  949. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  950. Public Overloads Sub AddCourseGradeRow(ByVal row As CourseGradeRow)
  951. Me.Rows.Add(row)
  952. End Sub
  953. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  954. Public Overloads Function AddCourseGradeRow(ByVal parentCourseRowByFK_CourseGrade_Course As CourseRow, ByVal parentPersonRowByFK_CourseGrade_Student As PersonRow, ByVal Grade As Decimal) As CourseGradeRow
  955. Dim rowCourseGradeRow As CourseGradeRow = CType(Me.NewRow,CourseGradeRow)
  956. Dim columnValuesArray() As Object = New Object() {Nothing, Nothing, Nothing, Grade}
  957. If (Not (parentCourseRowByFK_CourseGrade_Course) Is Nothing) Then
  958. columnValuesArray(1) = parentCourseRowByFK_CourseGrade_Course(0)
  959. End If
  960. If (Not (parentPersonRowByFK_CourseGrade_Student) Is Nothing) Then
  961. columnValuesArray(2) = parentPersonRowByFK_CourseGrade_Student(0)
  962. End If
  963. rowCourseGradeRow.ItemArray = columnValuesArray
  964. Me.Rows.Add(rowCourseGradeRow)
  965. Return rowCourseGradeRow
  966. End Function
  967. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  968. Public Function FindByEnrollmentID(ByVal EnrollmentID As Integer) As CourseGradeRow
  969. Return CType(Me.Rows.Find(New Object() {EnrollmentID}),CourseGradeRow)
  970. End Function
  971. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  972. Public Overrides Function Clone() As Global.System.Data.DataTable
  973. Dim cln As CourseGradeDataTable = CType(MyBase.Clone,CourseGradeDataTable)
  974. cln.InitVars
  975. Return cln
  976. End Function
  977. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  978. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  979. Return New CourseGradeDataTable
  980. End Function
  981. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  982. Friend Sub InitVars()
  983. Me.columnEnrollmentID = MyBase.Columns("EnrollmentID")
  984. Me.columnCourseID = MyBase.Columns("CourseID")
  985. Me.columnStudentID = MyBase.Columns("StudentID")
  986. Me.columnGrade = MyBase.Columns("Grade")
  987. End Sub
  988. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  989. Private Sub InitClass()
  990. Me.columnEnrollmentID = New Global.System.Data.DataColumn("EnrollmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  991. MyBase.Columns.Add(Me.columnEnrollmentID)
  992. Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  993. MyBase.Columns.Add(Me.columnCourseID)
  994. Me.columnStudentID = New Global.System.Data.DataColumn("StudentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  995. MyBase.Columns.Add(Me.columnStudentID)
  996. Me.columnGrade = New Global.System.Data.DataColumn("Grade", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
  997. MyBase.Columns.Add(Me.columnGrade)
  998. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnEnrollmentID}, true))
  999. Me.columnEnrollmentID.AutoIncrement = true
  1000. Me.columnEnrollmentID.AutoIncrementSeed = -1
  1001. Me.columnEnrollmentID.AutoIncrementStep = -1
  1002. Me.columnEnrollmentID.AllowDBNull = false
  1003. Me.columnEnrollmentID.ReadOnly = true
  1004. Me.columnEnrollmentID.Unique = true
  1005. Me.columnCourseID.AllowDBNull = false
  1006. Me.columnStudentID.AllowDBNull = false
  1007. End Sub
  1008. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1009. Public Function NewCourseGradeRow() As CourseGradeRow
  1010. Return CType(Me.NewRow,CourseGradeRow)
  1011. End Function
  1012. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1013. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  1014. Return New CourseGradeRow(builder)
  1015. End Function
  1016. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1017. Protected Overrides Function GetRowType() As Global.System.Type
  1018. Return GetType(CourseGradeRow)
  1019. End Function
  1020. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1021. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1022. MyBase.OnRowChanged(e)
  1023. If (Not (Me.CourseGradeRowChangedEvent) Is Nothing) Then
  1024. RaiseEvent CourseGradeRowChanged(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
  1025. End If
  1026. End Sub
  1027. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1028. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1029. MyBase.OnRowChanging(e)
  1030. If (Not (Me.CourseGradeRowChangingEvent) Is Nothing) Then
  1031. RaiseEvent CourseGradeRowChanging(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
  1032. End If
  1033. End Sub
  1034. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1035. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1036. MyBase.OnRowDeleted(e)
  1037. If (Not (Me.CourseGradeRowDeletedEvent) Is Nothing) Then
  1038. RaiseEvent CourseGradeRowDeleted(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
  1039. End If
  1040. End Sub
  1041. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1042. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1043. MyBase.OnRowDeleting(e)
  1044. If (Not (Me.CourseGradeRowDeletingEvent) Is Nothing) Then
  1045. RaiseEvent CourseGradeRowDeleting(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
  1046. End If
  1047. End Sub
  1048. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1049. Public Sub RemoveCourseGradeRow(ByVal row As CourseGradeRow)
  1050. Me.Rows.Remove(row)
  1051. End Sub
  1052. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1053. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  1054. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  1055. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  1056. Dim ds As SchoolDataSet = New SchoolDataSet
  1057. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1058. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  1059. any1.MinOccurs = New Decimal(0)
  1060. any1.MaxOccurs = Decimal.MaxValue
  1061. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1062. sequence.Items.Add(any1)
  1063. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1064. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  1065. any2.MinOccurs = New Decimal(1)
  1066. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1067. sequence.Items.Add(any2)
  1068. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1069. attribute1.Name = "namespace"
  1070. attribute1.FixedValue = ds.Namespace
  1071. type.Attributes.Add(attribute1)
  1072. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1073. attribute2.Name = "tableTypeName"
  1074. attribute2.FixedValue = "CourseGradeDataTable"
  1075. type.Attributes.Add(attribute2)
  1076. type.Particle = sequence
  1077. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  1078. If xs.Contains(dsSchema.TargetNamespace) Then
  1079. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1080. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1081. Try
  1082. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  1083. dsSchema.Write(s1)
  1084. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  1085. Do While schemas.MoveNext
  1086. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  1087. s2.SetLength(0)
  1088. schema.Write(s2)
  1089. If (s1.Length = s2.Length) Then
  1090. s1.Position = 0
  1091. s2.Position = 0
  1092. Do While ((s1.Position <> s1.Length) _
  1093. AndAlso (s1.ReadByte = s2.ReadByte))
  1094. Loop
  1095. If (s1.Position = s1.Length) Then
  1096. Return type
  1097. End If
  1098. End If
  1099. Loop
  1100. Finally
  1101. If (Not (s1) Is Nothing) Then
  1102. s1.Close
  1103. End If
  1104. If (Not (s2) Is Nothing) Then
  1105. s2.Close
  1106. End If
  1107. End Try
  1108. End If
  1109. xs.Add(dsSchema)
  1110. Return type
  1111. End Function
  1112. End Class
  1113. '''<summary>
  1114. '''Represents the strongly named DataTable class.
  1115. '''</summary>
  1116. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  1117. Global.System.Serializable(), _
  1118. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  1119. Partial Public Class CourseInstructorDataTable
  1120. Inherits Global.System.Data.TypedTableBase(Of CourseInstructorRow)
  1121. Private columnCourseID As Global.System.Data.DataColumn
  1122. Private columnPersonID As Global.System.Data.DataColumn
  1123. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1124. Public Sub New()
  1125. MyBase.New
  1126. Me.TableName = "CourseInstructor"
  1127. Me.BeginInit
  1128. Me.InitClass
  1129. Me.EndInit
  1130. End Sub
  1131. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1132. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  1133. MyBase.New
  1134. Me.TableName = table.TableName
  1135. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  1136. Me.CaseSensitive = table.CaseSensitive
  1137. End If
  1138. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  1139. Me.Locale = table.Locale
  1140. End If
  1141. If (table.Namespace <> table.DataSet.Namespace) Then
  1142. Me.Namespace = table.Namespace
  1143. End If
  1144. Me.Prefix = table.Prefix
  1145. Me.MinimumCapacity = table.MinimumCapacity
  1146. End Sub
  1147. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1148. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  1149. MyBase.New(info, context)
  1150. Me.InitVars
  1151. End Sub
  1152. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1153. Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
  1154. Get
  1155. Return Me.columnCourseID
  1156. End Get
  1157. End Property
  1158. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1159. Public ReadOnly Property PersonIDColumn() As Global.System.Data.DataColumn
  1160. Get
  1161. Return Me.columnPersonID
  1162. End Get
  1163. End Property
  1164. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1165. Global.System.ComponentModel.Browsable(false)> _
  1166. Public ReadOnly Property Count() As Integer
  1167. Get
  1168. Return Me.Rows.Count
  1169. End Get
  1170. End Property
  1171. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1172. Public Default ReadOnly Property Item(ByVal index As Integer) As CourseInstructorRow
  1173. Get
  1174. Return CType(Me.Rows(index),CourseInstructorRow)
  1175. End Get
  1176. End Property
  1177. Public Event CourseInstructorRowChanging As CourseInstructorRowChangeEventHandler
  1178. Public Event CourseInstructorRowChanged As CourseInstructorRowChangeEventHandler
  1179. Public Event CourseInstructorRowDeleting As CourseInstructorRowChangeEventHandler
  1180. Public Event CourseInstructorRowDeleted As CourseInstructorRowChangeEventHandler
  1181. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1182. Public Overloads Sub AddCourseInstructorRow(ByVal row As CourseInstructorRow)
  1183. Me.Rows.Add(row)
  1184. End Sub
  1185. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1186. Public Overloads Function AddCourseInstructorRow(ByVal parentCourseRowByFK_CourseInstructor_Course As CourseRow, ByVal parentPersonRowByFK_CourseInstructor_Person As PersonRow) As CourseInstructorRow
  1187. Dim rowCourseInstructorRow As CourseInstructorRow = CType(Me.NewRow,CourseInstructorRow)
  1188. Dim columnValuesArray() As Object = New Object() {Nothing, Nothing}
  1189. If (Not (parentCourseRowByFK_CourseInstructor_Course) Is Nothing) Then
  1190. columnValuesArray(0) = parentCourseRowByFK_CourseInstructor_Course(0)
  1191. End If
  1192. If (Not (parentPersonRowByFK_CourseInstructor_Person) Is Nothing) Then
  1193. columnValuesArray(1) = parentPersonRowByFK_CourseInstructor_Person(0)
  1194. End If
  1195. rowCourseInstructorRow.ItemArray = columnValuesArray
  1196. Me.Rows.Add(rowCourseInstructorRow)
  1197. Return rowCourseInstructorRow
  1198. End Function
  1199. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1200. Public Function FindByCourseIDPersonID(ByVal CourseID As Integer, ByVal PersonID As Integer) As CourseInstructorRow
  1201. Return CType(Me.Rows.Find(New Object() {CourseID, PersonID}),CourseInstructorRow)
  1202. End Function
  1203. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1204. Public Overrides Function Clone() As Global.System.Data.DataTable
  1205. Dim cln As CourseInstructorDataTable = CType(MyBase.Clone,CourseInstructorDataTable)
  1206. cln.InitVars
  1207. Return cln
  1208. End Function
  1209. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1210. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  1211. Return New CourseInstructorDataTable
  1212. End Function
  1213. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1214. Friend Sub InitVars()
  1215. Me.columnCourseID = MyBase.Columns("CourseID")
  1216. Me.columnPersonID = MyBase.Columns("PersonID")
  1217. End Sub
  1218. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1219. Private Sub InitClass()
  1220. Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  1221. MyBase.Columns.Add(Me.columnCourseID)
  1222. Me.columnPersonID = New Global.System.Data.DataColumn("PersonID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  1223. MyBase.Columns.Add(Me.columnPersonID)
  1224. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID, Me.columnPersonID}, true))
  1225. Me.columnCourseID.AllowDBNull = false
  1226. Me.columnPersonID.AllowDBNull = false
  1227. End Sub
  1228. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1229. Public Function NewCourseInstructorRow() As CourseInstructorRow
  1230. Return CType(Me.NewRow,CourseInstructorRow)
  1231. End Function
  1232. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1233. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  1234. Return New CourseInstructorRow(builder)
  1235. End Function
  1236. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1237. Protected Overrides Function GetRowType() As Global.System.Type
  1238. Return GetType(CourseInstructorRow)
  1239. End Function
  1240. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1241. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1242. MyBase.OnRowChanged(e)
  1243. If (Not (Me.CourseInstructorRowChangedEvent) Is Nothing) Then
  1244. RaiseEvent CourseInstructorRowChanged(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
  1245. End If
  1246. End Sub
  1247. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1248. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1249. MyBase.OnRowChanging(e)
  1250. If (Not (Me.CourseInstructorRowChangingEvent) Is Nothing) Then
  1251. RaiseEvent CourseInstructorRowChanging(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
  1252. End If
  1253. End Sub
  1254. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1255. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1256. MyBase.OnRowDeleted(e)
  1257. If (Not (Me.CourseInstructorRowDeletedEvent) Is Nothing) Then
  1258. RaiseEvent CourseInstructorRowDeleted(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
  1259. End If
  1260. End Sub
  1261. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1262. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1263. MyBase.OnRowDeleting(e)
  1264. If (Not (Me.CourseInstructorRowDeletingEvent) Is Nothing) Then
  1265. RaiseEvent CourseInstructorRowDeleting(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
  1266. End If
  1267. End Sub
  1268. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1269. Public Sub RemoveCourseInstructorRow(ByVal row As CourseInstructorRow)
  1270. Me.Rows.Remove(row)
  1271. End Sub
  1272. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1273. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  1274. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  1275. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  1276. Dim ds As SchoolDataSet = New SchoolDataSet
  1277. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1278. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  1279. any1.MinOccurs = New Decimal(0)
  1280. any1.MaxOccurs = Decimal.MaxValue
  1281. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1282. sequence.Items.Add(any1)
  1283. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1284. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  1285. any2.MinOccurs = New Decimal(1)
  1286. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1287. sequence.Items.Add(any2)
  1288. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1289. attribute1.Name = "namespace"
  1290. attribute1.FixedValue = ds.Namespace
  1291. type.Attributes.Add(attribute1)
  1292. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1293. attribute2.Name = "tableTypeName"
  1294. attribute2.FixedValue = "CourseInstructorDataTable"
  1295. type.Attributes.Add(attribute2)
  1296. type.Particle = sequence
  1297. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  1298. If xs.Contains(dsSchema.TargetNamespace) Then
  1299. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1300. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1301. Try
  1302. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  1303. dsSchema.Write(s1)
  1304. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  1305. Do While schemas.MoveNext
  1306. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  1307. s2.SetLength(0)
  1308. schema.Write(s2)
  1309. If (s1.Length = s2.Length) Then
  1310. s1.Position = 0
  1311. s2.Position = 0
  1312. Do While ((s1.Position <> s1.Length) _
  1313. AndAlso (s1.ReadByte = s2.ReadByte))
  1314. Loop
  1315. If (s1.Position = s1.Length) Then
  1316. Return type
  1317. End If
  1318. End If
  1319. Loop
  1320. Finally
  1321. If (Not (s1) Is Nothing) Then
  1322. s1.Close
  1323. End If
  1324. If (Not (s2) Is Nothing) Then
  1325. s2.Close
  1326. End If
  1327. End Try
  1328. End If
  1329. xs.Add(dsSchema)
  1330. Return type
  1331. End Function
  1332. End Class
  1333. '''<summary>
  1334. '''Represents the strongly named DataTable class.
  1335. '''</summary>
  1336. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  1337. Global.System.Serializable(), _
  1338. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  1339. Partial Public Class DepartmentDataTable
  1340. Inherits Global.System.Data.TypedTableBase(Of DepartmentRow)
  1341. Private columnDepartmentID As Global.System.Data.DataColumn
  1342. Private columnName As Global.System.Data.DataColumn
  1343. Private columnBudget As Global.System.Data.DataColumn
  1344. Private columnStartDate As Global.System.Data.DataColumn
  1345. Private columnAdministrator As Global.System.Data.DataColumn
  1346. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1347. Public Sub New()
  1348. MyBase.New
  1349. Me.TableName = "Department"
  1350. Me.BeginInit
  1351. Me.InitClass
  1352. Me.EndInit
  1353. End Sub
  1354. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1355. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  1356. MyBase.New
  1357. Me.TableName = table.TableName
  1358. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  1359. Me.CaseSensitive = table.CaseSensitive
  1360. End If
  1361. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  1362. Me.Locale = table.Locale
  1363. End If
  1364. If (table.Namespace <> table.DataSet.Namespace) Then
  1365. Me.Namespace = table.Namespace
  1366. End If
  1367. Me.Prefix = table.Prefix
  1368. Me.MinimumCapacity = table.MinimumCapacity
  1369. End Sub
  1370. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1371. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  1372. MyBase.New(info, context)
  1373. Me.InitVars
  1374. End Sub
  1375. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1376. Public ReadOnly Property DepartmentIDColumn() As Global.System.Data.DataColumn
  1377. Get
  1378. Return Me.columnDepartmentID
  1379. End Get
  1380. End Property
  1381. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1382. Public ReadOnly Property NameColumn() As Global.System.Data.DataColumn
  1383. Get
  1384. Return Me.columnName
  1385. End Get
  1386. End Property
  1387. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1388. Public ReadOnly Property BudgetColumn() As Global.System.Data.DataColumn
  1389. Get
  1390. Return Me.columnBudget
  1391. End Get
  1392. End Property
  1393. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1394. Public ReadOnly Property StartDateColumn() As Global.System.Data.DataColumn
  1395. Get
  1396. Return Me.columnStartDate
  1397. End Get
  1398. End Property
  1399. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1400. Public ReadOnly Property AdministratorColumn() As Global.System.Data.DataColumn
  1401. Get
  1402. Return Me.columnAdministrator
  1403. End Get
  1404. End Property
  1405. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1406. Global.System.ComponentModel.Browsable(false)> _
  1407. Public ReadOnly Property Count() As Integer
  1408. Get
  1409. Return Me.Rows.Count
  1410. End Get
  1411. End Property
  1412. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1413. Public Default ReadOnly Property Item(ByVal index As Integer) As DepartmentRow
  1414. Get
  1415. Return CType(Me.Rows(index),DepartmentRow)
  1416. End Get
  1417. End Property
  1418. Public Event DepartmentRowChanging As DepartmentRowChangeEventHandler
  1419. Public Event DepartmentRowChanged As DepartmentRowChangeEventHandler
  1420. Public Event DepartmentRowDeleting As DepartmentRowChangeEventHandler
  1421. Public Event DepartmentRowDeleted As DepartmentRowChangeEventHandler
  1422. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1423. Public Overloads Sub AddDepartmentRow(ByVal row As DepartmentRow)
  1424. Me.Rows.Add(row)
  1425. End Sub
  1426. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1427. 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
  1428. Dim rowDepartmentRow As DepartmentRow = CType(Me.NewRow,DepartmentRow)
  1429. Dim columnValuesArray() As Object = New Object() {DepartmentID, Name, Budget, StartDate, Administrator}
  1430. rowDepartmentRow.ItemArray = columnValuesArray
  1431. Me.Rows.Add(rowDepartmentRow)
  1432. Return rowDepartmentRow
  1433. End Function
  1434. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1435. Public Function FindByDepartmentID(ByVal DepartmentID As Integer) As DepartmentRow
  1436. Return CType(Me.Rows.Find(New Object() {DepartmentID}),DepartmentRow)
  1437. End Function
  1438. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1439. Public Overrides Function Clone() As Global.System.Data.DataTable
  1440. Dim cln As DepartmentDataTable = CType(MyBase.Clone,DepartmentDataTable)
  1441. cln.InitVars
  1442. Return cln
  1443. End Function
  1444. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1445. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  1446. Return New DepartmentDataTable
  1447. End Function
  1448. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1449. Friend Sub InitVars()
  1450. Me.columnDepartmentID = MyBase.Columns("DepartmentID")
  1451. Me.columnName = MyBase.Columns("Name")
  1452. Me.columnBudget = MyBase.Columns("Budget")
  1453. Me.columnStartDate = MyBase.Columns("StartDate")
  1454. Me.columnAdministrator = MyBase.Columns("Administrator")
  1455. End Sub
  1456. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1457. Private Sub InitClass()
  1458. Me.columnDepartmentID = New Global.System.Data.DataColumn("DepartmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  1459. MyBase.Columns.Add(Me.columnDepartmentID)
  1460. Me.columnName = New Global.System.Data.DataColumn("Name", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1461. MyBase.Columns.Add(Me.columnName)
  1462. Me.columnBudget = New Global.System.Data.DataColumn("Budget", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
  1463. MyBase.Columns.Add(Me.columnBudget)
  1464. Me.columnStartDate = New Global.System.Data.DataColumn("StartDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
  1465. MyBase.Columns.Add(Me.columnStartDate)
  1466. Me.columnAdministrator = New Global.System.Data.DataColumn("Administrator", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  1467. MyBase.Columns.Add(Me.columnAdministrator)
  1468. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnDepartmentID}, true))
  1469. Me.columnDepartmentID.AllowDBNull = false
  1470. Me.columnDepartmentID.Unique = true
  1471. Me.columnName.AllowDBNull = false
  1472. Me.columnName.MaxLength = 50
  1473. Me.columnBudget.AllowDBNull = false
  1474. Me.columnStartDate.AllowDBNull = false
  1475. End Sub
  1476. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1477. Public Function NewDepartmentRow() As DepartmentRow
  1478. Return CType(Me.NewRow,DepartmentRow)
  1479. End Function
  1480. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1481. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  1482. Return New DepartmentRow(builder)
  1483. End Function
  1484. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1485. Protected Overrides Function GetRowType() As Global.System.Type
  1486. Return GetType(DepartmentRow)
  1487. End Function
  1488. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1489. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1490. MyBase.OnRowChanged(e)
  1491. If (Not (Me.DepartmentRowChangedEvent) Is Nothing) Then
  1492. RaiseEvent DepartmentRowChanged(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
  1493. End If
  1494. End Sub
  1495. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1496. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1497. MyBase.OnRowChanging(e)
  1498. If (Not (Me.DepartmentRowChangingEvent) Is Nothing) Then
  1499. RaiseEvent DepartmentRowChanging(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
  1500. End If
  1501. End Sub
  1502. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1503. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1504. MyBase.OnRowDeleted(e)
  1505. If (Not (Me.DepartmentRowDeletedEvent) Is Nothing) Then
  1506. RaiseEvent DepartmentRowDeleted(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
  1507. End If
  1508. End Sub
  1509. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1510. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1511. MyBase.OnRowDeleting(e)
  1512. If (Not (Me.DepartmentRowDeletingEvent) Is Nothing) Then
  1513. RaiseEvent DepartmentRowDeleting(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
  1514. End If
  1515. End Sub
  1516. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1517. Public Sub RemoveDepartmentRow(ByVal row As DepartmentRow)
  1518. Me.Rows.Remove(row)
  1519. End Sub
  1520. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1521. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  1522. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  1523. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  1524. Dim ds As SchoolDataSet = New SchoolDataSet
  1525. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1526. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  1527. any1.MinOccurs = New Decimal(0)
  1528. any1.MaxOccurs = Decimal.MaxValue
  1529. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1530. sequence.Items.Add(any1)
  1531. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1532. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  1533. any2.MinOccurs = New Decimal(1)
  1534. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1535. sequence.Items.Add(any2)
  1536. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1537. attribute1.Name = "namespace"
  1538. attribute1.FixedValue = ds.Namespace
  1539. type.Attributes.Add(attribute1)
  1540. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1541. attribute2.Name = "tableTypeName"
  1542. attribute2.FixedValue = "DepartmentDataTable"
  1543. type.Attributes.Add(attribute2)
  1544. type.Particle = sequence
  1545. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  1546. If xs.Contains(dsSchema.TargetNamespace) Then
  1547. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1548. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1549. Try
  1550. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  1551. dsSchema.Write(s1)
  1552. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  1553. Do While schemas.MoveNext
  1554. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  1555. s2.SetLength(0)
  1556. schema.Write(s2)
  1557. If (s1.Length = s2.Length) Then
  1558. s1.Position = 0
  1559. s2.Position = 0
  1560. Do While ((s1.Position <> s1.Length) _
  1561. AndAlso (s1.ReadByte = s2.ReadByte))
  1562. Loop
  1563. If (s1.Position = s1.Length) Then
  1564. Return type
  1565. End If
  1566. End If
  1567. Loop
  1568. Finally
  1569. If (Not (s1) Is Nothing) Then
  1570. s1.Close
  1571. End If
  1572. If (Not (s2) Is Nothing) Then
  1573. s2.Close
  1574. End If
  1575. End Try
  1576. End If
  1577. xs.Add(dsSchema)
  1578. Return type
  1579. End Function
  1580. End Class
  1581. '''<summary>
  1582. '''Represents the strongly named DataTable class.
  1583. '''</summary>
  1584. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  1585. Global.System.Serializable(), _
  1586. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  1587. Partial Public Class OfficeAssignmentDataTable
  1588. Inherits Global.System.Data.TypedTableBase(Of OfficeAssignmentRow)
  1589. Private columnInstructorID As Global.System.Data.DataColumn
  1590. Private columnLocation As Global.System.Data.DataColumn
  1591. Private columnTimestamp As Global.System.Data.DataColumn
  1592. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1593. Public Sub New()
  1594. MyBase.New
  1595. Me.TableName = "OfficeAssignment"
  1596. Me.BeginInit
  1597. Me.InitClass
  1598. Me.EndInit
  1599. End Sub
  1600. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1601. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  1602. MyBase.New
  1603. Me.TableName = table.TableName
  1604. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  1605. Me.CaseSensitive = table.CaseSensitive
  1606. End If
  1607. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  1608. Me.Locale = table.Locale
  1609. End If
  1610. If (table.Namespace <> table.DataSet.Namespace) Then
  1611. Me.Namespace = table.Namespace
  1612. End If
  1613. Me.Prefix = table.Prefix
  1614. Me.MinimumCapacity = table.MinimumCapacity
  1615. End Sub
  1616. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1617. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  1618. MyBase.New(info, context)
  1619. Me.InitVars
  1620. End Sub
  1621. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1622. Public ReadOnly Property InstructorIDColumn() As Global.System.Data.DataColumn
  1623. Get
  1624. Return Me.columnInstructorID
  1625. End Get
  1626. End Property
  1627. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1628. Public ReadOnly Property LocationColumn() As Global.System.Data.DataColumn
  1629. Get
  1630. Return Me.columnLocation
  1631. End Get
  1632. End Property
  1633. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1634. Public ReadOnly Property TimestampColumn() As Global.System.Data.DataColumn
  1635. Get
  1636. Return Me.columnTimestamp
  1637. End Get
  1638. End Property
  1639. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1640. Global.System.ComponentModel.Browsable(false)> _
  1641. Public ReadOnly Property Count() As Integer
  1642. Get
  1643. Return Me.Rows.Count
  1644. End Get
  1645. End Property
  1646. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1647. Public Default ReadOnly Property Item(ByVal index As Integer) As OfficeAssignmentRow
  1648. Get
  1649. Return CType(Me.Rows(index),OfficeAssignmentRow)
  1650. End Get
  1651. End Property
  1652. Public Event OfficeAssignmentRowChanging As OfficeAssignmentRowChangeEventHandler
  1653. Public Event OfficeAssignmentRowChanged As OfficeAssignmentRowChangeEventHandler
  1654. Public Event OfficeAssignmentRowDeleting As OfficeAssignmentRowChangeEventHandler
  1655. Public Event OfficeAssignmentRowDeleted As OfficeAssignmentRowChangeEventHandler
  1656. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1657. Public Overloads Sub AddOfficeAssignmentRow(ByVal row As OfficeAssignmentRow)
  1658. Me.Rows.Add(row)
  1659. End Sub
  1660. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1661. Public Overloads Function AddOfficeAssignmentRow(ByVal parentPersonRowByFK_OfficeAssignment_Person As PersonRow, ByVal Location As String, ByVal Timestamp() As Byte) As OfficeAssignmentRow
  1662. Dim rowOfficeAssignmentRow As OfficeAssignmentRow = CType(Me.NewRow,OfficeAssignmentRow)
  1663. Dim columnValuesArray() As Object = New Object() {Nothing, Location, Timestamp}
  1664. If (Not (parentPersonRowByFK_OfficeAssignment_Person) Is Nothing) Then
  1665. columnValuesArray(0) = parentPersonRowByFK_OfficeAssignment_Person(0)
  1666. End If
  1667. rowOfficeAssignmentRow.ItemArray = columnValuesArray
  1668. Me.Rows.Add(rowOfficeAssignmentRow)
  1669. Return rowOfficeAssignmentRow
  1670. End Function
  1671. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1672. Public Function FindByInstructorID(ByVal InstructorID As Integer) As OfficeAssignmentRow
  1673. Return CType(Me.Rows.Find(New Object() {InstructorID}),OfficeAssignmentRow)
  1674. End Function
  1675. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1676. Public Overrides Function Clone() As Global.System.Data.DataTable
  1677. Dim cln As OfficeAssignmentDataTable = CType(MyBase.Clone,OfficeAssignmentDataTable)
  1678. cln.InitVars
  1679. Return cln
  1680. End Function
  1681. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1682. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  1683. Return New OfficeAssignmentDataTable
  1684. End Function
  1685. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1686. Friend Sub InitVars()
  1687. Me.columnInstructorID = MyBase.Columns("InstructorID")
  1688. Me.columnLocation = MyBase.Columns("Location")
  1689. Me.columnTimestamp = MyBase.Columns("Timestamp")
  1690. End Sub
  1691. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1692. Private Sub InitClass()
  1693. Me.columnInstructorID = New Global.System.Data.DataColumn("InstructorID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  1694. MyBase.Columns.Add(Me.columnInstructorID)
  1695. Me.columnLocation = New Global.System.Data.DataColumn("Location", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1696. MyBase.Columns.Add(Me.columnLocation)
  1697. Me.columnTimestamp = New Global.System.Data.DataColumn("Timestamp", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
  1698. MyBase.Columns.Add(Me.columnTimestamp)
  1699. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnInstructorID}, true))
  1700. Me.columnInstructorID.AllowDBNull = false
  1701. Me.columnInstructorID.Unique = true
  1702. Me.columnLocation.AllowDBNull = false
  1703. Me.columnLocation.MaxLength = 50
  1704. Me.columnTimestamp.ReadOnly = true
  1705. End Sub
  1706. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1707. Public Function NewOfficeAssignmentRow() As OfficeAssignmentRow
  1708. Return CType(Me.NewRow,OfficeAssignmentRow)
  1709. End Function
  1710. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1711. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  1712. Return New OfficeAssignmentRow(builder)
  1713. End Function
  1714. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1715. Protected Overrides Function GetRowType() As Global.System.Type
  1716. Return GetType(OfficeAssignmentRow)
  1717. End Function
  1718. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1719. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1720. MyBase.OnRowChanged(e)
  1721. If (Not (Me.OfficeAssignmentRowChangedEvent) Is Nothing) Then
  1722. RaiseEvent OfficeAssignmentRowChanged(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
  1723. End If
  1724. End Sub
  1725. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1726. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1727. MyBase.OnRowChanging(e)
  1728. If (Not (Me.OfficeAssignmentRowChangingEvent) Is Nothing) Then
  1729. RaiseEvent OfficeAssignmentRowChanging(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
  1730. End If
  1731. End Sub
  1732. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1733. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1734. MyBase.OnRowDeleted(e)
  1735. If (Not (Me.OfficeAssignmentRowDeletedEvent) Is Nothing) Then
  1736. RaiseEvent OfficeAssignmentRowDeleted(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
  1737. End If
  1738. End Sub
  1739. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1740. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1741. MyBase.OnRowDeleting(e)
  1742. If (Not (Me.OfficeAssignmentRowDeletingEvent) Is Nothing) Then
  1743. RaiseEvent OfficeAssignmentRowDeleting(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
  1744. End If
  1745. End Sub
  1746. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1747. Public Sub RemoveOfficeAssignmentRow(ByVal row As OfficeAssignmentRow)
  1748. Me.Rows.Remove(row)
  1749. End Sub
  1750. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1751. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  1752. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  1753. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  1754. Dim ds As SchoolDataSet = New SchoolDataSet
  1755. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1756. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  1757. any1.MinOccurs = New Decimal(0)
  1758. any1.MaxOccurs = Decimal.MaxValue
  1759. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1760. sequence.Items.Add(any1)
  1761. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1762. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  1763. any2.MinOccurs = New Decimal(1)
  1764. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1765. sequence.Items.Add(any2)
  1766. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1767. attribute1.Name = "namespace"
  1768. attribute1.FixedValue = ds.Namespace
  1769. type.Attributes.Add(attribute1)
  1770. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1771. attribute2.Name = "tableTypeName"
  1772. attribute2.FixedValue = "OfficeAssignmentDataTable"
  1773. type.Attributes.Add(attribute2)
  1774. type.Particle = sequence
  1775. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  1776. If xs.Contains(dsSchema.TargetNamespace) Then
  1777. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1778. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1779. Try
  1780. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  1781. dsSchema.Write(s1)
  1782. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  1783. Do While schemas.MoveNext
  1784. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  1785. s2.SetLength(0)
  1786. schema.Write(s2)
  1787. If (s1.Length = s2.Length) Then
  1788. s1.Position = 0
  1789. s2.Position = 0
  1790. Do While ((s1.Position <> s1.Length) _
  1791. AndAlso (s1.ReadByte = s2.ReadByte))
  1792. Loop
  1793. If (s1.Position = s1.Length) Then
  1794. Return type
  1795. End If
  1796. End If
  1797. Loop
  1798. Finally
  1799. If (Not (s1) Is Nothing) Then
  1800. s1.Close
  1801. End If
  1802. If (Not (s2) Is Nothing) Then
  1803. s2.Close
  1804. End If
  1805. End Try
  1806. End If
  1807. xs.Add(dsSchema)
  1808. Return type
  1809. End Function
  1810. End Class
  1811. '''<summary>
  1812. '''Represents the strongly named DataTable class.
  1813. '''</summary>
  1814. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  1815. Global.System.Serializable(), _
  1816. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  1817. Partial Public Class OnlineCourseDataTable
  1818. Inherits Global.System.Data.TypedTableBase(Of OnlineCourseRow)
  1819. Private columnCourseID As Global.System.Data.DataColumn
  1820. Private columnURL As Global.System.Data.DataColumn
  1821. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1822. Public Sub New()
  1823. MyBase.New
  1824. Me.TableName = "OnlineCourse"
  1825. Me.BeginInit
  1826. Me.InitClass
  1827. Me.EndInit
  1828. End Sub
  1829. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1830. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  1831. MyBase.New
  1832. Me.TableName = table.TableName
  1833. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  1834. Me.CaseSensitive = table.CaseSensitive
  1835. End If
  1836. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  1837. Me.Locale = table.Locale
  1838. End If
  1839. If (table.Namespace <> table.DataSet.Namespace) Then
  1840. Me.Namespace = table.Namespace
  1841. End If
  1842. Me.Prefix = table.Prefix
  1843. Me.MinimumCapacity = table.MinimumCapacity
  1844. End Sub
  1845. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1846. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  1847. MyBase.New(info, context)
  1848. Me.InitVars
  1849. End Sub
  1850. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1851. Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
  1852. Get
  1853. Return Me.columnCourseID
  1854. End Get
  1855. End Property
  1856. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1857. Public ReadOnly Property URLColumn() As Global.System.Data.DataColumn
  1858. Get
  1859. Return Me.columnURL
  1860. End Get
  1861. End Property
  1862. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  1863. Global.System.ComponentModel.Browsable(false)> _
  1864. Public ReadOnly Property Count() As Integer
  1865. Get
  1866. Return Me.Rows.Count
  1867. End Get
  1868. End Property
  1869. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1870. Public Default ReadOnly Property Item(ByVal index As Integer) As OnlineCourseRow
  1871. Get
  1872. Return CType(Me.Rows(index),OnlineCourseRow)
  1873. End Get
  1874. End Property
  1875. Public Event OnlineCourseRowChanging As OnlineCourseRowChangeEventHandler
  1876. Public Event OnlineCourseRowChanged As OnlineCourseRowChangeEventHandler
  1877. Public Event OnlineCourseRowDeleting As OnlineCourseRowChangeEventHandler
  1878. Public Event OnlineCourseRowDeleted As OnlineCourseRowChangeEventHandler
  1879. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1880. Public Overloads Sub AddOnlineCourseRow(ByVal row As OnlineCourseRow)
  1881. Me.Rows.Add(row)
  1882. End Sub
  1883. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1884. Public Overloads Function AddOnlineCourseRow(ByVal parentCourseRowByFK_OnlineCourse_Course As CourseRow, ByVal URL As String) As OnlineCourseRow
  1885. Dim rowOnlineCourseRow As OnlineCourseRow = CType(Me.NewRow,OnlineCourseRow)
  1886. Dim columnValuesArray() As Object = New Object() {Nothing, URL}
  1887. If (Not (parentCourseRowByFK_OnlineCourse_Course) Is Nothing) Then
  1888. columnValuesArray(0) = parentCourseRowByFK_OnlineCourse_Course(0)
  1889. End If
  1890. rowOnlineCourseRow.ItemArray = columnValuesArray
  1891. Me.Rows.Add(rowOnlineCourseRow)
  1892. Return rowOnlineCourseRow
  1893. End Function
  1894. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1895. Public Function FindByCourseID(ByVal CourseID As Integer) As OnlineCourseRow
  1896. Return CType(Me.Rows.Find(New Object() {CourseID}),OnlineCourseRow)
  1897. End Function
  1898. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1899. Public Overrides Function Clone() As Global.System.Data.DataTable
  1900. Dim cln As OnlineCourseDataTable = CType(MyBase.Clone,OnlineCourseDataTable)
  1901. cln.InitVars
  1902. Return cln
  1903. End Function
  1904. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1905. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  1906. Return New OnlineCourseDataTable
  1907. End Function
  1908. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1909. Friend Sub InitVars()
  1910. Me.columnCourseID = MyBase.Columns("CourseID")
  1911. Me.columnURL = MyBase.Columns("URL")
  1912. End Sub
  1913. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1914. Private Sub InitClass()
  1915. Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  1916. MyBase.Columns.Add(Me.columnCourseID)
  1917. Me.columnURL = New Global.System.Data.DataColumn("URL", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  1918. MyBase.Columns.Add(Me.columnURL)
  1919. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID}, true))
  1920. Me.columnCourseID.AllowDBNull = false
  1921. Me.columnCourseID.Unique = true
  1922. Me.columnURL.AllowDBNull = false
  1923. Me.columnURL.MaxLength = 100
  1924. End Sub
  1925. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1926. Public Function NewOnlineCourseRow() As OnlineCourseRow
  1927. Return CType(Me.NewRow,OnlineCourseRow)
  1928. End Function
  1929. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1930. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  1931. Return New OnlineCourseRow(builder)
  1932. End Function
  1933. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1934. Protected Overrides Function GetRowType() As Global.System.Type
  1935. Return GetType(OnlineCourseRow)
  1936. End Function
  1937. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1938. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1939. MyBase.OnRowChanged(e)
  1940. If (Not (Me.OnlineCourseRowChangedEvent) Is Nothing) Then
  1941. RaiseEvent OnlineCourseRowChanged(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
  1942. End If
  1943. End Sub
  1944. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1945. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1946. MyBase.OnRowChanging(e)
  1947. If (Not (Me.OnlineCourseRowChangingEvent) Is Nothing) Then
  1948. RaiseEvent OnlineCourseRowChanging(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
  1949. End If
  1950. End Sub
  1951. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1952. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1953. MyBase.OnRowDeleted(e)
  1954. If (Not (Me.OnlineCourseRowDeletedEvent) Is Nothing) Then
  1955. RaiseEvent OnlineCourseRowDeleted(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
  1956. End If
  1957. End Sub
  1958. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1959. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  1960. MyBase.OnRowDeleting(e)
  1961. If (Not (Me.OnlineCourseRowDeletingEvent) Is Nothing) Then
  1962. RaiseEvent OnlineCourseRowDeleting(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
  1963. End If
  1964. End Sub
  1965. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1966. Public Sub RemoveOnlineCourseRow(ByVal row As OnlineCourseRow)
  1967. Me.Rows.Remove(row)
  1968. End Sub
  1969. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  1970. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  1971. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  1972. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  1973. Dim ds As SchoolDataSet = New SchoolDataSet
  1974. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1975. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  1976. any1.MinOccurs = New Decimal(0)
  1977. any1.MaxOccurs = Decimal.MaxValue
  1978. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1979. sequence.Items.Add(any1)
  1980. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  1981. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  1982. any2.MinOccurs = New Decimal(1)
  1983. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  1984. sequence.Items.Add(any2)
  1985. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1986. attribute1.Name = "namespace"
  1987. attribute1.FixedValue = ds.Namespace
  1988. type.Attributes.Add(attribute1)
  1989. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  1990. attribute2.Name = "tableTypeName"
  1991. attribute2.FixedValue = "OnlineCourseDataTable"
  1992. type.Attributes.Add(attribute2)
  1993. type.Particle = sequence
  1994. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  1995. If xs.Contains(dsSchema.TargetNamespace) Then
  1996. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1997. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  1998. Try
  1999. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  2000. dsSchema.Write(s1)
  2001. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  2002. Do While schemas.MoveNext
  2003. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  2004. s2.SetLength(0)
  2005. schema.Write(s2)
  2006. If (s1.Length = s2.Length) Then
  2007. s1.Position = 0
  2008. s2.Position = 0
  2009. Do While ((s1.Position <> s1.Length) _
  2010. AndAlso (s1.ReadByte = s2.ReadByte))
  2011. Loop
  2012. If (s1.Position = s1.Length) Then
  2013. Return type
  2014. End If
  2015. End If
  2016. Loop
  2017. Finally
  2018. If (Not (s1) Is Nothing) Then
  2019. s1.Close
  2020. End If
  2021. If (Not (s2) Is Nothing) Then
  2022. s2.Close
  2023. End If
  2024. End Try
  2025. End If
  2026. xs.Add(dsSchema)
  2027. Return type
  2028. End Function
  2029. End Class
  2030. '''<summary>
  2031. '''Represents the strongly named DataTable class.
  2032. '''</summary>
  2033. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  2034. Global.System.Serializable(), _
  2035. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  2036. Partial Public Class OnsiteCourseDataTable
  2037. Inherits Global.System.Data.TypedTableBase(Of OnsiteCourseRow)
  2038. Private columnCourseID As Global.System.Data.DataColumn
  2039. Private columnLocation As Global.System.Data.DataColumn
  2040. Private columnDays As Global.System.Data.DataColumn
  2041. Private columnTime As Global.System.Data.DataColumn
  2042. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2043. Public Sub New()
  2044. MyBase.New
  2045. Me.TableName = "OnsiteCourse"
  2046. Me.BeginInit
  2047. Me.InitClass
  2048. Me.EndInit
  2049. End Sub
  2050. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2051. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  2052. MyBase.New
  2053. Me.TableName = table.TableName
  2054. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  2055. Me.CaseSensitive = table.CaseSensitive
  2056. End If
  2057. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  2058. Me.Locale = table.Locale
  2059. End If
  2060. If (table.Namespace <> table.DataSet.Namespace) Then
  2061. Me.Namespace = table.Namespace
  2062. End If
  2063. Me.Prefix = table.Prefix
  2064. Me.MinimumCapacity = table.MinimumCapacity
  2065. End Sub
  2066. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2067. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  2068. MyBase.New(info, context)
  2069. Me.InitVars
  2070. End Sub
  2071. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2072. Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
  2073. Get
  2074. Return Me.columnCourseID
  2075. End Get
  2076. End Property
  2077. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2078. Public ReadOnly Property LocationColumn() As Global.System.Data.DataColumn
  2079. Get
  2080. Return Me.columnLocation
  2081. End Get
  2082. End Property
  2083. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2084. Public ReadOnly Property DaysColumn() As Global.System.Data.DataColumn
  2085. Get
  2086. Return Me.columnDays
  2087. End Get
  2088. End Property
  2089. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2090. Public ReadOnly Property TimeColumn() As Global.System.Data.DataColumn
  2091. Get
  2092. Return Me.columnTime
  2093. End Get
  2094. End Property
  2095. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2096. Global.System.ComponentModel.Browsable(false)> _
  2097. Public ReadOnly Property Count() As Integer
  2098. Get
  2099. Return Me.Rows.Count
  2100. End Get
  2101. End Property
  2102. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2103. Public Default ReadOnly Property Item(ByVal index As Integer) As OnsiteCourseRow
  2104. Get
  2105. Return CType(Me.Rows(index),OnsiteCourseRow)
  2106. End Get
  2107. End Property
  2108. Public Event OnsiteCourseRowChanging As OnsiteCourseRowChangeEventHandler
  2109. Public Event OnsiteCourseRowChanged As OnsiteCourseRowChangeEventHandler
  2110. Public Event OnsiteCourseRowDeleting As OnsiteCourseRowChangeEventHandler
  2111. Public Event OnsiteCourseRowDeleted As OnsiteCourseRowChangeEventHandler
  2112. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2113. Public Overloads Sub AddOnsiteCourseRow(ByVal row As OnsiteCourseRow)
  2114. Me.Rows.Add(row)
  2115. End Sub
  2116. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2117. Public Overloads Function AddOnsiteCourseRow(ByVal parentCourseRowByFK_OnsiteCourse_Course As CourseRow, ByVal Location As String, ByVal Days As String, ByVal Time As Date) As OnsiteCourseRow
  2118. Dim rowOnsiteCourseRow As OnsiteCourseRow = CType(Me.NewRow,OnsiteCourseRow)
  2119. Dim columnValuesArray() As Object = New Object() {Nothing, Location, Days, Time}
  2120. If (Not (parentCourseRowByFK_OnsiteCourse_Course) Is Nothing) Then
  2121. columnValuesArray(0) = parentCourseRowByFK_OnsiteCourse_Course(0)
  2122. End If
  2123. rowOnsiteCourseRow.ItemArray = columnValuesArray
  2124. Me.Rows.Add(rowOnsiteCourseRow)
  2125. Return rowOnsiteCourseRow
  2126. End Function
  2127. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2128. Public Function FindByCourseID(ByVal CourseID As Integer) As OnsiteCourseRow
  2129. Return CType(Me.Rows.Find(New Object() {CourseID}),OnsiteCourseRow)
  2130. End Function
  2131. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2132. Public Overrides Function Clone() As Global.System.Data.DataTable
  2133. Dim cln As OnsiteCourseDataTable = CType(MyBase.Clone,OnsiteCourseDataTable)
  2134. cln.InitVars
  2135. Return cln
  2136. End Function
  2137. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2138. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  2139. Return New OnsiteCourseDataTable
  2140. End Function
  2141. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2142. Friend Sub InitVars()
  2143. Me.columnCourseID = MyBase.Columns("CourseID")
  2144. Me.columnLocation = MyBase.Columns("Location")
  2145. Me.columnDays = MyBase.Columns("Days")
  2146. Me.columnTime = MyBase.Columns("Time")
  2147. End Sub
  2148. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2149. Private Sub InitClass()
  2150. Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  2151. MyBase.Columns.Add(Me.columnCourseID)
  2152. Me.columnLocation = New Global.System.Data.DataColumn("Location", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  2153. MyBase.Columns.Add(Me.columnLocation)
  2154. Me.columnDays = New Global.System.Data.DataColumn("Days", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  2155. MyBase.Columns.Add(Me.columnDays)
  2156. Me.columnTime = New Global.System.Data.DataColumn("Time", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
  2157. MyBase.Columns.Add(Me.columnTime)
  2158. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID}, true))
  2159. Me.columnCourseID.AllowDBNull = false
  2160. Me.columnCourseID.Unique = true
  2161. Me.columnLocation.AllowDBNull = false
  2162. Me.columnLocation.MaxLength = 50
  2163. Me.columnDays.AllowDBNull = false
  2164. Me.columnDays.MaxLength = 50
  2165. Me.columnTime.AllowDBNull = false
  2166. End Sub
  2167. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2168. Public Function NewOnsiteCourseRow() As OnsiteCourseRow
  2169. Return CType(Me.NewRow,OnsiteCourseRow)
  2170. End Function
  2171. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2172. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  2173. Return New OnsiteCourseRow(builder)
  2174. End Function
  2175. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2176. Protected Overrides Function GetRowType() As Global.System.Type
  2177. Return GetType(OnsiteCourseRow)
  2178. End Function
  2179. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2180. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2181. MyBase.OnRowChanged(e)
  2182. If (Not (Me.OnsiteCourseRowChangedEvent) Is Nothing) Then
  2183. RaiseEvent OnsiteCourseRowChanged(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
  2184. End If
  2185. End Sub
  2186. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2187. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2188. MyBase.OnRowChanging(e)
  2189. If (Not (Me.OnsiteCourseRowChangingEvent) Is Nothing) Then
  2190. RaiseEvent OnsiteCourseRowChanging(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
  2191. End If
  2192. End Sub
  2193. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2194. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2195. MyBase.OnRowDeleted(e)
  2196. If (Not (Me.OnsiteCourseRowDeletedEvent) Is Nothing) Then
  2197. RaiseEvent OnsiteCourseRowDeleted(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
  2198. End If
  2199. End Sub
  2200. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2201. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2202. MyBase.OnRowDeleting(e)
  2203. If (Not (Me.OnsiteCourseRowDeletingEvent) Is Nothing) Then
  2204. RaiseEvent OnsiteCourseRowDeleting(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
  2205. End If
  2206. End Sub
  2207. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2208. Public Sub RemoveOnsiteCourseRow(ByVal row As OnsiteCourseRow)
  2209. Me.Rows.Remove(row)
  2210. End Sub
  2211. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2212. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  2213. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  2214. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  2215. Dim ds As SchoolDataSet = New SchoolDataSet
  2216. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  2217. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  2218. any1.MinOccurs = New Decimal(0)
  2219. any1.MaxOccurs = Decimal.MaxValue
  2220. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2221. sequence.Items.Add(any1)
  2222. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  2223. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  2224. any2.MinOccurs = New Decimal(1)
  2225. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2226. sequence.Items.Add(any2)
  2227. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  2228. attribute1.Name = "namespace"
  2229. attribute1.FixedValue = ds.Namespace
  2230. type.Attributes.Add(attribute1)
  2231. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  2232. attribute2.Name = "tableTypeName"
  2233. attribute2.FixedValue = "OnsiteCourseDataTable"
  2234. type.Attributes.Add(attribute2)
  2235. type.Particle = sequence
  2236. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  2237. If xs.Contains(dsSchema.TargetNamespace) Then
  2238. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  2239. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  2240. Try
  2241. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  2242. dsSchema.Write(s1)
  2243. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  2244. Do While schemas.MoveNext
  2245. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  2246. s2.SetLength(0)
  2247. schema.Write(s2)
  2248. If (s1.Length = s2.Length) Then
  2249. s1.Position = 0
  2250. s2.Position = 0
  2251. Do While ((s1.Position <> s1.Length) _
  2252. AndAlso (s1.ReadByte = s2.ReadByte))
  2253. Loop
  2254. If (s1.Position = s1.Length) Then
  2255. Return type
  2256. End If
  2257. End If
  2258. Loop
  2259. Finally
  2260. If (Not (s1) Is Nothing) Then
  2261. s1.Close
  2262. End If
  2263. If (Not (s2) Is Nothing) Then
  2264. s2.Close
  2265. End If
  2266. End Try
  2267. End If
  2268. xs.Add(dsSchema)
  2269. Return type
  2270. End Function
  2271. End Class
  2272. '''<summary>
  2273. '''Represents the strongly named DataTable class.
  2274. '''</summary>
  2275. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  2276. Global.System.Serializable(), _
  2277. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  2278. Partial Public Class PersonDataTable
  2279. Inherits Global.System.Data.TypedTableBase(Of PersonRow)
  2280. Private columnPersonID As Global.System.Data.DataColumn
  2281. Private columnLastName As Global.System.Data.DataColumn
  2282. Private columnFirstName As Global.System.Data.DataColumn
  2283. Private columnPersonCategory As Global.System.Data.DataColumn
  2284. Private columnHireDate As Global.System.Data.DataColumn
  2285. Private columnEnrollmentDate As Global.System.Data.DataColumn
  2286. Private columnPicture As Global.System.Data.DataColumn
  2287. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2288. Public Sub New()
  2289. MyBase.New
  2290. Me.TableName = "Person"
  2291. Me.BeginInit
  2292. Me.InitClass
  2293. Me.EndInit
  2294. End Sub
  2295. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2296. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  2297. MyBase.New
  2298. Me.TableName = table.TableName
  2299. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  2300. Me.CaseSensitive = table.CaseSensitive
  2301. End If
  2302. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  2303. Me.Locale = table.Locale
  2304. End If
  2305. If (table.Namespace <> table.DataSet.Namespace) Then
  2306. Me.Namespace = table.Namespace
  2307. End If
  2308. Me.Prefix = table.Prefix
  2309. Me.MinimumCapacity = table.MinimumCapacity
  2310. End Sub
  2311. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2312. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  2313. MyBase.New(info, context)
  2314. Me.InitVars
  2315. End Sub
  2316. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2317. Public ReadOnly Property PersonIDColumn() As Global.System.Data.DataColumn
  2318. Get
  2319. Return Me.columnPersonID
  2320. End Get
  2321. End Property
  2322. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2323. Public ReadOnly Property LastNameColumn() As Global.System.Data.DataColumn
  2324. Get
  2325. Return Me.columnLastName
  2326. End Get
  2327. End Property
  2328. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2329. Public ReadOnly Property FirstNameColumn() As Global.System.Data.DataColumn
  2330. Get
  2331. Return Me.columnFirstName
  2332. End Get
  2333. End Property
  2334. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2335. Public ReadOnly Property PersonCategoryColumn() As Global.System.Data.DataColumn
  2336. Get
  2337. Return Me.columnPersonCategory
  2338. End Get
  2339. End Property
  2340. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2341. Public ReadOnly Property HireDateColumn() As Global.System.Data.DataColumn
  2342. Get
  2343. Return Me.columnHireDate
  2344. End Get
  2345. End Property
  2346. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2347. Public ReadOnly Property EnrollmentDateColumn() As Global.System.Data.DataColumn
  2348. Get
  2349. Return Me.columnEnrollmentDate
  2350. End Get
  2351. End Property
  2352. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2353. Public ReadOnly Property PictureColumn() As Global.System.Data.DataColumn
  2354. Get
  2355. Return Me.columnPicture
  2356. End Get
  2357. End Property
  2358. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2359. Global.System.ComponentModel.Browsable(false)> _
  2360. Public ReadOnly Property Count() As Integer
  2361. Get
  2362. Return Me.Rows.Count
  2363. End Get
  2364. End Property
  2365. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2366. Public Default ReadOnly Property Item(ByVal index As Integer) As PersonRow
  2367. Get
  2368. Return CType(Me.Rows(index),PersonRow)
  2369. End Get
  2370. End Property
  2371. Public Event PersonRowChanging As PersonRowChangeEventHandler
  2372. Public Event PersonRowChanged As PersonRowChangeEventHandler
  2373. Public Event PersonRowDeleting As PersonRowChangeEventHandler
  2374. Public Event PersonRowDeleted As PersonRowChangeEventHandler
  2375. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2376. Public Overloads Sub AddPersonRow(ByVal row As PersonRow)
  2377. Me.Rows.Add(row)
  2378. End Sub
  2379. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2380. 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
  2381. Dim rowPersonRow As PersonRow = CType(Me.NewRow,PersonRow)
  2382. Dim columnValuesArray() As Object = New Object() {Nothing, LastName, FirstName, PersonCategory, HireDate, EnrollmentDate, Picture}
  2383. rowPersonRow.ItemArray = columnValuesArray
  2384. Me.Rows.Add(rowPersonRow)
  2385. Return rowPersonRow
  2386. End Function
  2387. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2388. Public Function FindByPersonID(ByVal PersonID As Integer) As PersonRow
  2389. Return CType(Me.Rows.Find(New Object() {PersonID}),PersonRow)
  2390. End Function
  2391. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2392. Public Overrides Function Clone() As Global.System.Data.DataTable
  2393. Dim cln As PersonDataTable = CType(MyBase.Clone,PersonDataTable)
  2394. cln.InitVars
  2395. Return cln
  2396. End Function
  2397. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2398. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  2399. Return New PersonDataTable
  2400. End Function
  2401. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2402. Friend Sub InitVars()
  2403. Me.columnPersonID = MyBase.Columns("PersonID")
  2404. Me.columnLastName = MyBase.Columns("LastName")
  2405. Me.columnFirstName = MyBase.Columns("FirstName")
  2406. Me.columnPersonCategory = MyBase.Columns("PersonCategory")
  2407. Me.columnHireDate = MyBase.Columns("HireDate")
  2408. Me.columnEnrollmentDate = MyBase.Columns("EnrollmentDate")
  2409. Me.columnPicture = MyBase.Columns("Picture")
  2410. End Sub
  2411. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2412. Private Sub InitClass()
  2413. Me.columnPersonID = New Global.System.Data.DataColumn("PersonID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  2414. MyBase.Columns.Add(Me.columnPersonID)
  2415. Me.columnLastName = New Global.System.Data.DataColumn("LastName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  2416. MyBase.Columns.Add(Me.columnLastName)
  2417. Me.columnFirstName = New Global.System.Data.DataColumn("FirstName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  2418. MyBase.Columns.Add(Me.columnFirstName)
  2419. Me.columnPersonCategory = New Global.System.Data.DataColumn("PersonCategory", GetType(Short), Nothing, Global.System.Data.MappingType.Element)
  2420. MyBase.Columns.Add(Me.columnPersonCategory)
  2421. Me.columnHireDate = New Global.System.Data.DataColumn("HireDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
  2422. MyBase.Columns.Add(Me.columnHireDate)
  2423. Me.columnEnrollmentDate = New Global.System.Data.DataColumn("EnrollmentDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
  2424. MyBase.Columns.Add(Me.columnEnrollmentDate)
  2425. Me.columnPicture = New Global.System.Data.DataColumn("Picture", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
  2426. MyBase.Columns.Add(Me.columnPicture)
  2427. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnPersonID}, true))
  2428. Me.columnPersonID.AutoIncrement = true
  2429. Me.columnPersonID.AutoIncrementSeed = -1
  2430. Me.columnPersonID.AutoIncrementStep = -1
  2431. Me.columnPersonID.AllowDBNull = false
  2432. Me.columnPersonID.ReadOnly = true
  2433. Me.columnPersonID.Unique = true
  2434. Me.columnLastName.AllowDBNull = false
  2435. Me.columnLastName.MaxLength = 50
  2436. Me.columnFirstName.AllowDBNull = false
  2437. Me.columnFirstName.MaxLength = 50
  2438. Me.columnPersonCategory.AllowDBNull = false
  2439. End Sub
  2440. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2441. Public Function NewPersonRow() As PersonRow
  2442. Return CType(Me.NewRow,PersonRow)
  2443. End Function
  2444. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2445. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  2446. Return New PersonRow(builder)
  2447. End Function
  2448. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2449. Protected Overrides Function GetRowType() As Global.System.Type
  2450. Return GetType(PersonRow)
  2451. End Function
  2452. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2453. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2454. MyBase.OnRowChanged(e)
  2455. If (Not (Me.PersonRowChangedEvent) Is Nothing) Then
  2456. RaiseEvent PersonRowChanged(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
  2457. End If
  2458. End Sub
  2459. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2460. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2461. MyBase.OnRowChanging(e)
  2462. If (Not (Me.PersonRowChangingEvent) Is Nothing) Then
  2463. RaiseEvent PersonRowChanging(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
  2464. End If
  2465. End Sub
  2466. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2467. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2468. MyBase.OnRowDeleted(e)
  2469. If (Not (Me.PersonRowDeletedEvent) Is Nothing) Then
  2470. RaiseEvent PersonRowDeleted(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
  2471. End If
  2472. End Sub
  2473. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2474. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2475. MyBase.OnRowDeleting(e)
  2476. If (Not (Me.PersonRowDeletingEvent) Is Nothing) Then
  2477. RaiseEvent PersonRowDeleting(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
  2478. End If
  2479. End Sub
  2480. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2481. Public Sub RemovePersonRow(ByVal row As PersonRow)
  2482. Me.Rows.Remove(row)
  2483. End Sub
  2484. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2485. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  2486. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  2487. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  2488. Dim ds As SchoolDataSet = New SchoolDataSet
  2489. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  2490. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  2491. any1.MinOccurs = New Decimal(0)
  2492. any1.MaxOccurs = Decimal.MaxValue
  2493. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2494. sequence.Items.Add(any1)
  2495. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  2496. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  2497. any2.MinOccurs = New Decimal(1)
  2498. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2499. sequence.Items.Add(any2)
  2500. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  2501. attribute1.Name = "namespace"
  2502. attribute1.FixedValue = ds.Namespace
  2503. type.Attributes.Add(attribute1)
  2504. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  2505. attribute2.Name = "tableTypeName"
  2506. attribute2.FixedValue = "PersonDataTable"
  2507. type.Attributes.Add(attribute2)
  2508. type.Particle = sequence
  2509. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  2510. If xs.Contains(dsSchema.TargetNamespace) Then
  2511. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  2512. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  2513. Try
  2514. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  2515. dsSchema.Write(s1)
  2516. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  2517. Do While schemas.MoveNext
  2518. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  2519. s2.SetLength(0)
  2520. schema.Write(s2)
  2521. If (s1.Length = s2.Length) Then
  2522. s1.Position = 0
  2523. s2.Position = 0
  2524. Do While ((s1.Position <> s1.Length) _
  2525. AndAlso (s1.ReadByte = s2.ReadByte))
  2526. Loop
  2527. If (s1.Position = s1.Length) Then
  2528. Return type
  2529. End If
  2530. End If
  2531. Loop
  2532. Finally
  2533. If (Not (s1) Is Nothing) Then
  2534. s1.Close
  2535. End If
  2536. If (Not (s2) Is Nothing) Then
  2537. s2.Close
  2538. End If
  2539. End Try
  2540. End If
  2541. xs.Add(dsSchema)
  2542. Return type
  2543. End Function
  2544. End Class
  2545. '''<summary>
  2546. '''Represents the strongly named DataTable class.
  2547. '''</summary>
  2548. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  2549. Global.System.Serializable(), _
  2550. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  2551. Partial Public Class GetStudentGradesDataTable
  2552. Inherits Global.System.Data.TypedTableBase(Of GetStudentGradesRow)
  2553. Private columnEnrollmentID As Global.System.Data.DataColumn
  2554. Private columnGrade As Global.System.Data.DataColumn
  2555. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2556. Public Sub New()
  2557. MyBase.New
  2558. Me.TableName = "GetStudentGrades"
  2559. Me.BeginInit
  2560. Me.InitClass
  2561. Me.EndInit
  2562. End Sub
  2563. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2564. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  2565. MyBase.New
  2566. Me.TableName = table.TableName
  2567. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  2568. Me.CaseSensitive = table.CaseSensitive
  2569. End If
  2570. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  2571. Me.Locale = table.Locale
  2572. End If
  2573. If (table.Namespace <> table.DataSet.Namespace) Then
  2574. Me.Namespace = table.Namespace
  2575. End If
  2576. Me.Prefix = table.Prefix
  2577. Me.MinimumCapacity = table.MinimumCapacity
  2578. End Sub
  2579. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2580. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  2581. MyBase.New(info, context)
  2582. Me.InitVars
  2583. End Sub
  2584. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2585. Public ReadOnly Property EnrollmentIDColumn() As Global.System.Data.DataColumn
  2586. Get
  2587. Return Me.columnEnrollmentID
  2588. End Get
  2589. End Property
  2590. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2591. Public ReadOnly Property GradeColumn() As Global.System.Data.DataColumn
  2592. Get
  2593. Return Me.columnGrade
  2594. End Get
  2595. End Property
  2596. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2597. Global.System.ComponentModel.Browsable(false)> _
  2598. Public ReadOnly Property Count() As Integer
  2599. Get
  2600. Return Me.Rows.Count
  2601. End Get
  2602. End Property
  2603. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2604. Public Default ReadOnly Property Item(ByVal index As Integer) As GetStudentGradesRow
  2605. Get
  2606. Return CType(Me.Rows(index),GetStudentGradesRow)
  2607. End Get
  2608. End Property
  2609. Public Event GetStudentGradesRowChanging As GetStudentGradesRowChangeEventHandler
  2610. Public Event GetStudentGradesRowChanged As GetStudentGradesRowChangeEventHandler
  2611. Public Event GetStudentGradesRowDeleting As GetStudentGradesRowChangeEventHandler
  2612. Public Event GetStudentGradesRowDeleted As GetStudentGradesRowChangeEventHandler
  2613. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2614. Public Overloads Sub AddGetStudentGradesRow(ByVal row As GetStudentGradesRow)
  2615. Me.Rows.Add(row)
  2616. End Sub
  2617. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2618. Public Overloads Function AddGetStudentGradesRow(ByVal Grade As Decimal) As GetStudentGradesRow
  2619. Dim rowGetStudentGradesRow As GetStudentGradesRow = CType(Me.NewRow,GetStudentGradesRow)
  2620. Dim columnValuesArray() As Object = New Object() {Nothing, Grade}
  2621. rowGetStudentGradesRow.ItemArray = columnValuesArray
  2622. Me.Rows.Add(rowGetStudentGradesRow)
  2623. Return rowGetStudentGradesRow
  2624. End Function
  2625. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2626. Public Function FindByEnrollmentID(ByVal EnrollmentID As Integer) As GetStudentGradesRow
  2627. Return CType(Me.Rows.Find(New Object() {EnrollmentID}),GetStudentGradesRow)
  2628. End Function
  2629. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2630. Public Overrides Function Clone() As Global.System.Data.DataTable
  2631. Dim cln As GetStudentGradesDataTable = CType(MyBase.Clone,GetStudentGradesDataTable)
  2632. cln.InitVars
  2633. Return cln
  2634. End Function
  2635. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2636. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  2637. Return New GetStudentGradesDataTable
  2638. End Function
  2639. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2640. Friend Sub InitVars()
  2641. Me.columnEnrollmentID = MyBase.Columns("EnrollmentID")
  2642. Me.columnGrade = MyBase.Columns("Grade")
  2643. End Sub
  2644. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2645. Private Sub InitClass()
  2646. Me.columnEnrollmentID = New Global.System.Data.DataColumn("EnrollmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  2647. MyBase.Columns.Add(Me.columnEnrollmentID)
  2648. Me.columnGrade = New Global.System.Data.DataColumn("Grade", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
  2649. MyBase.Columns.Add(Me.columnGrade)
  2650. Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnEnrollmentID}, true))
  2651. Me.columnEnrollmentID.AutoIncrement = true
  2652. Me.columnEnrollmentID.AllowDBNull = false
  2653. Me.columnEnrollmentID.ReadOnly = true
  2654. Me.columnEnrollmentID.Unique = true
  2655. End Sub
  2656. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2657. Public Function NewGetStudentGradesRow() As GetStudentGradesRow
  2658. Return CType(Me.NewRow,GetStudentGradesRow)
  2659. End Function
  2660. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2661. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  2662. Return New GetStudentGradesRow(builder)
  2663. End Function
  2664. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2665. Protected Overrides Function GetRowType() As Global.System.Type
  2666. Return GetType(GetStudentGradesRow)
  2667. End Function
  2668. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2669. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2670. MyBase.OnRowChanged(e)
  2671. If (Not (Me.GetStudentGradesRowChangedEvent) Is Nothing) Then
  2672. RaiseEvent GetStudentGradesRowChanged(Me, New GetStudentGradesRowChangeEvent(CType(e.Row,GetStudentGradesRow), e.Action))
  2673. End If
  2674. End Sub
  2675. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2676. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2677. MyBase.OnRowChanging(e)
  2678. If (Not (Me.GetStudentGradesRowChangingEvent) Is Nothing) Then
  2679. RaiseEvent GetStudentGradesRowChanging(Me, New GetStudentGradesRowChangeEvent(CType(e.Row,GetStudentGradesRow), e.Action))
  2680. End If
  2681. End Sub
  2682. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2683. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2684. MyBase.OnRowDeleted(e)
  2685. If (Not (Me.GetStudentGradesRowDeletedEvent) Is Nothing) Then
  2686. RaiseEvent GetStudentGradesRowDeleted(Me, New GetStudentGradesRowChangeEvent(CType(e.Row,GetStudentGradesRow), e.Action))
  2687. End If
  2688. End Sub
  2689. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2690. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2691. MyBase.OnRowDeleting(e)
  2692. If (Not (Me.GetStudentGradesRowDeletingEvent) Is Nothing) Then
  2693. RaiseEvent GetStudentGradesRowDeleting(Me, New GetStudentGradesRowChangeEvent(CType(e.Row,GetStudentGradesRow), e.Action))
  2694. End If
  2695. End Sub
  2696. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2697. Public Sub RemoveGetStudentGradesRow(ByVal row As GetStudentGradesRow)
  2698. Me.Rows.Remove(row)
  2699. End Sub
  2700. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2701. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  2702. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  2703. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  2704. Dim ds As SchoolDataSet = New SchoolDataSet
  2705. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  2706. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  2707. any1.MinOccurs = New Decimal(0)
  2708. any1.MaxOccurs = Decimal.MaxValue
  2709. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2710. sequence.Items.Add(any1)
  2711. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  2712. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  2713. any2.MinOccurs = New Decimal(1)
  2714. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2715. sequence.Items.Add(any2)
  2716. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  2717. attribute1.Name = "namespace"
  2718. attribute1.FixedValue = ds.Namespace
  2719. type.Attributes.Add(attribute1)
  2720. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  2721. attribute2.Name = "tableTypeName"
  2722. attribute2.FixedValue = "GetStudentGradesDataTable"
  2723. type.Attributes.Add(attribute2)
  2724. type.Particle = sequence
  2725. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  2726. If xs.Contains(dsSchema.TargetNamespace) Then
  2727. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  2728. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  2729. Try
  2730. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  2731. dsSchema.Write(s1)
  2732. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  2733. Do While schemas.MoveNext
  2734. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  2735. s2.SetLength(0)
  2736. schema.Write(s2)
  2737. If (s1.Length = s2.Length) Then
  2738. s1.Position = 0
  2739. s2.Position = 0
  2740. Do While ((s1.Position <> s1.Length) _
  2741. AndAlso (s1.ReadByte = s2.ReadByte))
  2742. Loop
  2743. If (s1.Position = s1.Length) Then
  2744. Return type
  2745. End If
  2746. End If
  2747. Loop
  2748. Finally
  2749. If (Not (s1) Is Nothing) Then
  2750. s1.Close
  2751. End If
  2752. If (Not (s2) Is Nothing) Then
  2753. s2.Close
  2754. End If
  2755. End Try
  2756. End If
  2757. xs.Add(dsSchema)
  2758. Return type
  2759. End Function
  2760. End Class
  2761. '''<summary>
  2762. '''Represents the strongly named DataTable class.
  2763. '''</summary>
  2764. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  2765. Global.System.Serializable(), _
  2766. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  2767. Partial Public Class InsertOfficeAssignmentDataTable
  2768. Inherits Global.System.Data.TypedTableBase(Of InsertOfficeAssignmentRow)
  2769. Private columnTimestamp As Global.System.Data.DataColumn
  2770. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2771. Public Sub New()
  2772. MyBase.New
  2773. Me.TableName = "InsertOfficeAssignment"
  2774. Me.BeginInit
  2775. Me.InitClass
  2776. Me.EndInit
  2777. End Sub
  2778. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2779. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  2780. MyBase.New
  2781. Me.TableName = table.TableName
  2782. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  2783. Me.CaseSensitive = table.CaseSensitive
  2784. End If
  2785. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  2786. Me.Locale = table.Locale
  2787. End If
  2788. If (table.Namespace <> table.DataSet.Namespace) Then
  2789. Me.Namespace = table.Namespace
  2790. End If
  2791. Me.Prefix = table.Prefix
  2792. Me.MinimumCapacity = table.MinimumCapacity
  2793. End Sub
  2794. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2795. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  2796. MyBase.New(info, context)
  2797. Me.InitVars
  2798. End Sub
  2799. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2800. Public ReadOnly Property TimestampColumn() As Global.System.Data.DataColumn
  2801. Get
  2802. Return Me.columnTimestamp
  2803. End Get
  2804. End Property
  2805. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  2806. Global.System.ComponentModel.Browsable(false)> _
  2807. Public ReadOnly Property Count() As Integer
  2808. Get
  2809. Return Me.Rows.Count
  2810. End Get
  2811. End Property
  2812. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2813. Public Default ReadOnly Property Item(ByVal index As Integer) As InsertOfficeAssignmentRow
  2814. Get
  2815. Return CType(Me.Rows(index),InsertOfficeAssignmentRow)
  2816. End Get
  2817. End Property
  2818. Public Event InsertOfficeAssignmentRowChanging As InsertOfficeAssignmentRowChangeEventHandler
  2819. Public Event InsertOfficeAssignmentRowChanged As InsertOfficeAssignmentRowChangeEventHandler
  2820. Public Event InsertOfficeAssignmentRowDeleting As InsertOfficeAssignmentRowChangeEventHandler
  2821. Public Event InsertOfficeAssignmentRowDeleted As InsertOfficeAssignmentRowChangeEventHandler
  2822. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2823. Public Overloads Sub AddInsertOfficeAssignmentRow(ByVal row As InsertOfficeAssignmentRow)
  2824. Me.Rows.Add(row)
  2825. End Sub
  2826. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2827. Public Overloads Function AddInsertOfficeAssignmentRow(ByVal Timestamp() As Byte) As InsertOfficeAssignmentRow
  2828. Dim rowInsertOfficeAssignmentRow As InsertOfficeAssignmentRow = CType(Me.NewRow,InsertOfficeAssignmentRow)
  2829. Dim columnValuesArray() As Object = New Object() {Timestamp}
  2830. rowInsertOfficeAssignmentRow.ItemArray = columnValuesArray
  2831. Me.Rows.Add(rowInsertOfficeAssignmentRow)
  2832. Return rowInsertOfficeAssignmentRow
  2833. End Function
  2834. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2835. Public Overrides Function Clone() As Global.System.Data.DataTable
  2836. Dim cln As InsertOfficeAssignmentDataTable = CType(MyBase.Clone,InsertOfficeAssignmentDataTable)
  2837. cln.InitVars
  2838. Return cln
  2839. End Function
  2840. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2841. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  2842. Return New InsertOfficeAssignmentDataTable
  2843. End Function
  2844. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2845. Friend Sub InitVars()
  2846. Me.columnTimestamp = MyBase.Columns("Timestamp")
  2847. End Sub
  2848. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2849. Private Sub InitClass()
  2850. Me.columnTimestamp = New Global.System.Data.DataColumn("Timestamp", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
  2851. MyBase.Columns.Add(Me.columnTimestamp)
  2852. Me.columnTimestamp.ReadOnly = true
  2853. End Sub
  2854. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2855. Public Function NewInsertOfficeAssignmentRow() As InsertOfficeAssignmentRow
  2856. Return CType(Me.NewRow,InsertOfficeAssignmentRow)
  2857. End Function
  2858. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2859. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  2860. Return New InsertOfficeAssignmentRow(builder)
  2861. End Function
  2862. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2863. Protected Overrides Function GetRowType() As Global.System.Type
  2864. Return GetType(InsertOfficeAssignmentRow)
  2865. End Function
  2866. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2867. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2868. MyBase.OnRowChanged(e)
  2869. If (Not (Me.InsertOfficeAssignmentRowChangedEvent) Is Nothing) Then
  2870. RaiseEvent InsertOfficeAssignmentRowChanged(Me, New InsertOfficeAssignmentRowChangeEvent(CType(e.Row,InsertOfficeAssignmentRow), e.Action))
  2871. End If
  2872. End Sub
  2873. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2874. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2875. MyBase.OnRowChanging(e)
  2876. If (Not (Me.InsertOfficeAssignmentRowChangingEvent) Is Nothing) Then
  2877. RaiseEvent InsertOfficeAssignmentRowChanging(Me, New InsertOfficeAssignmentRowChangeEvent(CType(e.Row,InsertOfficeAssignmentRow), e.Action))
  2878. End If
  2879. End Sub
  2880. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2881. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2882. MyBase.OnRowDeleted(e)
  2883. If (Not (Me.InsertOfficeAssignmentRowDeletedEvent) Is Nothing) Then
  2884. RaiseEvent InsertOfficeAssignmentRowDeleted(Me, New InsertOfficeAssignmentRowChangeEvent(CType(e.Row,InsertOfficeAssignmentRow), e.Action))
  2885. End If
  2886. End Sub
  2887. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2888. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  2889. MyBase.OnRowDeleting(e)
  2890. If (Not (Me.InsertOfficeAssignmentRowDeletingEvent) Is Nothing) Then
  2891. RaiseEvent InsertOfficeAssignmentRowDeleting(Me, New InsertOfficeAssignmentRowChangeEvent(CType(e.Row,InsertOfficeAssignmentRow), e.Action))
  2892. End If
  2893. End Sub
  2894. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2895. Public Sub RemoveInsertOfficeAssignmentRow(ByVal row As InsertOfficeAssignmentRow)
  2896. Me.Rows.Remove(row)
  2897. End Sub
  2898. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2899. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  2900. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  2901. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  2902. Dim ds As SchoolDataSet = New SchoolDataSet
  2903. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  2904. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  2905. any1.MinOccurs = New Decimal(0)
  2906. any1.MaxOccurs = Decimal.MaxValue
  2907. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2908. sequence.Items.Add(any1)
  2909. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  2910. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  2911. any2.MinOccurs = New Decimal(1)
  2912. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  2913. sequence.Items.Add(any2)
  2914. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  2915. attribute1.Name = "namespace"
  2916. attribute1.FixedValue = ds.Namespace
  2917. type.Attributes.Add(attribute1)
  2918. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  2919. attribute2.Name = "tableTypeName"
  2920. attribute2.FixedValue = "InsertOfficeAssignmentDataTable"
  2921. type.Attributes.Add(attribute2)
  2922. type.Particle = sequence
  2923. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  2924. If xs.Contains(dsSchema.TargetNamespace) Then
  2925. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  2926. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  2927. Try
  2928. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  2929. dsSchema.Write(s1)
  2930. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  2931. Do While schemas.MoveNext
  2932. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  2933. s2.SetLength(0)
  2934. schema.Write(s2)
  2935. If (s1.Length = s2.Length) Then
  2936. s1.Position = 0
  2937. s2.Position = 0
  2938. Do While ((s1.Position <> s1.Length) _
  2939. AndAlso (s1.ReadByte = s2.ReadByte))
  2940. Loop
  2941. If (s1.Position = s1.Length) Then
  2942. Return type
  2943. End If
  2944. End If
  2945. Loop
  2946. Finally
  2947. If (Not (s1) Is Nothing) Then
  2948. s1.Close
  2949. End If
  2950. If (Not (s2) Is Nothing) Then
  2951. s2.Close
  2952. End If
  2953. End Try
  2954. End If
  2955. xs.Add(dsSchema)
  2956. Return type
  2957. End Function
  2958. End Class
  2959. '''<summary>
  2960. '''Represents the strongly named DataTable class.
  2961. '''</summary>
  2962. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  2963. Global.System.Serializable(), _
  2964. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  2965. Partial Public Class InsertPersonDataTable
  2966. Inherits Global.System.Data.TypedTableBase(Of InsertPersonRow)
  2967. Private columnNewPersonID As Global.System.Data.DataColumn
  2968. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2969. Public Sub New()
  2970. MyBase.New
  2971. Me.TableName = "InsertPerson"
  2972. Me.BeginInit
  2973. Me.InitClass
  2974. Me.EndInit
  2975. End Sub
  2976. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2977. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  2978. MyBase.New
  2979. Me.TableName = table.TableName
  2980. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  2981. Me.CaseSensitive = table.CaseSensitive
  2982. End If
  2983. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  2984. Me.Locale = table.Locale
  2985. End If
  2986. If (table.Namespace <> table.DataSet.Namespace) Then
  2987. Me.Namespace = table.Namespace
  2988. End If
  2989. Me.Prefix = table.Prefix
  2990. Me.MinimumCapacity = table.MinimumCapacity
  2991. End Sub
  2992. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2993. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  2994. MyBase.New(info, context)
  2995. Me.InitVars
  2996. End Sub
  2997. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  2998. Public ReadOnly Property NewPersonIDColumn() As Global.System.Data.DataColumn
  2999. Get
  3000. Return Me.columnNewPersonID
  3001. End Get
  3002. End Property
  3003. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3004. Global.System.ComponentModel.Browsable(false)> _
  3005. Public ReadOnly Property Count() As Integer
  3006. Get
  3007. Return Me.Rows.Count
  3008. End Get
  3009. End Property
  3010. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3011. Public Default ReadOnly Property Item(ByVal index As Integer) As InsertPersonRow
  3012. Get
  3013. Return CType(Me.Rows(index),InsertPersonRow)
  3014. End Get
  3015. End Property
  3016. Public Event InsertPersonRowChanging As InsertPersonRowChangeEventHandler
  3017. Public Event InsertPersonRowChanged As InsertPersonRowChangeEventHandler
  3018. Public Event InsertPersonRowDeleting As InsertPersonRowChangeEventHandler
  3019. Public Event InsertPersonRowDeleted As InsertPersonRowChangeEventHandler
  3020. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3021. Public Overloads Sub AddInsertPersonRow(ByVal row As InsertPersonRow)
  3022. Me.Rows.Add(row)
  3023. End Sub
  3024. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3025. Public Overloads Function AddInsertPersonRow(ByVal NewPersonID As Decimal) As InsertPersonRow
  3026. Dim rowInsertPersonRow As InsertPersonRow = CType(Me.NewRow,InsertPersonRow)
  3027. Dim columnValuesArray() As Object = New Object() {NewPersonID}
  3028. rowInsertPersonRow.ItemArray = columnValuesArray
  3029. Me.Rows.Add(rowInsertPersonRow)
  3030. Return rowInsertPersonRow
  3031. End Function
  3032. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3033. Public Overrides Function Clone() As Global.System.Data.DataTable
  3034. Dim cln As InsertPersonDataTable = CType(MyBase.Clone,InsertPersonDataTable)
  3035. cln.InitVars
  3036. Return cln
  3037. End Function
  3038. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3039. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  3040. Return New InsertPersonDataTable
  3041. End Function
  3042. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3043. Friend Sub InitVars()
  3044. Me.columnNewPersonID = MyBase.Columns("NewPersonID")
  3045. End Sub
  3046. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3047. Private Sub InitClass()
  3048. Me.columnNewPersonID = New Global.System.Data.DataColumn("NewPersonID", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
  3049. MyBase.Columns.Add(Me.columnNewPersonID)
  3050. Me.columnNewPersonID.ReadOnly = true
  3051. End Sub
  3052. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3053. Public Function NewInsertPersonRow() As InsertPersonRow
  3054. Return CType(Me.NewRow,InsertPersonRow)
  3055. End Function
  3056. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3057. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  3058. Return New InsertPersonRow(builder)
  3059. End Function
  3060. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3061. Protected Overrides Function GetRowType() As Global.System.Type
  3062. Return GetType(InsertPersonRow)
  3063. End Function
  3064. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3065. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3066. MyBase.OnRowChanged(e)
  3067. If (Not (Me.InsertPersonRowChangedEvent) Is Nothing) Then
  3068. RaiseEvent InsertPersonRowChanged(Me, New InsertPersonRowChangeEvent(CType(e.Row,InsertPersonRow), e.Action))
  3069. End If
  3070. End Sub
  3071. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3072. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3073. MyBase.OnRowChanging(e)
  3074. If (Not (Me.InsertPersonRowChangingEvent) Is Nothing) Then
  3075. RaiseEvent InsertPersonRowChanging(Me, New InsertPersonRowChangeEvent(CType(e.Row,InsertPersonRow), e.Action))
  3076. End If
  3077. End Sub
  3078. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3079. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3080. MyBase.OnRowDeleted(e)
  3081. If (Not (Me.InsertPersonRowDeletedEvent) Is Nothing) Then
  3082. RaiseEvent InsertPersonRowDeleted(Me, New InsertPersonRowChangeEvent(CType(e.Row,InsertPersonRow), e.Action))
  3083. End If
  3084. End Sub
  3085. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3086. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3087. MyBase.OnRowDeleting(e)
  3088. If (Not (Me.InsertPersonRowDeletingEvent) Is Nothing) Then
  3089. RaiseEvent InsertPersonRowDeleting(Me, New InsertPersonRowChangeEvent(CType(e.Row,InsertPersonRow), e.Action))
  3090. End If
  3091. End Sub
  3092. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3093. Public Sub RemoveInsertPersonRow(ByVal row As InsertPersonRow)
  3094. Me.Rows.Remove(row)
  3095. End Sub
  3096. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3097. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  3098. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  3099. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  3100. Dim ds As SchoolDataSet = New SchoolDataSet
  3101. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  3102. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  3103. any1.MinOccurs = New Decimal(0)
  3104. any1.MaxOccurs = Decimal.MaxValue
  3105. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  3106. sequence.Items.Add(any1)
  3107. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  3108. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  3109. any2.MinOccurs = New Decimal(1)
  3110. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  3111. sequence.Items.Add(any2)
  3112. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  3113. attribute1.Name = "namespace"
  3114. attribute1.FixedValue = ds.Namespace
  3115. type.Attributes.Add(attribute1)
  3116. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  3117. attribute2.Name = "tableTypeName"
  3118. attribute2.FixedValue = "InsertPersonDataTable"
  3119. type.Attributes.Add(attribute2)
  3120. type.Particle = sequence
  3121. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  3122. If xs.Contains(dsSchema.TargetNamespace) Then
  3123. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  3124. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  3125. Try
  3126. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  3127. dsSchema.Write(s1)
  3128. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  3129. Do While schemas.MoveNext
  3130. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  3131. s2.SetLength(0)
  3132. schema.Write(s2)
  3133. If (s1.Length = s2.Length) Then
  3134. s1.Position = 0
  3135. s2.Position = 0
  3136. Do While ((s1.Position <> s1.Length) _
  3137. AndAlso (s1.ReadByte = s2.ReadByte))
  3138. Loop
  3139. If (s1.Position = s1.Length) Then
  3140. Return type
  3141. End If
  3142. End If
  3143. Loop
  3144. Finally
  3145. If (Not (s1) Is Nothing) Then
  3146. s1.Close
  3147. End If
  3148. If (Not (s2) Is Nothing) Then
  3149. s2.Close
  3150. End If
  3151. End Try
  3152. End If
  3153. xs.Add(dsSchema)
  3154. Return type
  3155. End Function
  3156. End Class
  3157. '''<summary>
  3158. '''Represents the strongly named DataTable class.
  3159. '''</summary>
  3160. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  3161. Global.System.Serializable(), _
  3162. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  3163. Partial Public Class UpdateOfficeAssignmentDataTable
  3164. Inherits Global.System.Data.TypedTableBase(Of UpdateOfficeAssignmentRow)
  3165. Private columnTimestamp As Global.System.Data.DataColumn
  3166. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3167. Public Sub New()
  3168. MyBase.New
  3169. Me.TableName = "UpdateOfficeAssignment"
  3170. Me.BeginInit
  3171. Me.InitClass
  3172. Me.EndInit
  3173. End Sub
  3174. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3175. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  3176. MyBase.New
  3177. Me.TableName = table.TableName
  3178. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  3179. Me.CaseSensitive = table.CaseSensitive
  3180. End If
  3181. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  3182. Me.Locale = table.Locale
  3183. End If
  3184. If (table.Namespace <> table.DataSet.Namespace) Then
  3185. Me.Namespace = table.Namespace
  3186. End If
  3187. Me.Prefix = table.Prefix
  3188. Me.MinimumCapacity = table.MinimumCapacity
  3189. End Sub
  3190. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3191. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  3192. MyBase.New(info, context)
  3193. Me.InitVars
  3194. End Sub
  3195. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3196. Public ReadOnly Property TimestampColumn() As Global.System.Data.DataColumn
  3197. Get
  3198. Return Me.columnTimestamp
  3199. End Get
  3200. End Property
  3201. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3202. Global.System.ComponentModel.Browsable(false)> _
  3203. Public ReadOnly Property Count() As Integer
  3204. Get
  3205. Return Me.Rows.Count
  3206. End Get
  3207. End Property
  3208. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3209. Public Default ReadOnly Property Item(ByVal index As Integer) As UpdateOfficeAssignmentRow
  3210. Get
  3211. Return CType(Me.Rows(index),UpdateOfficeAssignmentRow)
  3212. End Get
  3213. End Property
  3214. Public Event UpdateOfficeAssignmentRowChanging As UpdateOfficeAssignmentRowChangeEventHandler
  3215. Public Event UpdateOfficeAssignmentRowChanged As UpdateOfficeAssignmentRowChangeEventHandler
  3216. Public Event UpdateOfficeAssignmentRowDeleting As UpdateOfficeAssignmentRowChangeEventHandler
  3217. Public Event UpdateOfficeAssignmentRowDeleted As UpdateOfficeAssignmentRowChangeEventHandler
  3218. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3219. Public Overloads Sub AddUpdateOfficeAssignmentRow(ByVal row As UpdateOfficeAssignmentRow)
  3220. Me.Rows.Add(row)
  3221. End Sub
  3222. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3223. Public Overloads Function AddUpdateOfficeAssignmentRow(ByVal Timestamp() As Byte) As UpdateOfficeAssignmentRow
  3224. Dim rowUpdateOfficeAssignmentRow As UpdateOfficeAssignmentRow = CType(Me.NewRow,UpdateOfficeAssignmentRow)
  3225. Dim columnValuesArray() As Object = New Object() {Timestamp}
  3226. rowUpdateOfficeAssignmentRow.ItemArray = columnValuesArray
  3227. Me.Rows.Add(rowUpdateOfficeAssignmentRow)
  3228. Return rowUpdateOfficeAssignmentRow
  3229. End Function
  3230. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3231. Public Overrides Function Clone() As Global.System.Data.DataTable
  3232. Dim cln As UpdateOfficeAssignmentDataTable = CType(MyBase.Clone,UpdateOfficeAssignmentDataTable)
  3233. cln.InitVars
  3234. Return cln
  3235. End Function
  3236. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3237. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  3238. Return New UpdateOfficeAssignmentDataTable
  3239. End Function
  3240. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3241. Friend Sub InitVars()
  3242. Me.columnTimestamp = MyBase.Columns("Timestamp")
  3243. End Sub
  3244. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3245. Private Sub InitClass()
  3246. Me.columnTimestamp = New Global.System.Data.DataColumn("Timestamp", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
  3247. MyBase.Columns.Add(Me.columnTimestamp)
  3248. Me.columnTimestamp.ReadOnly = true
  3249. End Sub
  3250. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3251. Public Function NewUpdateOfficeAssignmentRow() As UpdateOfficeAssignmentRow
  3252. Return CType(Me.NewRow,UpdateOfficeAssignmentRow)
  3253. End Function
  3254. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3255. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  3256. Return New UpdateOfficeAssignmentRow(builder)
  3257. End Function
  3258. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3259. Protected Overrides Function GetRowType() As Global.System.Type
  3260. Return GetType(UpdateOfficeAssignmentRow)
  3261. End Function
  3262. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3263. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3264. MyBase.OnRowChanged(e)
  3265. If (Not (Me.UpdateOfficeAssignmentRowChangedEvent) Is Nothing) Then
  3266. RaiseEvent UpdateOfficeAssignmentRowChanged(Me, New UpdateOfficeAssignmentRowChangeEvent(CType(e.Row,UpdateOfficeAssignmentRow), e.Action))
  3267. End If
  3268. End Sub
  3269. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3270. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3271. MyBase.OnRowChanging(e)
  3272. If (Not (Me.UpdateOfficeAssignmentRowChangingEvent) Is Nothing) Then
  3273. RaiseEvent UpdateOfficeAssignmentRowChanging(Me, New UpdateOfficeAssignmentRowChangeEvent(CType(e.Row,UpdateOfficeAssignmentRow), e.Action))
  3274. End If
  3275. End Sub
  3276. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3277. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3278. MyBase.OnRowDeleted(e)
  3279. If (Not (Me.UpdateOfficeAssignmentRowDeletedEvent) Is Nothing) Then
  3280. RaiseEvent UpdateOfficeAssignmentRowDeleted(Me, New UpdateOfficeAssignmentRowChangeEvent(CType(e.Row,UpdateOfficeAssignmentRow), e.Action))
  3281. End If
  3282. End Sub
  3283. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3284. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3285. MyBase.OnRowDeleting(e)
  3286. If (Not (Me.UpdateOfficeAssignmentRowDeletingEvent) Is Nothing) Then
  3287. RaiseEvent UpdateOfficeAssignmentRowDeleting(Me, New UpdateOfficeAssignmentRowChangeEvent(CType(e.Row,UpdateOfficeAssignmentRow), e.Action))
  3288. End If
  3289. End Sub
  3290. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3291. Public Sub RemoveUpdateOfficeAssignmentRow(ByVal row As UpdateOfficeAssignmentRow)
  3292. Me.Rows.Remove(row)
  3293. End Sub
  3294. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3295. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  3296. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  3297. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  3298. Dim ds As SchoolDataSet = New SchoolDataSet
  3299. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  3300. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  3301. any1.MinOccurs = New Decimal(0)
  3302. any1.MaxOccurs = Decimal.MaxValue
  3303. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  3304. sequence.Items.Add(any1)
  3305. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  3306. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  3307. any2.MinOccurs = New Decimal(1)
  3308. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  3309. sequence.Items.Add(any2)
  3310. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  3311. attribute1.Name = "namespace"
  3312. attribute1.FixedValue = ds.Namespace
  3313. type.Attributes.Add(attribute1)
  3314. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  3315. attribute2.Name = "tableTypeName"
  3316. attribute2.FixedValue = "UpdateOfficeAssignmentDataTable"
  3317. type.Attributes.Add(attribute2)
  3318. type.Particle = sequence
  3319. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  3320. If xs.Contains(dsSchema.TargetNamespace) Then
  3321. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  3322. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  3323. Try
  3324. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  3325. dsSchema.Write(s1)
  3326. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  3327. Do While schemas.MoveNext
  3328. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  3329. s2.SetLength(0)
  3330. schema.Write(s2)
  3331. If (s1.Length = s2.Length) Then
  3332. s1.Position = 0
  3333. s2.Position = 0
  3334. Do While ((s1.Position <> s1.Length) _
  3335. AndAlso (s1.ReadByte = s2.ReadByte))
  3336. Loop
  3337. If (s1.Position = s1.Length) Then
  3338. Return type
  3339. End If
  3340. End If
  3341. Loop
  3342. Finally
  3343. If (Not (s1) Is Nothing) Then
  3344. s1.Close
  3345. End If
  3346. If (Not (s2) Is Nothing) Then
  3347. s2.Close
  3348. End If
  3349. End Try
  3350. End If
  3351. xs.Add(dsSchema)
  3352. Return type
  3353. End Function
  3354. End Class
  3355. '''<summary>
  3356. '''Represents the strongly named DataTable class.
  3357. '''</summary>
  3358. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  3359. Global.System.Serializable(), _
  3360. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  3361. Partial Public Class CourseListDataTable
  3362. Inherits Global.System.Data.TypedTableBase(Of CourseListRow)
  3363. Private columnTitle As Global.System.Data.DataColumn
  3364. Private columnCredits As Global.System.Data.DataColumn
  3365. Private columnDepartmentName As Global.System.Data.DataColumn
  3366. Private columnInstructor As Global.System.Data.DataColumn
  3367. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3368. Public Sub New()
  3369. MyBase.New
  3370. Me.TableName = "CourseList"
  3371. Me.BeginInit
  3372. Me.InitClass
  3373. Me.EndInit
  3374. End Sub
  3375. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3376. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  3377. MyBase.New
  3378. Me.TableName = table.TableName
  3379. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  3380. Me.CaseSensitive = table.CaseSensitive
  3381. End If
  3382. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  3383. Me.Locale = table.Locale
  3384. End If
  3385. If (table.Namespace <> table.DataSet.Namespace) Then
  3386. Me.Namespace = table.Namespace
  3387. End If
  3388. Me.Prefix = table.Prefix
  3389. Me.MinimumCapacity = table.MinimumCapacity
  3390. End Sub
  3391. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3392. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  3393. MyBase.New(info, context)
  3394. Me.InitVars
  3395. End Sub
  3396. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3397. Public ReadOnly Property TitleColumn() As Global.System.Data.DataColumn
  3398. Get
  3399. Return Me.columnTitle
  3400. End Get
  3401. End Property
  3402. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3403. Public ReadOnly Property CreditsColumn() As Global.System.Data.DataColumn
  3404. Get
  3405. Return Me.columnCredits
  3406. End Get
  3407. End Property
  3408. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3409. Public ReadOnly Property DepartmentNameColumn() As Global.System.Data.DataColumn
  3410. Get
  3411. Return Me.columnDepartmentName
  3412. End Get
  3413. End Property
  3414. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3415. Public ReadOnly Property InstructorColumn() As Global.System.Data.DataColumn
  3416. Get
  3417. Return Me.columnInstructor
  3418. End Get
  3419. End Property
  3420. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3421. Global.System.ComponentModel.Browsable(false)> _
  3422. Public ReadOnly Property Count() As Integer
  3423. Get
  3424. Return Me.Rows.Count
  3425. End Get
  3426. End Property
  3427. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3428. Public Default ReadOnly Property Item(ByVal index As Integer) As CourseListRow
  3429. Get
  3430. Return CType(Me.Rows(index),CourseListRow)
  3431. End Get
  3432. End Property
  3433. Public Event CourseListRowChanging As CourseListRowChangeEventHandler
  3434. Public Event CourseListRowChanged As CourseListRowChangeEventHandler
  3435. Public Event CourseListRowDeleting As CourseListRowChangeEventHandler
  3436. Public Event CourseListRowDeleted As CourseListRowChangeEventHandler
  3437. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3438. Public Overloads Sub AddCourseListRow(ByVal row As CourseListRow)
  3439. Me.Rows.Add(row)
  3440. End Sub
  3441. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3442. Public Overloads Function AddCourseListRow(ByVal Title As String, ByVal Credits As Integer, ByVal DepartmentName As String, ByVal Instructor As String) As CourseListRow
  3443. Dim rowCourseListRow As CourseListRow = CType(Me.NewRow,CourseListRow)
  3444. Dim columnValuesArray() As Object = New Object() {Title, Credits, DepartmentName, Instructor}
  3445. rowCourseListRow.ItemArray = columnValuesArray
  3446. Me.Rows.Add(rowCourseListRow)
  3447. Return rowCourseListRow
  3448. End Function
  3449. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3450. Public Overrides Function Clone() As Global.System.Data.DataTable
  3451. Dim cln As CourseListDataTable = CType(MyBase.Clone,CourseListDataTable)
  3452. cln.InitVars
  3453. Return cln
  3454. End Function
  3455. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3456. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  3457. Return New CourseListDataTable
  3458. End Function
  3459. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3460. Friend Sub InitVars()
  3461. Me.columnTitle = MyBase.Columns("Title")
  3462. Me.columnCredits = MyBase.Columns("Credits")
  3463. Me.columnDepartmentName = MyBase.Columns("DepartmentName")
  3464. Me.columnInstructor = MyBase.Columns("Instructor")
  3465. End Sub
  3466. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3467. Private Sub InitClass()
  3468. Me.columnTitle = New Global.System.Data.DataColumn("Title", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  3469. MyBase.Columns.Add(Me.columnTitle)
  3470. Me.columnCredits = New Global.System.Data.DataColumn("Credits", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
  3471. MyBase.Columns.Add(Me.columnCredits)
  3472. Me.columnDepartmentName = New Global.System.Data.DataColumn("DepartmentName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  3473. MyBase.Columns.Add(Me.columnDepartmentName)
  3474. Me.columnInstructor = New Global.System.Data.DataColumn("Instructor", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  3475. MyBase.Columns.Add(Me.columnInstructor)
  3476. Me.columnTitle.AllowDBNull = false
  3477. Me.columnTitle.MaxLength = 100
  3478. Me.columnCredits.AllowDBNull = false
  3479. Me.columnDepartmentName.MaxLength = 50
  3480. Me.columnInstructor.ReadOnly = true
  3481. Me.columnInstructor.MaxLength = 101
  3482. End Sub
  3483. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3484. Public Function NewCourseListRow() As CourseListRow
  3485. Return CType(Me.NewRow,CourseListRow)
  3486. End Function
  3487. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3488. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  3489. Return New CourseListRow(builder)
  3490. End Function
  3491. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3492. Protected Overrides Function GetRowType() As Global.System.Type
  3493. Return GetType(CourseListRow)
  3494. End Function
  3495. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3496. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3497. MyBase.OnRowChanged(e)
  3498. If (Not (Me.CourseListRowChangedEvent) Is Nothing) Then
  3499. RaiseEvent CourseListRowChanged(Me, New CourseListRowChangeEvent(CType(e.Row,CourseListRow), e.Action))
  3500. End If
  3501. End Sub
  3502. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3503. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3504. MyBase.OnRowChanging(e)
  3505. If (Not (Me.CourseListRowChangingEvent) Is Nothing) Then
  3506. RaiseEvent CourseListRowChanging(Me, New CourseListRowChangeEvent(CType(e.Row,CourseListRow), e.Action))
  3507. End If
  3508. End Sub
  3509. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3510. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3511. MyBase.OnRowDeleted(e)
  3512. If (Not (Me.CourseListRowDeletedEvent) Is Nothing) Then
  3513. RaiseEvent CourseListRowDeleted(Me, New CourseListRowChangeEvent(CType(e.Row,CourseListRow), e.Action))
  3514. End If
  3515. End Sub
  3516. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3517. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3518. MyBase.OnRowDeleting(e)
  3519. If (Not (Me.CourseListRowDeletingEvent) Is Nothing) Then
  3520. RaiseEvent CourseListRowDeleting(Me, New CourseListRowChangeEvent(CType(e.Row,CourseListRow), e.Action))
  3521. End If
  3522. End Sub
  3523. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3524. Public Sub RemoveCourseListRow(ByVal row As CourseListRow)
  3525. Me.Rows.Remove(row)
  3526. End Sub
  3527. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3528. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  3529. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  3530. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  3531. Dim ds As SchoolDataSet = New SchoolDataSet
  3532. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  3533. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  3534. any1.MinOccurs = New Decimal(0)
  3535. any1.MaxOccurs = Decimal.MaxValue
  3536. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  3537. sequence.Items.Add(any1)
  3538. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  3539. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  3540. any2.MinOccurs = New Decimal(1)
  3541. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  3542. sequence.Items.Add(any2)
  3543. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  3544. attribute1.Name = "namespace"
  3545. attribute1.FixedValue = ds.Namespace
  3546. type.Attributes.Add(attribute1)
  3547. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  3548. attribute2.Name = "tableTypeName"
  3549. attribute2.FixedValue = "CourseListDataTable"
  3550. type.Attributes.Add(attribute2)
  3551. type.Particle = sequence
  3552. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  3553. If xs.Contains(dsSchema.TargetNamespace) Then
  3554. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  3555. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  3556. Try
  3557. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  3558. dsSchema.Write(s1)
  3559. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  3560. Do While schemas.MoveNext
  3561. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  3562. s2.SetLength(0)
  3563. schema.Write(s2)
  3564. If (s1.Length = s2.Length) Then
  3565. s1.Position = 0
  3566. s2.Position = 0
  3567. Do While ((s1.Position <> s1.Length) _
  3568. AndAlso (s1.ReadByte = s2.ReadByte))
  3569. Loop
  3570. If (s1.Position = s1.Length) Then
  3571. Return type
  3572. End If
  3573. End If
  3574. Loop
  3575. Finally
  3576. If (Not (s1) Is Nothing) Then
  3577. s1.Close
  3578. End If
  3579. If (Not (s2) Is Nothing) Then
  3580. s2.Close
  3581. End If
  3582. End Try
  3583. End If
  3584. xs.Add(dsSchema)
  3585. Return type
  3586. End Function
  3587. End Class
  3588. '''<summary>
  3589. '''Represents the strongly named DataTable class.
  3590. '''</summary>
  3591. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  3592. Global.System.Serializable(), _
  3593. Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
  3594. Partial Public Class StudentListDataTable
  3595. Inherits Global.System.Data.TypedTableBase(Of StudentListRow)
  3596. Private columnStudentName As Global.System.Data.DataColumn
  3597. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3598. Public Sub New()
  3599. MyBase.New
  3600. Me.TableName = "StudentList"
  3601. Me.BeginInit
  3602. Me.InitClass
  3603. Me.EndInit
  3604. End Sub
  3605. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3606. Friend Sub New(ByVal table As Global.System.Data.DataTable)
  3607. MyBase.New
  3608. Me.TableName = table.TableName
  3609. If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
  3610. Me.CaseSensitive = table.CaseSensitive
  3611. End If
  3612. If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
  3613. Me.Locale = table.Locale
  3614. End If
  3615. If (table.Namespace <> table.DataSet.Namespace) Then
  3616. Me.Namespace = table.Namespace
  3617. End If
  3618. Me.Prefix = table.Prefix
  3619. Me.MinimumCapacity = table.MinimumCapacity
  3620. End Sub
  3621. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3622. Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
  3623. MyBase.New(info, context)
  3624. Me.InitVars
  3625. End Sub
  3626. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3627. Public ReadOnly Property StudentNameColumn() As Global.System.Data.DataColumn
  3628. Get
  3629. Return Me.columnStudentName
  3630. End Get
  3631. End Property
  3632. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  3633. Global.System.ComponentModel.Browsable(false)> _
  3634. Public ReadOnly Property Count() As Integer
  3635. Get
  3636. Return Me.Rows.Count
  3637. End Get
  3638. End Property
  3639. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3640. Public Default ReadOnly Property Item(ByVal index As Integer) As StudentListRow
  3641. Get
  3642. Return CType(Me.Rows(index),StudentListRow)
  3643. End Get
  3644. End Property
  3645. Public Event StudentListRowChanging As StudentListRowChangeEventHandler
  3646. Public Event StudentListRowChanged As StudentListRowChangeEventHandler
  3647. Public Event StudentListRowDeleting As StudentListRowChangeEventHandler
  3648. Public Event StudentListRowDeleted As StudentListRowChangeEventHandler
  3649. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3650. Public Overloads Sub AddStudentListRow(ByVal row As StudentListRow)
  3651. Me.Rows.Add(row)
  3652. End Sub
  3653. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3654. Public Overloads Function AddStudentListRow(ByVal StudentName As String) As StudentListRow
  3655. Dim rowStudentListRow As StudentListRow = CType(Me.NewRow,StudentListRow)
  3656. Dim columnValuesArray() As Object = New Object() {StudentName}
  3657. rowStudentListRow.ItemArray = columnValuesArray
  3658. Me.Rows.Add(rowStudentListRow)
  3659. Return rowStudentListRow
  3660. End Function
  3661. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3662. Public Overrides Function Clone() As Global.System.Data.DataTable
  3663. Dim cln As StudentListDataTable = CType(MyBase.Clone,StudentListDataTable)
  3664. cln.InitVars
  3665. Return cln
  3666. End Function
  3667. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3668. Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
  3669. Return New StudentListDataTable
  3670. End Function
  3671. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3672. Friend Sub InitVars()
  3673. Me.columnStudentName = MyBase.Columns("StudentName")
  3674. End Sub
  3675. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3676. Private Sub InitClass()
  3677. Me.columnStudentName = New Global.System.Data.DataColumn("StudentName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
  3678. MyBase.Columns.Add(Me.columnStudentName)
  3679. Me.columnStudentName.ReadOnly = true
  3680. Me.columnStudentName.MaxLength = 101
  3681. End Sub
  3682. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3683. Public Function NewStudentListRow() As StudentListRow
  3684. Return CType(Me.NewRow,StudentListRow)
  3685. End Function
  3686. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3687. Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
  3688. Return New StudentListRow(builder)
  3689. End Function
  3690. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3691. Protected Overrides Function GetRowType() As Global.System.Type
  3692. Return GetType(StudentListRow)
  3693. End Function
  3694. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3695. Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3696. MyBase.OnRowChanged(e)
  3697. If (Not (Me.StudentListRowChangedEvent) Is Nothing) Then
  3698. RaiseEvent StudentListRowChanged(Me, New StudentListRowChangeEvent(CType(e.Row,StudentListRow), e.Action))
  3699. End If
  3700. End Sub
  3701. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3702. Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3703. MyBase.OnRowChanging(e)
  3704. If (Not (Me.StudentListRowChangingEvent) Is Nothing) Then
  3705. RaiseEvent StudentListRowChanging(Me, New StudentListRowChangeEvent(CType(e.Row,StudentListRow), e.Action))
  3706. End If
  3707. End Sub
  3708. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3709. Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3710. MyBase.OnRowDeleted(e)
  3711. If (Not (Me.StudentListRowDeletedEvent) Is Nothing) Then
  3712. RaiseEvent StudentListRowDeleted(Me, New StudentListRowChangeEvent(CType(e.Row,StudentListRow), e.Action))
  3713. End If
  3714. End Sub
  3715. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3716. Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
  3717. MyBase.OnRowDeleting(e)
  3718. If (Not (Me.StudentListRowDeletingEvent) Is Nothing) Then
  3719. RaiseEvent StudentListRowDeleting(Me, New StudentListRowChangeEvent(CType(e.Row,StudentListRow), e.Action))
  3720. End If
  3721. End Sub
  3722. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3723. Public Sub RemoveStudentListRow(ByVal row As StudentListRow)
  3724. Me.Rows.Remove(row)
  3725. End Sub
  3726. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3727. Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
  3728. Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
  3729. Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
  3730. Dim ds As SchoolDataSet = New SchoolDataSet
  3731. Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  3732. any1.Namespace = "http://www.w3.org/2001/XMLSchema"
  3733. any1.MinOccurs = New Decimal(0)
  3734. any1.MaxOccurs = Decimal.MaxValue
  3735. any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  3736. sequence.Items.Add(any1)
  3737. Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
  3738. any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
  3739. any2.MinOccurs = New Decimal(1)
  3740. any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
  3741. sequence.Items.Add(any2)
  3742. Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  3743. attribute1.Name = "namespace"
  3744. attribute1.FixedValue = ds.Namespace
  3745. type.Attributes.Add(attribute1)
  3746. Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
  3747. attribute2.Name = "tableTypeName"
  3748. attribute2.FixedValue = "StudentListDataTable"
  3749. type.Attributes.Add(attribute2)
  3750. type.Particle = sequence
  3751. Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
  3752. If xs.Contains(dsSchema.TargetNamespace) Then
  3753. Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  3754. Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
  3755. Try
  3756. Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
  3757. dsSchema.Write(s1)
  3758. Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
  3759. Do While schemas.MoveNext
  3760. schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
  3761. s2.SetLength(0)
  3762. schema.Write(s2)
  3763. If (s1.Length = s2.Length) Then
  3764. s1.Position = 0
  3765. s2.Position = 0
  3766. Do While ((s1.Position <> s1.Length) _
  3767. AndAlso (s1.ReadByte = s2.ReadByte))
  3768. Loop
  3769. If (s1.Position = s1.Length) Then
  3770. Return type
  3771. End If
  3772. End If
  3773. Loop
  3774. Finally
  3775. If (Not (s1) Is Nothing) Then
  3776. s1.Close
  3777. End If
  3778. If (Not (s2) Is Nothing) Then
  3779. s2.Close
  3780. End If
  3781. End Try
  3782. End If
  3783. xs.Add(dsSchema)
  3784. Return type
  3785. End Function
  3786. End Class
  3787. '''<summary>
  3788. '''Represents strongly named DataRow class.
  3789. '''</summary>
  3790. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  3791. Partial Public Class CourseRow
  3792. Inherits Global.System.Data.DataRow
  3793. Private tableCourse As CourseDataTable
  3794. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3795. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  3796. MyBase.New(rb)
  3797. Me.tableCourse = CType(Me.Table,CourseDataTable)
  3798. End Sub
  3799. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3800. Public Property CourseID() As Integer
  3801. Get
  3802. Return CType(Me(Me.tableCourse.CourseIDColumn),Integer)
  3803. End Get
  3804. Set
  3805. Me(Me.tableCourse.CourseIDColumn) = value
  3806. End Set
  3807. End Property
  3808. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3809. Public Property Title() As String
  3810. Get
  3811. Return CType(Me(Me.tableCourse.TitleColumn),String)
  3812. End Get
  3813. Set
  3814. Me(Me.tableCourse.TitleColumn) = value
  3815. End Set
  3816. End Property
  3817. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3818. Public Property Credits() As Integer
  3819. Get
  3820. Return CType(Me(Me.tableCourse.CreditsColumn),Integer)
  3821. End Get
  3822. Set
  3823. Me(Me.tableCourse.CreditsColumn) = value
  3824. End Set
  3825. End Property
  3826. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3827. Public Property DepartmentID() As Integer
  3828. Get
  3829. Return CType(Me(Me.tableCourse.DepartmentIDColumn),Integer)
  3830. End Get
  3831. Set
  3832. Me(Me.tableCourse.DepartmentIDColumn) = value
  3833. End Set
  3834. End Property
  3835. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3836. Public Property DepartmentRow() As DepartmentRow
  3837. Get
  3838. Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_Course_Department")),DepartmentRow)
  3839. End Get
  3840. Set
  3841. Me.SetParentRow(value, Me.Table.ParentRelations("FK_Course_Department"))
  3842. End Set
  3843. End Property
  3844. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3845. Public Function GetCourseGradeRows() As CourseGradeRow()
  3846. If (Me.Table.ChildRelations("FK_CourseGrade_Course") Is Nothing) Then
  3847. Return New CourseGradeRow(-1) {}
  3848. Else
  3849. Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseGrade_Course")),CourseGradeRow())
  3850. End If
  3851. End Function
  3852. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3853. Public Function GetCourseInstructorRows() As CourseInstructorRow()
  3854. If (Me.Table.ChildRelations("FK_CourseInstructor_Course") Is Nothing) Then
  3855. Return New CourseInstructorRow(-1) {}
  3856. Else
  3857. Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseInstructor_Course")),CourseInstructorRow())
  3858. End If
  3859. End Function
  3860. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3861. Public Function GetOnlineCourseRows() As OnlineCourseRow()
  3862. If (Me.Table.ChildRelations("FK_OnlineCourse_Course") Is Nothing) Then
  3863. Return New OnlineCourseRow(-1) {}
  3864. Else
  3865. Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OnlineCourse_Course")),OnlineCourseRow())
  3866. End If
  3867. End Function
  3868. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3869. Public Function GetOnsiteCourseRows() As OnsiteCourseRow()
  3870. If (Me.Table.ChildRelations("FK_OnsiteCourse_Course") Is Nothing) Then
  3871. Return New OnsiteCourseRow(-1) {}
  3872. Else
  3873. Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OnsiteCourse_Course")),OnsiteCourseRow())
  3874. End If
  3875. End Function
  3876. End Class
  3877. '''<summary>
  3878. '''Represents strongly named DataRow class.
  3879. '''</summary>
  3880. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  3881. Partial Public Class CourseGradeRow
  3882. Inherits Global.System.Data.DataRow
  3883. Private tableCourseGrade As CourseGradeDataTable
  3884. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3885. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  3886. MyBase.New(rb)
  3887. Me.tableCourseGrade = CType(Me.Table,CourseGradeDataTable)
  3888. End Sub
  3889. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3890. Public Property EnrollmentID() As Integer
  3891. Get
  3892. Return CType(Me(Me.tableCourseGrade.EnrollmentIDColumn),Integer)
  3893. End Get
  3894. Set
  3895. Me(Me.tableCourseGrade.EnrollmentIDColumn) = value
  3896. End Set
  3897. End Property
  3898. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3899. Public Property CourseID() As Integer
  3900. Get
  3901. Return CType(Me(Me.tableCourseGrade.CourseIDColumn),Integer)
  3902. End Get
  3903. Set
  3904. Me(Me.tableCourseGrade.CourseIDColumn) = value
  3905. End Set
  3906. End Property
  3907. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3908. Public Property StudentID() As Integer
  3909. Get
  3910. Return CType(Me(Me.tableCourseGrade.StudentIDColumn),Integer)
  3911. End Get
  3912. Set
  3913. Me(Me.tableCourseGrade.StudentIDColumn) = value
  3914. End Set
  3915. End Property
  3916. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3917. Public Property Grade() As Decimal
  3918. Get
  3919. Try
  3920. Return CType(Me(Me.tableCourseGrade.GradeColumn),Decimal)
  3921. Catch e As Global.System.InvalidCastException
  3922. Throw New Global.System.Data.StrongTypingException("The value for column 'Grade' in table 'CourseGrade' is DBNull.", e)
  3923. End Try
  3924. End Get
  3925. Set
  3926. Me(Me.tableCourseGrade.GradeColumn) = value
  3927. End Set
  3928. End Property
  3929. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3930. Public Property CourseRow() As CourseRow
  3931. Get
  3932. Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseGrade_Course")),CourseRow)
  3933. End Get
  3934. Set
  3935. Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseGrade_Course"))
  3936. End Set
  3937. End Property
  3938. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3939. Public Property PersonRow() As PersonRow
  3940. Get
  3941. Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseGrade_Student")),PersonRow)
  3942. End Get
  3943. Set
  3944. Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseGrade_Student"))
  3945. End Set
  3946. End Property
  3947. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3948. Public Function IsGradeNull() As Boolean
  3949. Return Me.IsNull(Me.tableCourseGrade.GradeColumn)
  3950. End Function
  3951. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3952. Public Sub SetGradeNull()
  3953. Me(Me.tableCourseGrade.GradeColumn) = Global.System.Convert.DBNull
  3954. End Sub
  3955. End Class
  3956. '''<summary>
  3957. '''Represents strongly named DataRow class.
  3958. '''</summary>
  3959. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  3960. Partial Public Class CourseInstructorRow
  3961. Inherits Global.System.Data.DataRow
  3962. Private tableCourseInstructor As CourseInstructorDataTable
  3963. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3964. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  3965. MyBase.New(rb)
  3966. Me.tableCourseInstructor = CType(Me.Table,CourseInstructorDataTable)
  3967. End Sub
  3968. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3969. Public Property CourseID() As Integer
  3970. Get
  3971. Return CType(Me(Me.tableCourseInstructor.CourseIDColumn),Integer)
  3972. End Get
  3973. Set
  3974. Me(Me.tableCourseInstructor.CourseIDColumn) = value
  3975. End Set
  3976. End Property
  3977. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3978. Public Property PersonID() As Integer
  3979. Get
  3980. Return CType(Me(Me.tableCourseInstructor.PersonIDColumn),Integer)
  3981. End Get
  3982. Set
  3983. Me(Me.tableCourseInstructor.PersonIDColumn) = value
  3984. End Set
  3985. End Property
  3986. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3987. Public Property CourseRow() As CourseRow
  3988. Get
  3989. Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseInstructor_Course")),CourseRow)
  3990. End Get
  3991. Set
  3992. Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseInstructor_Course"))
  3993. End Set
  3994. End Property
  3995. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  3996. Public Property PersonRow() As PersonRow
  3997. Get
  3998. Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseInstructor_Person")),PersonRow)
  3999. End Get
  4000. Set
  4001. Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseInstructor_Person"))
  4002. End Set
  4003. End Property
  4004. End Class
  4005. '''<summary>
  4006. '''Represents strongly named DataRow class.
  4007. '''</summary>
  4008. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4009. Partial Public Class DepartmentRow
  4010. Inherits Global.System.Data.DataRow
  4011. Private tableDepartment As DepartmentDataTable
  4012. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4013. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4014. MyBase.New(rb)
  4015. Me.tableDepartment = CType(Me.Table,DepartmentDataTable)
  4016. End Sub
  4017. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4018. Public Property DepartmentID() As Integer
  4019. Get
  4020. Return CType(Me(Me.tableDepartment.DepartmentIDColumn),Integer)
  4021. End Get
  4022. Set
  4023. Me(Me.tableDepartment.DepartmentIDColumn) = value
  4024. End Set
  4025. End Property
  4026. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4027. Public Property Name() As String
  4028. Get
  4029. Return CType(Me(Me.tableDepartment.NameColumn),String)
  4030. End Get
  4031. Set
  4032. Me(Me.tableDepartment.NameColumn) = value
  4033. End Set
  4034. End Property
  4035. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4036. Public Property Budget() As Decimal
  4037. Get
  4038. Return CType(Me(Me.tableDepartment.BudgetColumn),Decimal)
  4039. End Get
  4040. Set
  4041. Me(Me.tableDepartment.BudgetColumn) = value
  4042. End Set
  4043. End Property
  4044. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4045. Public Property StartDate() As Date
  4046. Get
  4047. Return CType(Me(Me.tableDepartment.StartDateColumn),Date)
  4048. End Get
  4049. Set
  4050. Me(Me.tableDepartment.StartDateColumn) = value
  4051. End Set
  4052. End Property
  4053. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4054. Public Property Administrator() As Integer
  4055. Get
  4056. Try
  4057. Return CType(Me(Me.tableDepartment.AdministratorColumn),Integer)
  4058. Catch e As Global.System.InvalidCastException
  4059. Throw New Global.System.Data.StrongTypingException("The value for column 'Administrator' in table 'Department' is DBNull.", e)
  4060. End Try
  4061. End Get
  4062. Set
  4063. Me(Me.tableDepartment.AdministratorColumn) = value
  4064. End Set
  4065. End Property
  4066. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4067. Public Function IsAdministratorNull() As Boolean
  4068. Return Me.IsNull(Me.tableDepartment.AdministratorColumn)
  4069. End Function
  4070. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4071. Public Sub SetAdministratorNull()
  4072. Me(Me.tableDepartment.AdministratorColumn) = Global.System.Convert.DBNull
  4073. End Sub
  4074. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4075. Public Function GetCourseRows() As CourseRow()
  4076. If (Me.Table.ChildRelations("FK_Course_Department") Is Nothing) Then
  4077. Return New CourseRow(-1) {}
  4078. Else
  4079. Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_Course_Department")),CourseRow())
  4080. End If
  4081. End Function
  4082. End Class
  4083. '''<summary>
  4084. '''Represents strongly named DataRow class.
  4085. '''</summary>
  4086. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4087. Partial Public Class OfficeAssignmentRow
  4088. Inherits Global.System.Data.DataRow
  4089. Private tableOfficeAssignment As OfficeAssignmentDataTable
  4090. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4091. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4092. MyBase.New(rb)
  4093. Me.tableOfficeAssignment = CType(Me.Table,OfficeAssignmentDataTable)
  4094. End Sub
  4095. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4096. Public Property InstructorID() As Integer
  4097. Get
  4098. Return CType(Me(Me.tableOfficeAssignment.InstructorIDColumn),Integer)
  4099. End Get
  4100. Set
  4101. Me(Me.tableOfficeAssignment.InstructorIDColumn) = value
  4102. End Set
  4103. End Property
  4104. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4105. Public Property Location() As String
  4106. Get
  4107. Return CType(Me(Me.tableOfficeAssignment.LocationColumn),String)
  4108. End Get
  4109. Set
  4110. Me(Me.tableOfficeAssignment.LocationColumn) = value
  4111. End Set
  4112. End Property
  4113. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4114. Public Property Timestamp() As Byte()
  4115. Get
  4116. Try
  4117. Return CType(Me(Me.tableOfficeAssignment.TimestampColumn),Byte())
  4118. Catch e As Global.System.InvalidCastException
  4119. Throw New Global.System.Data.StrongTypingException("The value for column 'Timestamp' in table 'OfficeAssignment' is DBNull.", e)
  4120. End Try
  4121. End Get
  4122. Set
  4123. Me(Me.tableOfficeAssignment.TimestampColumn) = value
  4124. End Set
  4125. End Property
  4126. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4127. Public Property PersonRow() As PersonRow
  4128. Get
  4129. Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OfficeAssignment_Person")),PersonRow)
  4130. End Get
  4131. Set
  4132. Me.SetParentRow(value, Me.Table.ParentRelations("FK_OfficeAssignment_Person"))
  4133. End Set
  4134. End Property
  4135. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4136. Public Function IsTimestampNull() As Boolean
  4137. Return Me.IsNull(Me.tableOfficeAssignment.TimestampColumn)
  4138. End Function
  4139. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4140. Public Sub SetTimestampNull()
  4141. Me(Me.tableOfficeAssignment.TimestampColumn) = Global.System.Convert.DBNull
  4142. End Sub
  4143. End Class
  4144. '''<summary>
  4145. '''Represents strongly named DataRow class.
  4146. '''</summary>
  4147. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4148. Partial Public Class OnlineCourseRow
  4149. Inherits Global.System.Data.DataRow
  4150. Private tableOnlineCourse As OnlineCourseDataTable
  4151. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4152. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4153. MyBase.New(rb)
  4154. Me.tableOnlineCourse = CType(Me.Table,OnlineCourseDataTable)
  4155. End Sub
  4156. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4157. Public Property CourseID() As Integer
  4158. Get
  4159. Return CType(Me(Me.tableOnlineCourse.CourseIDColumn),Integer)
  4160. End Get
  4161. Set
  4162. Me(Me.tableOnlineCourse.CourseIDColumn) = value
  4163. End Set
  4164. End Property
  4165. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4166. Public Property URL() As String
  4167. Get
  4168. Return CType(Me(Me.tableOnlineCourse.URLColumn),String)
  4169. End Get
  4170. Set
  4171. Me(Me.tableOnlineCourse.URLColumn) = value
  4172. End Set
  4173. End Property
  4174. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4175. Public Property CourseRow() As CourseRow
  4176. Get
  4177. Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OnlineCourse_Course")),CourseRow)
  4178. End Get
  4179. Set
  4180. Me.SetParentRow(value, Me.Table.ParentRelations("FK_OnlineCourse_Course"))
  4181. End Set
  4182. End Property
  4183. End Class
  4184. '''<summary>
  4185. '''Represents strongly named DataRow class.
  4186. '''</summary>
  4187. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4188. Partial Public Class OnsiteCourseRow
  4189. Inherits Global.System.Data.DataRow
  4190. Private tableOnsiteCourse As OnsiteCourseDataTable
  4191. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4192. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4193. MyBase.New(rb)
  4194. Me.tableOnsiteCourse = CType(Me.Table,OnsiteCourseDataTable)
  4195. End Sub
  4196. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4197. Public Property CourseID() As Integer
  4198. Get
  4199. Return CType(Me(Me.tableOnsiteCourse.CourseIDColumn),Integer)
  4200. End Get
  4201. Set
  4202. Me(Me.tableOnsiteCourse.CourseIDColumn) = value
  4203. End Set
  4204. End Property
  4205. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4206. Public Property Location() As String
  4207. Get
  4208. Return CType(Me(Me.tableOnsiteCourse.LocationColumn),String)
  4209. End Get
  4210. Set
  4211. Me(Me.tableOnsiteCourse.LocationColumn) = value
  4212. End Set
  4213. End Property
  4214. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4215. Public Property Days() As String
  4216. Get
  4217. Return CType(Me(Me.tableOnsiteCourse.DaysColumn),String)
  4218. End Get
  4219. Set
  4220. Me(Me.tableOnsiteCourse.DaysColumn) = value
  4221. End Set
  4222. End Property
  4223. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4224. Public Property Time() As Date
  4225. Get
  4226. Return CType(Me(Me.tableOnsiteCourse.TimeColumn),Date)
  4227. End Get
  4228. Set
  4229. Me(Me.tableOnsiteCourse.TimeColumn) = value
  4230. End Set
  4231. End Property
  4232. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4233. Public Property CourseRow() As CourseRow
  4234. Get
  4235. Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OnsiteCourse_Course")),CourseRow)
  4236. End Get
  4237. Set
  4238. Me.SetParentRow(value, Me.Table.ParentRelations("FK_OnsiteCourse_Course"))
  4239. End Set
  4240. End Property
  4241. End Class
  4242. '''<summary>
  4243. '''Represents strongly named DataRow class.
  4244. '''</summary>
  4245. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4246. Partial Public Class PersonRow
  4247. Inherits Global.System.Data.DataRow
  4248. Private tablePerson As PersonDataTable
  4249. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4250. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4251. MyBase.New(rb)
  4252. Me.tablePerson = CType(Me.Table,PersonDataTable)
  4253. End Sub
  4254. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4255. Public Property PersonID() As Integer
  4256. Get
  4257. Return CType(Me(Me.tablePerson.PersonIDColumn),Integer)
  4258. End Get
  4259. Set
  4260. Me(Me.tablePerson.PersonIDColumn) = value
  4261. End Set
  4262. End Property
  4263. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4264. Public Property LastName() As String
  4265. Get
  4266. Return CType(Me(Me.tablePerson.LastNameColumn),String)
  4267. End Get
  4268. Set
  4269. Me(Me.tablePerson.LastNameColumn) = value
  4270. End Set
  4271. End Property
  4272. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4273. Public Property FirstName() As String
  4274. Get
  4275. Return CType(Me(Me.tablePerson.FirstNameColumn),String)
  4276. End Get
  4277. Set
  4278. Me(Me.tablePerson.FirstNameColumn) = value
  4279. End Set
  4280. End Property
  4281. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4282. Public Property PersonCategory() As Short
  4283. Get
  4284. Return CType(Me(Me.tablePerson.PersonCategoryColumn),Short)
  4285. End Get
  4286. Set
  4287. Me(Me.tablePerson.PersonCategoryColumn) = value
  4288. End Set
  4289. End Property
  4290. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4291. Public Property HireDate() As Date
  4292. Get
  4293. Try
  4294. Return CType(Me(Me.tablePerson.HireDateColumn),Date)
  4295. Catch e As Global.System.InvalidCastException
  4296. Throw New Global.System.Data.StrongTypingException("The value for column 'HireDate' in table 'Person' is DBNull.", e)
  4297. End Try
  4298. End Get
  4299. Set
  4300. Me(Me.tablePerson.HireDateColumn) = value
  4301. End Set
  4302. End Property
  4303. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4304. Public Property EnrollmentDate() As Date
  4305. Get
  4306. Try
  4307. Return CType(Me(Me.tablePerson.EnrollmentDateColumn),Date)
  4308. Catch e As Global.System.InvalidCastException
  4309. Throw New Global.System.Data.StrongTypingException("The value for column 'EnrollmentDate' in table 'Person' is DBNull.", e)
  4310. End Try
  4311. End Get
  4312. Set
  4313. Me(Me.tablePerson.EnrollmentDateColumn) = value
  4314. End Set
  4315. End Property
  4316. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4317. Public Property Picture() As Byte()
  4318. Get
  4319. Try
  4320. Return CType(Me(Me.tablePerson.PictureColumn),Byte())
  4321. Catch e As Global.System.InvalidCastException
  4322. Throw New Global.System.Data.StrongTypingException("The value for column 'Picture' in table 'Person' is DBNull.", e)
  4323. End Try
  4324. End Get
  4325. Set
  4326. Me(Me.tablePerson.PictureColumn) = value
  4327. End Set
  4328. End Property
  4329. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4330. Public Function IsHireDateNull() As Boolean
  4331. Return Me.IsNull(Me.tablePerson.HireDateColumn)
  4332. End Function
  4333. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4334. Public Sub SetHireDateNull()
  4335. Me(Me.tablePerson.HireDateColumn) = Global.System.Convert.DBNull
  4336. End Sub
  4337. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4338. Public Function IsEnrollmentDateNull() As Boolean
  4339. Return Me.IsNull(Me.tablePerson.EnrollmentDateColumn)
  4340. End Function
  4341. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4342. Public Sub SetEnrollmentDateNull()
  4343. Me(Me.tablePerson.EnrollmentDateColumn) = Global.System.Convert.DBNull
  4344. End Sub
  4345. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4346. Public Function IsPictureNull() As Boolean
  4347. Return Me.IsNull(Me.tablePerson.PictureColumn)
  4348. End Function
  4349. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4350. Public Sub SetPictureNull()
  4351. Me(Me.tablePerson.PictureColumn) = Global.System.Convert.DBNull
  4352. End Sub
  4353. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4354. Public Function GetCourseGradeRows() As CourseGradeRow()
  4355. If (Me.Table.ChildRelations("FK_CourseGrade_Student") Is Nothing) Then
  4356. Return New CourseGradeRow(-1) {}
  4357. Else
  4358. Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseGrade_Student")),CourseGradeRow())
  4359. End If
  4360. End Function
  4361. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4362. Public Function GetCourseInstructorRows() As CourseInstructorRow()
  4363. If (Me.Table.ChildRelations("FK_CourseInstructor_Person") Is Nothing) Then
  4364. Return New CourseInstructorRow(-1) {}
  4365. Else
  4366. Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseInstructor_Person")),CourseInstructorRow())
  4367. End If
  4368. End Function
  4369. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4370. Public Function GetOfficeAssignmentRows() As OfficeAssignmentRow()
  4371. If (Me.Table.ChildRelations("FK_OfficeAssignment_Person") Is Nothing) Then
  4372. Return New OfficeAssignmentRow(-1) {}
  4373. Else
  4374. Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OfficeAssignment_Person")),OfficeAssignmentRow())
  4375. End If
  4376. End Function
  4377. End Class
  4378. '''<summary>
  4379. '''Represents strongly named DataRow class.
  4380. '''</summary>
  4381. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4382. Partial Public Class GetStudentGradesRow
  4383. Inherits Global.System.Data.DataRow
  4384. Private tableGetStudentGrades As GetStudentGradesDataTable
  4385. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4386. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4387. MyBase.New(rb)
  4388. Me.tableGetStudentGrades = CType(Me.Table,GetStudentGradesDataTable)
  4389. End Sub
  4390. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4391. Public Property EnrollmentID() As Integer
  4392. Get
  4393. Return CType(Me(Me.tableGetStudentGrades.EnrollmentIDColumn),Integer)
  4394. End Get
  4395. Set
  4396. Me(Me.tableGetStudentGrades.EnrollmentIDColumn) = value
  4397. End Set
  4398. End Property
  4399. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4400. Public Property Grade() As Decimal
  4401. Get
  4402. Try
  4403. Return CType(Me(Me.tableGetStudentGrades.GradeColumn),Decimal)
  4404. Catch e As Global.System.InvalidCastException
  4405. Throw New Global.System.Data.StrongTypingException("The value for column 'Grade' in table 'GetStudentGrades' is DBNull.", e)
  4406. End Try
  4407. End Get
  4408. Set
  4409. Me(Me.tableGetStudentGrades.GradeColumn) = value
  4410. End Set
  4411. End Property
  4412. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4413. Public Function IsGradeNull() As Boolean
  4414. Return Me.IsNull(Me.tableGetStudentGrades.GradeColumn)
  4415. End Function
  4416. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4417. Public Sub SetGradeNull()
  4418. Me(Me.tableGetStudentGrades.GradeColumn) = Global.System.Convert.DBNull
  4419. End Sub
  4420. End Class
  4421. '''<summary>
  4422. '''Represents strongly named DataRow class.
  4423. '''</summary>
  4424. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4425. Partial Public Class InsertOfficeAssignmentRow
  4426. Inherits Global.System.Data.DataRow
  4427. Private tableInsertOfficeAssignment As InsertOfficeAssignmentDataTable
  4428. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4429. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4430. MyBase.New(rb)
  4431. Me.tableInsertOfficeAssignment = CType(Me.Table,InsertOfficeAssignmentDataTable)
  4432. End Sub
  4433. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4434. Public Property Timestamp() As Byte()
  4435. Get
  4436. Try
  4437. Return CType(Me(Me.tableInsertOfficeAssignment.TimestampColumn),Byte())
  4438. Catch e As Global.System.InvalidCastException
  4439. Throw New Global.System.Data.StrongTypingException("The value for column 'Timestamp' in table 'InsertOfficeAssignment' is DBNull.", e)
  4440. End Try
  4441. End Get
  4442. Set
  4443. Me(Me.tableInsertOfficeAssignment.TimestampColumn) = value
  4444. End Set
  4445. End Property
  4446. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4447. Public Function IsTimestampNull() As Boolean
  4448. Return Me.IsNull(Me.tableInsertOfficeAssignment.TimestampColumn)
  4449. End Function
  4450. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4451. Public Sub SetTimestampNull()
  4452. Me(Me.tableInsertOfficeAssignment.TimestampColumn) = Global.System.Convert.DBNull
  4453. End Sub
  4454. End Class
  4455. '''<summary>
  4456. '''Represents strongly named DataRow class.
  4457. '''</summary>
  4458. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4459. Partial Public Class InsertPersonRow
  4460. Inherits Global.System.Data.DataRow
  4461. Private tableInsertPerson As InsertPersonDataTable
  4462. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4463. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4464. MyBase.New(rb)
  4465. Me.tableInsertPerson = CType(Me.Table,InsertPersonDataTable)
  4466. End Sub
  4467. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4468. Public Property NewPersonID() As Decimal
  4469. Get
  4470. Try
  4471. Return CType(Me(Me.tableInsertPerson.NewPersonIDColumn),Decimal)
  4472. Catch e As Global.System.InvalidCastException
  4473. Throw New Global.System.Data.StrongTypingException("The value for column 'NewPersonID' in table 'InsertPerson' is DBNull.", e)
  4474. End Try
  4475. End Get
  4476. Set
  4477. Me(Me.tableInsertPerson.NewPersonIDColumn) = value
  4478. End Set
  4479. End Property
  4480. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4481. Public Function IsNewPersonIDNull() As Boolean
  4482. Return Me.IsNull(Me.tableInsertPerson.NewPersonIDColumn)
  4483. End Function
  4484. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4485. Public Sub SetNewPersonIDNull()
  4486. Me(Me.tableInsertPerson.NewPersonIDColumn) = Global.System.Convert.DBNull
  4487. End Sub
  4488. End Class
  4489. '''<summary>
  4490. '''Represents strongly named DataRow class.
  4491. '''</summary>
  4492. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4493. Partial Public Class UpdateOfficeAssignmentRow
  4494. Inherits Global.System.Data.DataRow
  4495. Private tableUpdateOfficeAssignment As UpdateOfficeAssignmentDataTable
  4496. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4497. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4498. MyBase.New(rb)
  4499. Me.tableUpdateOfficeAssignment = CType(Me.Table,UpdateOfficeAssignmentDataTable)
  4500. End Sub
  4501. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4502. Public Property Timestamp() As Byte()
  4503. Get
  4504. Try
  4505. Return CType(Me(Me.tableUpdateOfficeAssignment.TimestampColumn),Byte())
  4506. Catch e As Global.System.InvalidCastException
  4507. Throw New Global.System.Data.StrongTypingException("The value for column 'Timestamp' in table 'UpdateOfficeAssignment' is DBNull.", e)
  4508. End Try
  4509. End Get
  4510. Set
  4511. Me(Me.tableUpdateOfficeAssignment.TimestampColumn) = value
  4512. End Set
  4513. End Property
  4514. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4515. Public Function IsTimestampNull() As Boolean
  4516. Return Me.IsNull(Me.tableUpdateOfficeAssignment.TimestampColumn)
  4517. End Function
  4518. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4519. Public Sub SetTimestampNull()
  4520. Me(Me.tableUpdateOfficeAssignment.TimestampColumn) = Global.System.Convert.DBNull
  4521. End Sub
  4522. End Class
  4523. '''<summary>
  4524. '''Represents strongly named DataRow class.
  4525. '''</summary>
  4526. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4527. Partial Public Class CourseListRow
  4528. Inherits Global.System.Data.DataRow
  4529. Private tableCourseList As CourseListDataTable
  4530. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4531. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4532. MyBase.New(rb)
  4533. Me.tableCourseList = CType(Me.Table,CourseListDataTable)
  4534. End Sub
  4535. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4536. Public Property Title() As String
  4537. Get
  4538. Return CType(Me(Me.tableCourseList.TitleColumn),String)
  4539. End Get
  4540. Set
  4541. Me(Me.tableCourseList.TitleColumn) = value
  4542. End Set
  4543. End Property
  4544. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4545. Public Property Credits() As Integer
  4546. Get
  4547. Return CType(Me(Me.tableCourseList.CreditsColumn),Integer)
  4548. End Get
  4549. Set
  4550. Me(Me.tableCourseList.CreditsColumn) = value
  4551. End Set
  4552. End Property
  4553. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4554. Public Property DepartmentName() As String
  4555. Get
  4556. Try
  4557. Return CType(Me(Me.tableCourseList.DepartmentNameColumn),String)
  4558. Catch e As Global.System.InvalidCastException
  4559. Throw New Global.System.Data.StrongTypingException("The value for column 'DepartmentName' in table 'CourseList' is DBNull.", e)
  4560. End Try
  4561. End Get
  4562. Set
  4563. Me(Me.tableCourseList.DepartmentNameColumn) = value
  4564. End Set
  4565. End Property
  4566. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4567. Public Property Instructor() As String
  4568. Get
  4569. Try
  4570. Return CType(Me(Me.tableCourseList.InstructorColumn),String)
  4571. Catch e As Global.System.InvalidCastException
  4572. Throw New Global.System.Data.StrongTypingException("The value for column 'Instructor' in table 'CourseList' is DBNull.", e)
  4573. End Try
  4574. End Get
  4575. Set
  4576. Me(Me.tableCourseList.InstructorColumn) = value
  4577. End Set
  4578. End Property
  4579. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4580. Public Function IsDepartmentNameNull() As Boolean
  4581. Return Me.IsNull(Me.tableCourseList.DepartmentNameColumn)
  4582. End Function
  4583. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4584. Public Sub SetDepartmentNameNull()
  4585. Me(Me.tableCourseList.DepartmentNameColumn) = Global.System.Convert.DBNull
  4586. End Sub
  4587. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4588. Public Function IsInstructorNull() As Boolean
  4589. Return Me.IsNull(Me.tableCourseList.InstructorColumn)
  4590. End Function
  4591. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4592. Public Sub SetInstructorNull()
  4593. Me(Me.tableCourseList.InstructorColumn) = Global.System.Convert.DBNull
  4594. End Sub
  4595. End Class
  4596. '''<summary>
  4597. '''Represents strongly named DataRow class.
  4598. '''</summary>
  4599. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4600. Partial Public Class StudentListRow
  4601. Inherits Global.System.Data.DataRow
  4602. Private tableStudentList As StudentListDataTable
  4603. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4604. Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
  4605. MyBase.New(rb)
  4606. Me.tableStudentList = CType(Me.Table,StudentListDataTable)
  4607. End Sub
  4608. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4609. Public Property StudentName() As String
  4610. Get
  4611. Try
  4612. Return CType(Me(Me.tableStudentList.StudentNameColumn),String)
  4613. Catch e As Global.System.InvalidCastException
  4614. Throw New Global.System.Data.StrongTypingException("The value for column 'StudentName' in table 'StudentList' is DBNull.", e)
  4615. End Try
  4616. End Get
  4617. Set
  4618. Me(Me.tableStudentList.StudentNameColumn) = value
  4619. End Set
  4620. End Property
  4621. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4622. Public Function IsStudentNameNull() As Boolean
  4623. Return Me.IsNull(Me.tableStudentList.StudentNameColumn)
  4624. End Function
  4625. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4626. Public Sub SetStudentNameNull()
  4627. Me(Me.tableStudentList.StudentNameColumn) = Global.System.Convert.DBNull
  4628. End Sub
  4629. End Class
  4630. '''<summary>
  4631. '''Row event argument class
  4632. '''</summary>
  4633. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4634. Public Class CourseRowChangeEvent
  4635. Inherits Global.System.EventArgs
  4636. Private eventRow As CourseRow
  4637. Private eventAction As Global.System.Data.DataRowAction
  4638. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4639. Public Sub New(ByVal row As CourseRow, ByVal action As Global.System.Data.DataRowAction)
  4640. MyBase.New
  4641. Me.eventRow = row
  4642. Me.eventAction = action
  4643. End Sub
  4644. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4645. Public ReadOnly Property Row() As CourseRow
  4646. Get
  4647. Return Me.eventRow
  4648. End Get
  4649. End Property
  4650. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4651. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4652. Get
  4653. Return Me.eventAction
  4654. End Get
  4655. End Property
  4656. End Class
  4657. '''<summary>
  4658. '''Row event argument class
  4659. '''</summary>
  4660. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4661. Public Class CourseGradeRowChangeEvent
  4662. Inherits Global.System.EventArgs
  4663. Private eventRow As CourseGradeRow
  4664. Private eventAction As Global.System.Data.DataRowAction
  4665. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4666. Public Sub New(ByVal row As CourseGradeRow, ByVal action As Global.System.Data.DataRowAction)
  4667. MyBase.New
  4668. Me.eventRow = row
  4669. Me.eventAction = action
  4670. End Sub
  4671. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4672. Public ReadOnly Property Row() As CourseGradeRow
  4673. Get
  4674. Return Me.eventRow
  4675. End Get
  4676. End Property
  4677. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4678. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4679. Get
  4680. Return Me.eventAction
  4681. End Get
  4682. End Property
  4683. End Class
  4684. '''<summary>
  4685. '''Row event argument class
  4686. '''</summary>
  4687. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4688. Public Class CourseInstructorRowChangeEvent
  4689. Inherits Global.System.EventArgs
  4690. Private eventRow As CourseInstructorRow
  4691. Private eventAction As Global.System.Data.DataRowAction
  4692. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4693. Public Sub New(ByVal row As CourseInstructorRow, ByVal action As Global.System.Data.DataRowAction)
  4694. MyBase.New
  4695. Me.eventRow = row
  4696. Me.eventAction = action
  4697. End Sub
  4698. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4699. Public ReadOnly Property Row() As CourseInstructorRow
  4700. Get
  4701. Return Me.eventRow
  4702. End Get
  4703. End Property
  4704. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4705. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4706. Get
  4707. Return Me.eventAction
  4708. End Get
  4709. End Property
  4710. End Class
  4711. '''<summary>
  4712. '''Row event argument class
  4713. '''</summary>
  4714. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4715. Public Class DepartmentRowChangeEvent
  4716. Inherits Global.System.EventArgs
  4717. Private eventRow As DepartmentRow
  4718. Private eventAction As Global.System.Data.DataRowAction
  4719. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4720. Public Sub New(ByVal row As DepartmentRow, ByVal action As Global.System.Data.DataRowAction)
  4721. MyBase.New
  4722. Me.eventRow = row
  4723. Me.eventAction = action
  4724. End Sub
  4725. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4726. Public ReadOnly Property Row() As DepartmentRow
  4727. Get
  4728. Return Me.eventRow
  4729. End Get
  4730. End Property
  4731. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4732. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4733. Get
  4734. Return Me.eventAction
  4735. End Get
  4736. End Property
  4737. End Class
  4738. '''<summary>
  4739. '''Row event argument class
  4740. '''</summary>
  4741. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4742. Public Class OfficeAssignmentRowChangeEvent
  4743. Inherits Global.System.EventArgs
  4744. Private eventRow As OfficeAssignmentRow
  4745. Private eventAction As Global.System.Data.DataRowAction
  4746. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4747. Public Sub New(ByVal row As OfficeAssignmentRow, ByVal action As Global.System.Data.DataRowAction)
  4748. MyBase.New
  4749. Me.eventRow = row
  4750. Me.eventAction = action
  4751. End Sub
  4752. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4753. Public ReadOnly Property Row() As OfficeAssignmentRow
  4754. Get
  4755. Return Me.eventRow
  4756. End Get
  4757. End Property
  4758. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4759. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4760. Get
  4761. Return Me.eventAction
  4762. End Get
  4763. End Property
  4764. End Class
  4765. '''<summary>
  4766. '''Row event argument class
  4767. '''</summary>
  4768. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4769. Public Class OnlineCourseRowChangeEvent
  4770. Inherits Global.System.EventArgs
  4771. Private eventRow As OnlineCourseRow
  4772. Private eventAction As Global.System.Data.DataRowAction
  4773. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4774. Public Sub New(ByVal row As OnlineCourseRow, ByVal action As Global.System.Data.DataRowAction)
  4775. MyBase.New
  4776. Me.eventRow = row
  4777. Me.eventAction = action
  4778. End Sub
  4779. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4780. Public ReadOnly Property Row() As OnlineCourseRow
  4781. Get
  4782. Return Me.eventRow
  4783. End Get
  4784. End Property
  4785. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4786. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4787. Get
  4788. Return Me.eventAction
  4789. End Get
  4790. End Property
  4791. End Class
  4792. '''<summary>
  4793. '''Row event argument class
  4794. '''</summary>
  4795. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4796. Public Class OnsiteCourseRowChangeEvent
  4797. Inherits Global.System.EventArgs
  4798. Private eventRow As OnsiteCourseRow
  4799. Private eventAction As Global.System.Data.DataRowAction
  4800. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4801. Public Sub New(ByVal row As OnsiteCourseRow, ByVal action As Global.System.Data.DataRowAction)
  4802. MyBase.New
  4803. Me.eventRow = row
  4804. Me.eventAction = action
  4805. End Sub
  4806. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4807. Public ReadOnly Property Row() As OnsiteCourseRow
  4808. Get
  4809. Return Me.eventRow
  4810. End Get
  4811. End Property
  4812. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4813. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4814. Get
  4815. Return Me.eventAction
  4816. End Get
  4817. End Property
  4818. End Class
  4819. '''<summary>
  4820. '''Row event argument class
  4821. '''</summary>
  4822. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4823. Public Class PersonRowChangeEvent
  4824. Inherits Global.System.EventArgs
  4825. Private eventRow As PersonRow
  4826. Private eventAction As Global.System.Data.DataRowAction
  4827. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4828. Public Sub New(ByVal row As PersonRow, ByVal action As Global.System.Data.DataRowAction)
  4829. MyBase.New
  4830. Me.eventRow = row
  4831. Me.eventAction = action
  4832. End Sub
  4833. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4834. Public ReadOnly Property Row() As PersonRow
  4835. Get
  4836. Return Me.eventRow
  4837. End Get
  4838. End Property
  4839. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4840. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4841. Get
  4842. Return Me.eventAction
  4843. End Get
  4844. End Property
  4845. End Class
  4846. '''<summary>
  4847. '''Row event argument class
  4848. '''</summary>
  4849. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4850. Public Class GetStudentGradesRowChangeEvent
  4851. Inherits Global.System.EventArgs
  4852. Private eventRow As GetStudentGradesRow
  4853. Private eventAction As Global.System.Data.DataRowAction
  4854. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4855. Public Sub New(ByVal row As GetStudentGradesRow, ByVal action As Global.System.Data.DataRowAction)
  4856. MyBase.New
  4857. Me.eventRow = row
  4858. Me.eventAction = action
  4859. End Sub
  4860. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4861. Public ReadOnly Property Row() As GetStudentGradesRow
  4862. Get
  4863. Return Me.eventRow
  4864. End Get
  4865. End Property
  4866. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4867. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4868. Get
  4869. Return Me.eventAction
  4870. End Get
  4871. End Property
  4872. End Class
  4873. '''<summary>
  4874. '''Row event argument class
  4875. '''</summary>
  4876. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4877. Public Class InsertOfficeAssignmentRowChangeEvent
  4878. Inherits Global.System.EventArgs
  4879. Private eventRow As InsertOfficeAssignmentRow
  4880. Private eventAction As Global.System.Data.DataRowAction
  4881. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4882. Public Sub New(ByVal row As InsertOfficeAssignmentRow, ByVal action As Global.System.Data.DataRowAction)
  4883. MyBase.New
  4884. Me.eventRow = row
  4885. Me.eventAction = action
  4886. End Sub
  4887. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4888. Public ReadOnly Property Row() As InsertOfficeAssignmentRow
  4889. Get
  4890. Return Me.eventRow
  4891. End Get
  4892. End Property
  4893. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4894. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4895. Get
  4896. Return Me.eventAction
  4897. End Get
  4898. End Property
  4899. End Class
  4900. '''<summary>
  4901. '''Row event argument class
  4902. '''</summary>
  4903. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4904. Public Class InsertPersonRowChangeEvent
  4905. Inherits Global.System.EventArgs
  4906. Private eventRow As InsertPersonRow
  4907. Private eventAction As Global.System.Data.DataRowAction
  4908. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4909. Public Sub New(ByVal row As InsertPersonRow, ByVal action As Global.System.Data.DataRowAction)
  4910. MyBase.New
  4911. Me.eventRow = row
  4912. Me.eventAction = action
  4913. End Sub
  4914. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4915. Public ReadOnly Property Row() As InsertPersonRow
  4916. Get
  4917. Return Me.eventRow
  4918. End Get
  4919. End Property
  4920. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4921. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4922. Get
  4923. Return Me.eventAction
  4924. End Get
  4925. End Property
  4926. End Class
  4927. '''<summary>
  4928. '''Row event argument class
  4929. '''</summary>
  4930. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4931. Public Class UpdateOfficeAssignmentRowChangeEvent
  4932. Inherits Global.System.EventArgs
  4933. Private eventRow As UpdateOfficeAssignmentRow
  4934. Private eventAction As Global.System.Data.DataRowAction
  4935. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4936. Public Sub New(ByVal row As UpdateOfficeAssignmentRow, ByVal action As Global.System.Data.DataRowAction)
  4937. MyBase.New
  4938. Me.eventRow = row
  4939. Me.eventAction = action
  4940. End Sub
  4941. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4942. Public ReadOnly Property Row() As UpdateOfficeAssignmentRow
  4943. Get
  4944. Return Me.eventRow
  4945. End Get
  4946. End Property
  4947. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4948. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4949. Get
  4950. Return Me.eventAction
  4951. End Get
  4952. End Property
  4953. End Class
  4954. '''<summary>
  4955. '''Row event argument class
  4956. '''</summary>
  4957. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4958. Public Class CourseListRowChangeEvent
  4959. Inherits Global.System.EventArgs
  4960. Private eventRow As CourseListRow
  4961. Private eventAction As Global.System.Data.DataRowAction
  4962. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4963. Public Sub New(ByVal row As CourseListRow, ByVal action As Global.System.Data.DataRowAction)
  4964. MyBase.New
  4965. Me.eventRow = row
  4966. Me.eventAction = action
  4967. End Sub
  4968. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4969. Public ReadOnly Property Row() As CourseListRow
  4970. Get
  4971. Return Me.eventRow
  4972. End Get
  4973. End Property
  4974. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4975. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  4976. Get
  4977. Return Me.eventAction
  4978. End Get
  4979. End Property
  4980. End Class
  4981. '''<summary>
  4982. '''Row event argument class
  4983. '''</summary>
  4984. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
  4985. Public Class StudentListRowChangeEvent
  4986. Inherits Global.System.EventArgs
  4987. Private eventRow As StudentListRow
  4988. Private eventAction As Global.System.Data.DataRowAction
  4989. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4990. Public Sub New(ByVal row As StudentListRow, ByVal action As Global.System.Data.DataRowAction)
  4991. MyBase.New
  4992. Me.eventRow = row
  4993. Me.eventAction = action
  4994. End Sub
  4995. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  4996. Public ReadOnly Property Row() As StudentListRow
  4997. Get
  4998. Return Me.eventRow
  4999. End Get
  5000. End Property
  5001. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5002. Public ReadOnly Property Action() As Global.System.Data.DataRowAction
  5003. Get
  5004. Return Me.eventAction
  5005. End Get
  5006. End Property
  5007. End Class
  5008. End Class
  5009. Namespace SchoolDataSetTableAdapters
  5010. '''<summary>
  5011. '''Represents the connection and commands used to retrieve and save data.
  5012. '''</summary>
  5013. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  5014. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  5015. Global.System.ComponentModel.ToolboxItem(true), _
  5016. Global.System.ComponentModel.DataObjectAttribute(true), _
  5017. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  5018. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  5019. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5020. Partial Public Class CourseTableAdapter
  5021. Inherits Global.System.ComponentModel.Component
  5022. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  5023. Private _connection As Global.System.Data.SqlClient.SqlConnection
  5024. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  5025. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  5026. Private _clearBeforeFill As Boolean
  5027. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5028. Public Sub New()
  5029. MyBase.New
  5030. Me.ClearBeforeFill = true
  5031. End Sub
  5032. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5033. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  5034. Get
  5035. If (Me._adapter Is Nothing) Then
  5036. Me.InitAdapter
  5037. End If
  5038. Return Me._adapter
  5039. End Get
  5040. End Property
  5041. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5042. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  5043. Get
  5044. If (Me._connection Is Nothing) Then
  5045. Me.InitConnection
  5046. End If
  5047. Return Me._connection
  5048. End Get
  5049. Set
  5050. Me._connection = value
  5051. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  5052. Me.Adapter.InsertCommand.Connection = value
  5053. End If
  5054. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  5055. Me.Adapter.DeleteCommand.Connection = value
  5056. End If
  5057. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  5058. Me.Adapter.UpdateCommand.Connection = value
  5059. End If
  5060. Dim i As Integer = 0
  5061. Do While (i < Me.CommandCollection.Length)
  5062. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  5063. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  5064. End If
  5065. i = (i + 1)
  5066. Loop
  5067. End Set
  5068. End Property
  5069. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5070. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  5071. Get
  5072. Return Me._transaction
  5073. End Get
  5074. Set
  5075. Me._transaction = value
  5076. Dim i As Integer = 0
  5077. Do While (i < Me.CommandCollection.Length)
  5078. Me.CommandCollection(i).Transaction = Me._transaction
  5079. i = (i + 1)
  5080. Loop
  5081. If ((Not (Me.Adapter) Is Nothing) _
  5082. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  5083. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  5084. End If
  5085. If ((Not (Me.Adapter) Is Nothing) _
  5086. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  5087. Me.Adapter.InsertCommand.Transaction = Me._transaction
  5088. End If
  5089. If ((Not (Me.Adapter) Is Nothing) _
  5090. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  5091. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  5092. End If
  5093. End Set
  5094. End Property
  5095. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5096. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  5097. Get
  5098. If (Me._commandCollection Is Nothing) Then
  5099. Me.InitCommandCollection
  5100. End If
  5101. Return Me._commandCollection
  5102. End Get
  5103. End Property
  5104. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5105. Public Property ClearBeforeFill() As Boolean
  5106. Get
  5107. Return Me._clearBeforeFill
  5108. End Get
  5109. Set
  5110. Me._clearBeforeFill = value
  5111. End Set
  5112. End Property
  5113. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5114. Private Sub InitAdapter()
  5115. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  5116. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  5117. tableMapping.SourceTable = "Table"
  5118. tableMapping.DataSetTable = "Course"
  5119. tableMapping.ColumnMappings.Add("CourseID", "CourseID")
  5120. tableMapping.ColumnMappings.Add("Title", "Title")
  5121. tableMapping.ColumnMappings.Add("Credits", "Credits")
  5122. tableMapping.ColumnMappings.Add("DepartmentID", "DepartmentID")
  5123. Me._adapter.TableMappings.Add(tableMapping)
  5124. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
  5125. Me._adapter.DeleteCommand.Connection = Me.Connection
  5126. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Course] WHERE (([CourseID] = @Original_CourseID) AND ([Title] "& _
  5127. "= @Original_Title) AND ([Credits] = @Original_Credits) AND ([DepartmentID] = @Or"& _
  5128. "iginal_DepartmentID))"
  5129. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  5130. 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, "", "", ""))
  5131. 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, "", "", ""))
  5132. 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, "", "", ""))
  5133. 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, "", "", ""))
  5134. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
  5135. Me._adapter.InsertCommand.Connection = Me.Connection
  5136. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Course] ([CourseID], [Title], [Credits], [DepartmentID]) VALUE"& _
  5137. "S (@CourseID, @Title, @Credits, @DepartmentID);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Title, Credits"& _
  5138. ", DepartmentID FROM Course WHERE (CourseID = @CourseID)"
  5139. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  5140. 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, "", "", ""))
  5141. 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, "", "", ""))
  5142. 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, "", "", ""))
  5143. 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, "", "", ""))
  5144. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
  5145. Me._adapter.UpdateCommand.Connection = Me.Connection
  5146. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Course] SET [CourseID] = @CourseID, [Title] = @Title, [Credits] = @"& _
  5147. "Credits, [DepartmentID] = @DepartmentID WHERE (([CourseID] = @Original_CourseID)"& _
  5148. " AND ([Title] = @Original_Title) AND ([Credits] = @Original_Credits) AND ([Depar"& _
  5149. "tmentID] = @Original_DepartmentID));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Title, Credits, Departmen"& _
  5150. "tID FROM Course WHERE (CourseID = @CourseID)"
  5151. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  5152. 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, "", "", ""))
  5153. 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, "", "", ""))
  5154. 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, "", "", ""))
  5155. 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, "", "", ""))
  5156. 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, "", "", ""))
  5157. 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, "", "", ""))
  5158. 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, "", "", ""))
  5159. 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, "", "", ""))
  5160. End Sub
  5161. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5162. Private Sub InitConnection()
  5163. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  5164. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  5165. End Sub
  5166. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5167. Private Sub InitCommandCollection()
  5168. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  5169. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  5170. Me._commandCollection(0).Connection = Me.Connection
  5171. Me._commandCollection(0).CommandText = "SELECT CourseID, Title, Credits, DepartmentID FROM dbo.Course"
  5172. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  5173. End Sub
  5174. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5175. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5176. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  5177. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.CourseDataTable) As Integer
  5178. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5179. If (Me.ClearBeforeFill = true) Then
  5180. dataTable.Clear
  5181. End If
  5182. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  5183. Return returnValue
  5184. End Function
  5185. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5186. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5187. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  5188. Public Overloads Overridable Function GetData() As SchoolDataSet.CourseDataTable
  5189. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5190. Dim dataTable As SchoolDataSet.CourseDataTable = New SchoolDataSet.CourseDataTable
  5191. Me.Adapter.Fill(dataTable)
  5192. Return dataTable
  5193. End Function
  5194. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5195. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5196. Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.CourseDataTable) As Integer
  5197. Return Me.Adapter.Update(dataTable)
  5198. End Function
  5199. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5200. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5201. Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
  5202. Return Me.Adapter.Update(dataSet, "Course")
  5203. End Function
  5204. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5205. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5206. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  5207. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  5208. End Function
  5209. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5210. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5211. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  5212. Return Me.Adapter.Update(dataRows)
  5213. End Function
  5214. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5215. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5216. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  5217. 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
  5218. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
  5219. If (Original_Title Is Nothing) Then
  5220. Throw New Global.System.ArgumentNullException("Original_Title")
  5221. Else
  5222. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Title,String)
  5223. End If
  5224. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Credits,Integer)
  5225. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_DepartmentID,Integer)
  5226. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  5227. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5228. <> Global.System.Data.ConnectionState.Open) Then
  5229. Me.Adapter.DeleteCommand.Connection.Open
  5230. End If
  5231. Try
  5232. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  5233. Return returnValue
  5234. Finally
  5235. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5236. Me.Adapter.DeleteCommand.Connection.Close
  5237. End If
  5238. End Try
  5239. End Function
  5240. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5241. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5242. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  5243. Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal Title As String, ByVal Credits As Integer, ByVal DepartmentID As Integer) As Integer
  5244. Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
  5245. If (Title Is Nothing) Then
  5246. Throw New Global.System.ArgumentNullException("Title")
  5247. Else
  5248. Me.Adapter.InsertCommand.Parameters(1).Value = CType(Title,String)
  5249. End If
  5250. Me.Adapter.InsertCommand.Parameters(2).Value = CType(Credits,Integer)
  5251. Me.Adapter.InsertCommand.Parameters(3).Value = CType(DepartmentID,Integer)
  5252. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  5253. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5254. <> Global.System.Data.ConnectionState.Open) Then
  5255. Me.Adapter.InsertCommand.Connection.Open
  5256. End If
  5257. Try
  5258. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  5259. Return returnValue
  5260. Finally
  5261. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5262. Me.Adapter.InsertCommand.Connection.Close
  5263. End If
  5264. End Try
  5265. End Function
  5266. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5267. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5268. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5269. 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
  5270. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
  5271. If (Title Is Nothing) Then
  5272. Throw New Global.System.ArgumentNullException("Title")
  5273. Else
  5274. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Title,String)
  5275. End If
  5276. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Credits,Integer)
  5277. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(DepartmentID,Integer)
  5278. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_CourseID,Integer)
  5279. If (Original_Title Is Nothing) Then
  5280. Throw New Global.System.ArgumentNullException("Original_Title")
  5281. Else
  5282. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_Title,String)
  5283. End If
  5284. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_Credits,Integer)
  5285. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_DepartmentID,Integer)
  5286. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  5287. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5288. <> Global.System.Data.ConnectionState.Open) Then
  5289. Me.Adapter.UpdateCommand.Connection.Open
  5290. End If
  5291. Try
  5292. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  5293. Return returnValue
  5294. Finally
  5295. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5296. Me.Adapter.UpdateCommand.Connection.Close
  5297. End If
  5298. End Try
  5299. End Function
  5300. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5301. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5302. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5303. 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
  5304. Return Me.Update(Original_CourseID, Title, Credits, DepartmentID, Original_CourseID, Original_Title, Original_Credits, Original_DepartmentID)
  5305. End Function
  5306. End Class
  5307. '''<summary>
  5308. '''Represents the connection and commands used to retrieve and save data.
  5309. '''</summary>
  5310. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  5311. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  5312. Global.System.ComponentModel.ToolboxItem(true), _
  5313. Global.System.ComponentModel.DataObjectAttribute(true), _
  5314. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  5315. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  5316. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5317. Partial Public Class CourseGradeTableAdapter
  5318. Inherits Global.System.ComponentModel.Component
  5319. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  5320. Private _connection As Global.System.Data.SqlClient.SqlConnection
  5321. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  5322. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  5323. Private _clearBeforeFill As Boolean
  5324. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5325. Public Sub New()
  5326. MyBase.New
  5327. Me.ClearBeforeFill = true
  5328. End Sub
  5329. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5330. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  5331. Get
  5332. If (Me._adapter Is Nothing) Then
  5333. Me.InitAdapter
  5334. End If
  5335. Return Me._adapter
  5336. End Get
  5337. End Property
  5338. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5339. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  5340. Get
  5341. If (Me._connection Is Nothing) Then
  5342. Me.InitConnection
  5343. End If
  5344. Return Me._connection
  5345. End Get
  5346. Set
  5347. Me._connection = value
  5348. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  5349. Me.Adapter.InsertCommand.Connection = value
  5350. End If
  5351. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  5352. Me.Adapter.DeleteCommand.Connection = value
  5353. End If
  5354. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  5355. Me.Adapter.UpdateCommand.Connection = value
  5356. End If
  5357. Dim i As Integer = 0
  5358. Do While (i < Me.CommandCollection.Length)
  5359. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  5360. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  5361. End If
  5362. i = (i + 1)
  5363. Loop
  5364. End Set
  5365. End Property
  5366. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5367. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  5368. Get
  5369. Return Me._transaction
  5370. End Get
  5371. Set
  5372. Me._transaction = value
  5373. Dim i As Integer = 0
  5374. Do While (i < Me.CommandCollection.Length)
  5375. Me.CommandCollection(i).Transaction = Me._transaction
  5376. i = (i + 1)
  5377. Loop
  5378. If ((Not (Me.Adapter) Is Nothing) _
  5379. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  5380. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  5381. End If
  5382. If ((Not (Me.Adapter) Is Nothing) _
  5383. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  5384. Me.Adapter.InsertCommand.Transaction = Me._transaction
  5385. End If
  5386. If ((Not (Me.Adapter) Is Nothing) _
  5387. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  5388. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  5389. End If
  5390. End Set
  5391. End Property
  5392. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5393. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  5394. Get
  5395. If (Me._commandCollection Is Nothing) Then
  5396. Me.InitCommandCollection
  5397. End If
  5398. Return Me._commandCollection
  5399. End Get
  5400. End Property
  5401. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5402. Public Property ClearBeforeFill() As Boolean
  5403. Get
  5404. Return Me._clearBeforeFill
  5405. End Get
  5406. Set
  5407. Me._clearBeforeFill = value
  5408. End Set
  5409. End Property
  5410. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5411. Private Sub InitAdapter()
  5412. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  5413. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  5414. tableMapping.SourceTable = "Table"
  5415. tableMapping.DataSetTable = "CourseGrade"
  5416. tableMapping.ColumnMappings.Add("EnrollmentID", "EnrollmentID")
  5417. tableMapping.ColumnMappings.Add("CourseID", "CourseID")
  5418. tableMapping.ColumnMappings.Add("StudentID", "StudentID")
  5419. tableMapping.ColumnMappings.Add("Grade", "Grade")
  5420. Me._adapter.TableMappings.Add(tableMapping)
  5421. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
  5422. Me._adapter.DeleteCommand.Connection = Me.Connection
  5423. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[CourseGrade] WHERE (([EnrollmentID] = @Original_EnrollmentID) "& _
  5424. "AND ([CourseID] = @Original_CourseID) AND ([StudentID] = @Original_StudentID) AN"& _
  5425. "D ((@IsNull_Grade = 1 AND [Grade] IS NULL) OR ([Grade] = @Original_Grade)))"
  5426. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  5427. 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, "", "", ""))
  5428. 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, "", "", ""))
  5429. 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, "", "", ""))
  5430. 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, "", "", ""))
  5431. 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, "", "", ""))
  5432. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
  5433. Me._adapter.InsertCommand.Connection = Me.Connection
  5434. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[CourseGrade] ([CourseID], [StudentID], [Grade]) VALUES (@Cours"& _
  5435. "eID, @StudentID, @Grade);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT EnrollmentID, CourseID, StudentID, Grade FROM "& _
  5436. "CourseGrade WHERE (EnrollmentID = SCOPE_IDENTITY())"
  5437. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  5438. 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, "", "", ""))
  5439. 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, "", "", ""))
  5440. 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, "", "", ""))
  5441. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
  5442. Me._adapter.UpdateCommand.Connection = Me.Connection
  5443. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[CourseGrade] SET [CourseID] = @CourseID, [StudentID] = @StudentID, "& _
  5444. "[Grade] = @Grade WHERE (([EnrollmentID] = @Original_EnrollmentID) AND ([CourseID"& _
  5445. "] = @Original_CourseID) AND ([StudentID] = @Original_StudentID) AND ((@IsNull_Gr"& _
  5446. "ade = 1 AND [Grade] IS NULL) OR ([Grade] = @Original_Grade)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT Enrollmen"& _
  5447. "tID, CourseID, StudentID, Grade FROM CourseGrade WHERE (EnrollmentID = @Enrollme"& _
  5448. "ntID)"
  5449. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  5450. 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, "", "", ""))
  5451. 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, "", "", ""))
  5452. 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, "", "", ""))
  5453. 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, "", "", ""))
  5454. 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, "", "", ""))
  5455. 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, "", "", ""))
  5456. 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, "", "", ""))
  5457. 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, "", "", ""))
  5458. 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, "", "", ""))
  5459. End Sub
  5460. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5461. Private Sub InitConnection()
  5462. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  5463. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  5464. End Sub
  5465. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5466. Private Sub InitCommandCollection()
  5467. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  5468. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  5469. Me._commandCollection(0).Connection = Me.Connection
  5470. Me._commandCollection(0).CommandText = "SELECT EnrollmentID, CourseID, StudentID, Grade FROM dbo.CourseGrade"
  5471. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  5472. End Sub
  5473. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5474. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5475. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  5476. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.CourseGradeDataTable) As Integer
  5477. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5478. If (Me.ClearBeforeFill = true) Then
  5479. dataTable.Clear
  5480. End If
  5481. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  5482. Return returnValue
  5483. End Function
  5484. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5485. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5486. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  5487. Public Overloads Overridable Function GetData() As SchoolDataSet.CourseGradeDataTable
  5488. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5489. Dim dataTable As SchoolDataSet.CourseGradeDataTable = New SchoolDataSet.CourseGradeDataTable
  5490. Me.Adapter.Fill(dataTable)
  5491. Return dataTable
  5492. End Function
  5493. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5494. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5495. Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.CourseGradeDataTable) As Integer
  5496. Return Me.Adapter.Update(dataTable)
  5497. End Function
  5498. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5499. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5500. Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
  5501. Return Me.Adapter.Update(dataSet, "CourseGrade")
  5502. End Function
  5503. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5504. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5505. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  5506. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  5507. End Function
  5508. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5509. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5510. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  5511. Return Me.Adapter.Update(dataRows)
  5512. End Function
  5513. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5514. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5515. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  5516. 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
  5517. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_EnrollmentID,Integer)
  5518. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_CourseID,Integer)
  5519. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_StudentID,Integer)
  5520. If (Original_Grade.HasValue = true) Then
  5521. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
  5522. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_Grade.Value,Decimal)
  5523. Else
  5524. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
  5525. Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
  5526. End If
  5527. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  5528. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5529. <> Global.System.Data.ConnectionState.Open) Then
  5530. Me.Adapter.DeleteCommand.Connection.Open
  5531. End If
  5532. Try
  5533. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  5534. Return returnValue
  5535. Finally
  5536. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5537. Me.Adapter.DeleteCommand.Connection.Close
  5538. End If
  5539. End Try
  5540. End Function
  5541. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5542. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5543. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  5544. Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal StudentID As Integer, ByVal Grade As Global.System.Nullable(Of Decimal)) As Integer
  5545. Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
  5546. Me.Adapter.InsertCommand.Parameters(1).Value = CType(StudentID,Integer)
  5547. If (Grade.HasValue = true) Then
  5548. Me.Adapter.InsertCommand.Parameters(2).Value = CType(Grade.Value,Decimal)
  5549. Else
  5550. Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
  5551. End If
  5552. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  5553. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5554. <> Global.System.Data.ConnectionState.Open) Then
  5555. Me.Adapter.InsertCommand.Connection.Open
  5556. End If
  5557. Try
  5558. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  5559. Return returnValue
  5560. Finally
  5561. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5562. Me.Adapter.InsertCommand.Connection.Close
  5563. End If
  5564. End Try
  5565. End Function
  5566. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5567. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5568. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5569. 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
  5570. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
  5571. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(StudentID,Integer)
  5572. If (Grade.HasValue = true) Then
  5573. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Grade.Value,Decimal)
  5574. Else
  5575. Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
  5576. End If
  5577. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_EnrollmentID,Integer)
  5578. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_CourseID,Integer)
  5579. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_StudentID,Integer)
  5580. If (Original_Grade.HasValue = true) Then
  5581. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object)
  5582. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Grade.Value,Decimal)
  5583. Else
  5584. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object)
  5585. Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value
  5586. End If
  5587. Me.Adapter.UpdateCommand.Parameters(8).Value = CType(EnrollmentID,Integer)
  5588. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  5589. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5590. <> Global.System.Data.ConnectionState.Open) Then
  5591. Me.Adapter.UpdateCommand.Connection.Open
  5592. End If
  5593. Try
  5594. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  5595. Return returnValue
  5596. Finally
  5597. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5598. Me.Adapter.UpdateCommand.Connection.Close
  5599. End If
  5600. End Try
  5601. End Function
  5602. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5603. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5604. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5605. 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
  5606. Return Me.Update(CourseID, StudentID, Grade, Original_EnrollmentID, Original_CourseID, Original_StudentID, Original_Grade, Original_EnrollmentID)
  5607. End Function
  5608. End Class
  5609. '''<summary>
  5610. '''Represents the connection and commands used to retrieve and save data.
  5611. '''</summary>
  5612. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  5613. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  5614. Global.System.ComponentModel.ToolboxItem(true), _
  5615. Global.System.ComponentModel.DataObjectAttribute(true), _
  5616. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  5617. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  5618. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5619. Partial Public Class CourseInstructorTableAdapter
  5620. Inherits Global.System.ComponentModel.Component
  5621. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  5622. Private _connection As Global.System.Data.SqlClient.SqlConnection
  5623. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  5624. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  5625. Private _clearBeforeFill As Boolean
  5626. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5627. Public Sub New()
  5628. MyBase.New
  5629. Me.ClearBeforeFill = true
  5630. End Sub
  5631. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5632. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  5633. Get
  5634. If (Me._adapter Is Nothing) Then
  5635. Me.InitAdapter
  5636. End If
  5637. Return Me._adapter
  5638. End Get
  5639. End Property
  5640. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5641. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  5642. Get
  5643. If (Me._connection Is Nothing) Then
  5644. Me.InitConnection
  5645. End If
  5646. Return Me._connection
  5647. End Get
  5648. Set
  5649. Me._connection = value
  5650. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  5651. Me.Adapter.InsertCommand.Connection = value
  5652. End If
  5653. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  5654. Me.Adapter.DeleteCommand.Connection = value
  5655. End If
  5656. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  5657. Me.Adapter.UpdateCommand.Connection = value
  5658. End If
  5659. Dim i As Integer = 0
  5660. Do While (i < Me.CommandCollection.Length)
  5661. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  5662. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  5663. End If
  5664. i = (i + 1)
  5665. Loop
  5666. End Set
  5667. End Property
  5668. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5669. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  5670. Get
  5671. Return Me._transaction
  5672. End Get
  5673. Set
  5674. Me._transaction = value
  5675. Dim i As Integer = 0
  5676. Do While (i < Me.CommandCollection.Length)
  5677. Me.CommandCollection(i).Transaction = Me._transaction
  5678. i = (i + 1)
  5679. Loop
  5680. If ((Not (Me.Adapter) Is Nothing) _
  5681. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  5682. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  5683. End If
  5684. If ((Not (Me.Adapter) Is Nothing) _
  5685. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  5686. Me.Adapter.InsertCommand.Transaction = Me._transaction
  5687. End If
  5688. If ((Not (Me.Adapter) Is Nothing) _
  5689. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  5690. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  5691. End If
  5692. End Set
  5693. End Property
  5694. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5695. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  5696. Get
  5697. If (Me._commandCollection Is Nothing) Then
  5698. Me.InitCommandCollection
  5699. End If
  5700. Return Me._commandCollection
  5701. End Get
  5702. End Property
  5703. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5704. Public Property ClearBeforeFill() As Boolean
  5705. Get
  5706. Return Me._clearBeforeFill
  5707. End Get
  5708. Set
  5709. Me._clearBeforeFill = value
  5710. End Set
  5711. End Property
  5712. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5713. Private Sub InitAdapter()
  5714. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  5715. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  5716. tableMapping.SourceTable = "Table"
  5717. tableMapping.DataSetTable = "CourseInstructor"
  5718. tableMapping.ColumnMappings.Add("CourseID", "CourseID")
  5719. tableMapping.ColumnMappings.Add("PersonID", "PersonID")
  5720. Me._adapter.TableMappings.Add(tableMapping)
  5721. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
  5722. Me._adapter.DeleteCommand.Connection = Me.Connection
  5723. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[CourseInstructor] WHERE (([CourseID] = @Original_CourseID) AND"& _
  5724. " ([PersonID] = @Original_PersonID))"
  5725. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  5726. 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, "", "", ""))
  5727. 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, "", "", ""))
  5728. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
  5729. Me._adapter.InsertCommand.Connection = Me.Connection
  5730. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[CourseInstructor] ([CourseID], [PersonID]) VALUES (@CourseID, "& _
  5731. "@PersonID);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, PersonID FROM CourseInstructor WHERE (CourseID = @"& _
  5732. "CourseID) AND (PersonID = @PersonID)"
  5733. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  5734. 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, "", "", ""))
  5735. 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, "", "", ""))
  5736. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
  5737. Me._adapter.UpdateCommand.Connection = Me.Connection
  5738. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[CourseInstructor] SET [CourseID] = @CourseID, [PersonID] = @PersonI"& _
  5739. "D WHERE (([CourseID] = @Original_CourseID) AND ([PersonID] = @Original_PersonID)"& _
  5740. ");"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, PersonID FROM CourseInstructor WHERE (CourseID = @CourseID)"& _
  5741. " AND (PersonID = @PersonID)"
  5742. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  5743. 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, "", "", ""))
  5744. 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, "", "", ""))
  5745. 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, "", "", ""))
  5746. 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, "", "", ""))
  5747. End Sub
  5748. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5749. Private Sub InitConnection()
  5750. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  5751. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  5752. End Sub
  5753. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5754. Private Sub InitCommandCollection()
  5755. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  5756. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  5757. Me._commandCollection(0).Connection = Me.Connection
  5758. Me._commandCollection(0).CommandText = "SELECT CourseID, PersonID FROM dbo.CourseInstructor"
  5759. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  5760. End Sub
  5761. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5762. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5763. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  5764. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.CourseInstructorDataTable) As Integer
  5765. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5766. If (Me.ClearBeforeFill = true) Then
  5767. dataTable.Clear
  5768. End If
  5769. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  5770. Return returnValue
  5771. End Function
  5772. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5773. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5774. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  5775. Public Overloads Overridable Function GetData() As SchoolDataSet.CourseInstructorDataTable
  5776. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  5777. Dim dataTable As SchoolDataSet.CourseInstructorDataTable = New SchoolDataSet.CourseInstructorDataTable
  5778. Me.Adapter.Fill(dataTable)
  5779. Return dataTable
  5780. End Function
  5781. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5782. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5783. Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.CourseInstructorDataTable) As Integer
  5784. Return Me.Adapter.Update(dataTable)
  5785. End Function
  5786. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5787. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5788. Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
  5789. Return Me.Adapter.Update(dataSet, "CourseInstructor")
  5790. End Function
  5791. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5792. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5793. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  5794. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  5795. End Function
  5796. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5797. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5798. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  5799. Return Me.Adapter.Update(dataRows)
  5800. End Function
  5801. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5802. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5803. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  5804. Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_PersonID As Integer) As Integer
  5805. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
  5806. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_PersonID,Integer)
  5807. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  5808. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5809. <> Global.System.Data.ConnectionState.Open) Then
  5810. Me.Adapter.DeleteCommand.Connection.Open
  5811. End If
  5812. Try
  5813. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  5814. Return returnValue
  5815. Finally
  5816. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5817. Me.Adapter.DeleteCommand.Connection.Close
  5818. End If
  5819. End Try
  5820. End Function
  5821. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5822. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5823. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  5824. Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal PersonID As Integer) As Integer
  5825. Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
  5826. Me.Adapter.InsertCommand.Parameters(1).Value = CType(PersonID,Integer)
  5827. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  5828. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5829. <> Global.System.Data.ConnectionState.Open) Then
  5830. Me.Adapter.InsertCommand.Connection.Open
  5831. End If
  5832. Try
  5833. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  5834. Return returnValue
  5835. Finally
  5836. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5837. Me.Adapter.InsertCommand.Connection.Close
  5838. End If
  5839. End Try
  5840. End Function
  5841. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5842. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5843. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5844. 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
  5845. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
  5846. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(PersonID,Integer)
  5847. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_CourseID,Integer)
  5848. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_PersonID,Integer)
  5849. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  5850. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  5851. <> Global.System.Data.ConnectionState.Open) Then
  5852. Me.Adapter.UpdateCommand.Connection.Open
  5853. End If
  5854. Try
  5855. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  5856. Return returnValue
  5857. Finally
  5858. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  5859. Me.Adapter.UpdateCommand.Connection.Close
  5860. End If
  5861. End Try
  5862. End Function
  5863. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  5864. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  5865. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  5866. Public Overloads Overridable Function Update(ByVal Original_CourseID As Integer, ByVal Original_PersonID As Integer) As Integer
  5867. Return Me.Update(Original_CourseID, Original_PersonID, Original_CourseID, Original_PersonID)
  5868. End Function
  5869. End Class
  5870. '''<summary>
  5871. '''Represents the connection and commands used to retrieve and save data.
  5872. '''</summary>
  5873. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  5874. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  5875. Global.System.ComponentModel.ToolboxItem(true), _
  5876. Global.System.ComponentModel.DataObjectAttribute(true), _
  5877. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  5878. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  5879. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  5880. Partial Public Class DepartmentTableAdapter
  5881. Inherits Global.System.ComponentModel.Component
  5882. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  5883. Private _connection As Global.System.Data.SqlClient.SqlConnection
  5884. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  5885. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  5886. Private _clearBeforeFill As Boolean
  5887. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5888. Public Sub New()
  5889. MyBase.New
  5890. Me.ClearBeforeFill = true
  5891. End Sub
  5892. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5893. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  5894. Get
  5895. If (Me._adapter Is Nothing) Then
  5896. Me.InitAdapter
  5897. End If
  5898. Return Me._adapter
  5899. End Get
  5900. End Property
  5901. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5902. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  5903. Get
  5904. If (Me._connection Is Nothing) Then
  5905. Me.InitConnection
  5906. End If
  5907. Return Me._connection
  5908. End Get
  5909. Set
  5910. Me._connection = value
  5911. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  5912. Me.Adapter.InsertCommand.Connection = value
  5913. End If
  5914. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  5915. Me.Adapter.DeleteCommand.Connection = value
  5916. End If
  5917. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  5918. Me.Adapter.UpdateCommand.Connection = value
  5919. End If
  5920. Dim i As Integer = 0
  5921. Do While (i < Me.CommandCollection.Length)
  5922. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  5923. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  5924. End If
  5925. i = (i + 1)
  5926. Loop
  5927. End Set
  5928. End Property
  5929. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5930. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  5931. Get
  5932. Return Me._transaction
  5933. End Get
  5934. Set
  5935. Me._transaction = value
  5936. Dim i As Integer = 0
  5937. Do While (i < Me.CommandCollection.Length)
  5938. Me.CommandCollection(i).Transaction = Me._transaction
  5939. i = (i + 1)
  5940. Loop
  5941. If ((Not (Me.Adapter) Is Nothing) _
  5942. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  5943. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  5944. End If
  5945. If ((Not (Me.Adapter) Is Nothing) _
  5946. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  5947. Me.Adapter.InsertCommand.Transaction = Me._transaction
  5948. End If
  5949. If ((Not (Me.Adapter) Is Nothing) _
  5950. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  5951. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  5952. End If
  5953. End Set
  5954. End Property
  5955. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5956. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  5957. Get
  5958. If (Me._commandCollection Is Nothing) Then
  5959. Me.InitCommandCollection
  5960. End If
  5961. Return Me._commandCollection
  5962. End Get
  5963. End Property
  5964. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5965. Public Property ClearBeforeFill() As Boolean
  5966. Get
  5967. Return Me._clearBeforeFill
  5968. End Get
  5969. Set
  5970. Me._clearBeforeFill = value
  5971. End Set
  5972. End Property
  5973. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  5974. Private Sub InitAdapter()
  5975. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  5976. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  5977. tableMapping.SourceTable = "Table"
  5978. tableMapping.DataSetTable = "Department"
  5979. tableMapping.ColumnMappings.Add("DepartmentID", "DepartmentID")
  5980. tableMapping.ColumnMappings.Add("Name", "Name")
  5981. tableMapping.ColumnMappings.Add("Budget", "Budget")
  5982. tableMapping.ColumnMappings.Add("StartDate", "StartDate")
  5983. tableMapping.ColumnMappings.Add("Administrator", "Administrator")
  5984. Me._adapter.TableMappings.Add(tableMapping)
  5985. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
  5986. Me._adapter.DeleteCommand.Connection = Me.Connection
  5987. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Department] WHERE (([DepartmentID] = @Original_DepartmentID) A"& _
  5988. "ND ([Name] = @Original_Name) AND ([Budget] = @Original_Budget) AND ([StartDate] "& _
  5989. "= @Original_StartDate) AND ((@IsNull_Administrator = 1 AND [Administrator] IS NU"& _
  5990. "LL) OR ([Administrator] = @Original_Administrator)))"
  5991. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  5992. 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, "", "", ""))
  5993. 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, "", "", ""))
  5994. 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, "", "", ""))
  5995. 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, "", "", ""))
  5996. 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, "", "", ""))
  5997. 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, "", "", ""))
  5998. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
  5999. Me._adapter.InsertCommand.Connection = Me.Connection
  6000. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Department] ([DepartmentID], [Name], [Budget], [StartDate], [A"& _
  6001. "dministrator]) VALUES (@DepartmentID, @Name, @Budget, @StartDate, @Administrator"& _
  6002. ");"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT DepartmentID, Name, Budget, StartDate, Administrator FROM Department "& _
  6003. "WHERE (DepartmentID = @DepartmentID)"
  6004. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  6005. 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, "", "", ""))
  6006. 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, "", "", ""))
  6007. 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, "", "", ""))
  6008. 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, "", "", ""))
  6009. 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, "", "", ""))
  6010. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
  6011. Me._adapter.UpdateCommand.Connection = Me.Connection
  6012. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Department] SET [DepartmentID] = @DepartmentID, [Name] = @Name, [Bu"& _
  6013. "dget] = @Budget, [StartDate] = @StartDate, [Administrator] = @Administrator WHER"& _
  6014. "E (([DepartmentID] = @Original_DepartmentID) AND ([Name] = @Original_Name) AND ("& _
  6015. "[Budget] = @Original_Budget) AND ([StartDate] = @Original_StartDate) AND ((@IsNu"& _
  6016. "ll_Administrator = 1 AND [Administrator] IS NULL) OR ([Administrator] = @Origina"& _
  6017. "l_Administrator)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT DepartmentID, Name, Budget, StartDate, Administrator"& _
  6018. " FROM Department WHERE (DepartmentID = @DepartmentID)"
  6019. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  6020. 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, "", "", ""))
  6021. 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, "", "", ""))
  6022. 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, "", "", ""))
  6023. 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, "", "", ""))
  6024. 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, "", "", ""))
  6025. 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, "", "", ""))
  6026. 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, "", "", ""))
  6027. 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, "", "", ""))
  6028. 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, "", "", ""))
  6029. 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, "", "", ""))
  6030. 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, "", "", ""))
  6031. End Sub
  6032. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6033. Private Sub InitConnection()
  6034. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  6035. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  6036. End Sub
  6037. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6038. Private Sub InitCommandCollection()
  6039. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  6040. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  6041. Me._commandCollection(0).Connection = Me.Connection
  6042. Me._commandCollection(0).CommandText = "SELECT DepartmentID, Name, Budget, StartDate, Administrator FROM dbo.Department"
  6043. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  6044. End Sub
  6045. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6046. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6047. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  6048. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.DepartmentDataTable) As Integer
  6049. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6050. If (Me.ClearBeforeFill = true) Then
  6051. dataTable.Clear
  6052. End If
  6053. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  6054. Return returnValue
  6055. End Function
  6056. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6057. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6058. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  6059. Public Overloads Overridable Function GetData() As SchoolDataSet.DepartmentDataTable
  6060. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6061. Dim dataTable As SchoolDataSet.DepartmentDataTable = New SchoolDataSet.DepartmentDataTable
  6062. Me.Adapter.Fill(dataTable)
  6063. Return dataTable
  6064. End Function
  6065. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6066. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6067. Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.DepartmentDataTable) As Integer
  6068. Return Me.Adapter.Update(dataTable)
  6069. End Function
  6070. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6071. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6072. Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
  6073. Return Me.Adapter.Update(dataSet, "Department")
  6074. End Function
  6075. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6076. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6077. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  6078. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  6079. End Function
  6080. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6081. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6082. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  6083. Return Me.Adapter.Update(dataRows)
  6084. End Function
  6085. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6086. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6087. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  6088. 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
  6089. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_DepartmentID,Integer)
  6090. If (Original_Name Is Nothing) Then
  6091. Throw New Global.System.ArgumentNullException("Original_Name")
  6092. Else
  6093. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Name,String)
  6094. End If
  6095. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Budget,Decimal)
  6096. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_StartDate,Date)
  6097. If (Original_Administrator.HasValue = true) Then
  6098. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(0,Object)
  6099. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_Administrator.Value,Integer)
  6100. Else
  6101. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(1,Object)
  6102. Me.Adapter.DeleteCommand.Parameters(5).Value = Global.System.DBNull.Value
  6103. End If
  6104. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  6105. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6106. <> Global.System.Data.ConnectionState.Open) Then
  6107. Me.Adapter.DeleteCommand.Connection.Open
  6108. End If
  6109. Try
  6110. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  6111. Return returnValue
  6112. Finally
  6113. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6114. Me.Adapter.DeleteCommand.Connection.Close
  6115. End If
  6116. End Try
  6117. End Function
  6118. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6119. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6120. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  6121. 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
  6122. Me.Adapter.InsertCommand.Parameters(0).Value = CType(DepartmentID,Integer)
  6123. If (Name Is Nothing) Then
  6124. Throw New Global.System.ArgumentNullException("Name")
  6125. Else
  6126. Me.Adapter.InsertCommand.Parameters(1).Value = CType(Name,String)
  6127. End If
  6128. Me.Adapter.InsertCommand.Parameters(2).Value = CType(Budget,Decimal)
  6129. Me.Adapter.InsertCommand.Parameters(3).Value = CType(StartDate,Date)
  6130. If (Administrator.HasValue = true) Then
  6131. Me.Adapter.InsertCommand.Parameters(4).Value = CType(Administrator.Value,Integer)
  6132. Else
  6133. Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
  6134. End If
  6135. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  6136. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6137. <> Global.System.Data.ConnectionState.Open) Then
  6138. Me.Adapter.InsertCommand.Connection.Open
  6139. End If
  6140. Try
  6141. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  6142. Return returnValue
  6143. Finally
  6144. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6145. Me.Adapter.InsertCommand.Connection.Close
  6146. End If
  6147. End Try
  6148. End Function
  6149. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6150. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6151. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  6152. 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
  6153. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(DepartmentID,Integer)
  6154. If (Name Is Nothing) Then
  6155. Throw New Global.System.ArgumentNullException("Name")
  6156. Else
  6157. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Name,String)
  6158. End If
  6159. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Budget,Decimal)
  6160. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(StartDate,Date)
  6161. If (Administrator.HasValue = true) Then
  6162. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Administrator.Value,Integer)
  6163. Else
  6164. Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
  6165. End If
  6166. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_DepartmentID,Integer)
  6167. If (Original_Name Is Nothing) Then
  6168. Throw New Global.System.ArgumentNullException("Original_Name")
  6169. Else
  6170. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_Name,String)
  6171. End If
  6172. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Budget,Decimal)
  6173. Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_StartDate,Date)
  6174. If (Original_Administrator.HasValue = true) Then
  6175. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object)
  6176. Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_Administrator.Value,Integer)
  6177. Else
  6178. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object)
  6179. Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value
  6180. End If
  6181. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  6182. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6183. <> Global.System.Data.ConnectionState.Open) Then
  6184. Me.Adapter.UpdateCommand.Connection.Open
  6185. End If
  6186. Try
  6187. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  6188. Return returnValue
  6189. Finally
  6190. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6191. Me.Adapter.UpdateCommand.Connection.Close
  6192. End If
  6193. End Try
  6194. End Function
  6195. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6196. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6197. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  6198. 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
  6199. Return Me.Update(Original_DepartmentID, Name, Budget, StartDate, Administrator, Original_DepartmentID, Original_Name, Original_Budget, Original_StartDate, Original_Administrator)
  6200. End Function
  6201. End Class
  6202. '''<summary>
  6203. '''Represents the connection and commands used to retrieve and save data.
  6204. '''</summary>
  6205. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  6206. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  6207. Global.System.ComponentModel.ToolboxItem(true), _
  6208. Global.System.ComponentModel.DataObjectAttribute(true), _
  6209. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  6210. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  6211. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6212. Partial Public Class OfficeAssignmentTableAdapter
  6213. Inherits Global.System.ComponentModel.Component
  6214. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  6215. Private _connection As Global.System.Data.SqlClient.SqlConnection
  6216. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  6217. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  6218. Private _clearBeforeFill As Boolean
  6219. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6220. Public Sub New()
  6221. MyBase.New
  6222. Me.ClearBeforeFill = true
  6223. End Sub
  6224. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6225. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  6226. Get
  6227. If (Me._adapter Is Nothing) Then
  6228. Me.InitAdapter
  6229. End If
  6230. Return Me._adapter
  6231. End Get
  6232. End Property
  6233. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6234. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  6235. Get
  6236. If (Me._connection Is Nothing) Then
  6237. Me.InitConnection
  6238. End If
  6239. Return Me._connection
  6240. End Get
  6241. Set
  6242. Me._connection = value
  6243. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  6244. Me.Adapter.InsertCommand.Connection = value
  6245. End If
  6246. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  6247. Me.Adapter.DeleteCommand.Connection = value
  6248. End If
  6249. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  6250. Me.Adapter.UpdateCommand.Connection = value
  6251. End If
  6252. Dim i As Integer = 0
  6253. Do While (i < Me.CommandCollection.Length)
  6254. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  6255. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  6256. End If
  6257. i = (i + 1)
  6258. Loop
  6259. End Set
  6260. End Property
  6261. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6262. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  6263. Get
  6264. Return Me._transaction
  6265. End Get
  6266. Set
  6267. Me._transaction = value
  6268. Dim i As Integer = 0
  6269. Do While (i < Me.CommandCollection.Length)
  6270. Me.CommandCollection(i).Transaction = Me._transaction
  6271. i = (i + 1)
  6272. Loop
  6273. If ((Not (Me.Adapter) Is Nothing) _
  6274. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  6275. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  6276. End If
  6277. If ((Not (Me.Adapter) Is Nothing) _
  6278. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  6279. Me.Adapter.InsertCommand.Transaction = Me._transaction
  6280. End If
  6281. If ((Not (Me.Adapter) Is Nothing) _
  6282. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  6283. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  6284. End If
  6285. End Set
  6286. End Property
  6287. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6288. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  6289. Get
  6290. If (Me._commandCollection Is Nothing) Then
  6291. Me.InitCommandCollection
  6292. End If
  6293. Return Me._commandCollection
  6294. End Get
  6295. End Property
  6296. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6297. Public Property ClearBeforeFill() As Boolean
  6298. Get
  6299. Return Me._clearBeforeFill
  6300. End Get
  6301. Set
  6302. Me._clearBeforeFill = value
  6303. End Set
  6304. End Property
  6305. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6306. Private Sub InitAdapter()
  6307. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  6308. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  6309. tableMapping.SourceTable = "Table"
  6310. tableMapping.DataSetTable = "OfficeAssignment"
  6311. tableMapping.ColumnMappings.Add("InstructorID", "InstructorID")
  6312. tableMapping.ColumnMappings.Add("Location", "Location")
  6313. tableMapping.ColumnMappings.Add("Timestamp", "Timestamp")
  6314. Me._adapter.TableMappings.Add(tableMapping)
  6315. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
  6316. Me._adapter.DeleteCommand.Connection = Me.Connection
  6317. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OfficeAssignment] WHERE (([InstructorID] = @Original_Instructo"& _
  6318. "rID) AND ([Timestamp] = @Original_Timestamp))"
  6319. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  6320. 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, "", "", ""))
  6321. 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, "", "", ""))
  6322. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
  6323. Me._adapter.InsertCommand.Connection = Me.Connection
  6324. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OfficeAssignment] ([InstructorID], [Location]) VALUES (@Instru"& _
  6325. "ctorID, @Location);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT InstructorID, Location, Timestamp FROM OfficeAssignm"& _
  6326. "ent WHERE (InstructorID = @InstructorID)"
  6327. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  6328. 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, "", "", ""))
  6329. 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, "", "", ""))
  6330. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
  6331. Me._adapter.UpdateCommand.Connection = Me.Connection
  6332. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OfficeAssignment] SET [InstructorID] = @InstructorID, [Location] = "& _
  6333. "@Location WHERE (([InstructorID] = @Original_InstructorID) AND ([Timestamp] = @O"& _
  6334. "riginal_Timestamp));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT InstructorID, Location, Timestamp FROM OfficeAssign"& _
  6335. "ment WHERE (InstructorID = @InstructorID)"
  6336. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  6337. 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, "", "", ""))
  6338. 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, "", "", ""))
  6339. 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, "", "", ""))
  6340. 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, "", "", ""))
  6341. End Sub
  6342. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6343. Private Sub InitConnection()
  6344. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  6345. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  6346. End Sub
  6347. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6348. Private Sub InitCommandCollection()
  6349. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  6350. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  6351. Me._commandCollection(0).Connection = Me.Connection
  6352. Me._commandCollection(0).CommandText = "SELECT InstructorID, Location, Timestamp FROM dbo.OfficeAssignment"
  6353. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  6354. End Sub
  6355. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6356. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6357. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  6358. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.OfficeAssignmentDataTable) As Integer
  6359. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6360. If (Me.ClearBeforeFill = true) Then
  6361. dataTable.Clear
  6362. End If
  6363. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  6364. Return returnValue
  6365. End Function
  6366. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6367. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6368. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  6369. Public Overloads Overridable Function GetData() As SchoolDataSet.OfficeAssignmentDataTable
  6370. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6371. Dim dataTable As SchoolDataSet.OfficeAssignmentDataTable = New SchoolDataSet.OfficeAssignmentDataTable
  6372. Me.Adapter.Fill(dataTable)
  6373. Return dataTable
  6374. End Function
  6375. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6376. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6377. Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.OfficeAssignmentDataTable) As Integer
  6378. Return Me.Adapter.Update(dataTable)
  6379. End Function
  6380. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6381. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6382. Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
  6383. Return Me.Adapter.Update(dataSet, "OfficeAssignment")
  6384. End Function
  6385. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6386. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6387. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  6388. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  6389. End Function
  6390. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6391. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6392. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  6393. Return Me.Adapter.Update(dataRows)
  6394. End Function
  6395. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6396. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6397. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  6398. Public Overloads Overridable Function Delete(ByVal Original_InstructorID As Integer, ByVal Original_Timestamp() As Byte) As Integer
  6399. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_InstructorID,Integer)
  6400. If (Original_Timestamp Is Nothing) Then
  6401. Throw New Global.System.ArgumentNullException("Original_Timestamp")
  6402. Else
  6403. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Timestamp,Byte())
  6404. End If
  6405. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  6406. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6407. <> Global.System.Data.ConnectionState.Open) Then
  6408. Me.Adapter.DeleteCommand.Connection.Open
  6409. End If
  6410. Try
  6411. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  6412. Return returnValue
  6413. Finally
  6414. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6415. Me.Adapter.DeleteCommand.Connection.Close
  6416. End If
  6417. End Try
  6418. End Function
  6419. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6420. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6421. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  6422. Public Overloads Overridable Function Insert(ByVal InstructorID As Integer, ByVal Location As String) As Integer
  6423. Me.Adapter.InsertCommand.Parameters(0).Value = CType(InstructorID,Integer)
  6424. If (Location Is Nothing) Then
  6425. Throw New Global.System.ArgumentNullException("Location")
  6426. Else
  6427. Me.Adapter.InsertCommand.Parameters(1).Value = CType(Location,String)
  6428. End If
  6429. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  6430. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6431. <> Global.System.Data.ConnectionState.Open) Then
  6432. Me.Adapter.InsertCommand.Connection.Open
  6433. End If
  6434. Try
  6435. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  6436. Return returnValue
  6437. Finally
  6438. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6439. Me.Adapter.InsertCommand.Connection.Close
  6440. End If
  6441. End Try
  6442. End Function
  6443. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6444. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6445. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  6446. 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
  6447. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(InstructorID,Integer)
  6448. If (Location Is Nothing) Then
  6449. Throw New Global.System.ArgumentNullException("Location")
  6450. Else
  6451. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Location,String)
  6452. End If
  6453. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_InstructorID,Integer)
  6454. If (Original_Timestamp Is Nothing) Then
  6455. Throw New Global.System.ArgumentNullException("Original_Timestamp")
  6456. Else
  6457. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_Timestamp,Byte())
  6458. End If
  6459. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  6460. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6461. <> Global.System.Data.ConnectionState.Open) Then
  6462. Me.Adapter.UpdateCommand.Connection.Open
  6463. End If
  6464. Try
  6465. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  6466. Return returnValue
  6467. Finally
  6468. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6469. Me.Adapter.UpdateCommand.Connection.Close
  6470. End If
  6471. End Try
  6472. End Function
  6473. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6474. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6475. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  6476. Public Overloads Overridable Function Update(ByVal Location As String, ByVal Original_InstructorID As Integer, ByVal Original_Timestamp() As Byte) As Integer
  6477. Return Me.Update(Original_InstructorID, Location, Original_InstructorID, Original_Timestamp)
  6478. End Function
  6479. End Class
  6480. '''<summary>
  6481. '''Represents the connection and commands used to retrieve and save data.
  6482. '''</summary>
  6483. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  6484. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  6485. Global.System.ComponentModel.ToolboxItem(true), _
  6486. Global.System.ComponentModel.DataObjectAttribute(true), _
  6487. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  6488. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  6489. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6490. Partial Public Class OnlineCourseTableAdapter
  6491. Inherits Global.System.ComponentModel.Component
  6492. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  6493. Private _connection As Global.System.Data.SqlClient.SqlConnection
  6494. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  6495. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  6496. Private _clearBeforeFill As Boolean
  6497. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6498. Public Sub New()
  6499. MyBase.New
  6500. Me.ClearBeforeFill = true
  6501. End Sub
  6502. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6503. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  6504. Get
  6505. If (Me._adapter Is Nothing) Then
  6506. Me.InitAdapter
  6507. End If
  6508. Return Me._adapter
  6509. End Get
  6510. End Property
  6511. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6512. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  6513. Get
  6514. If (Me._connection Is Nothing) Then
  6515. Me.InitConnection
  6516. End If
  6517. Return Me._connection
  6518. End Get
  6519. Set
  6520. Me._connection = value
  6521. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  6522. Me.Adapter.InsertCommand.Connection = value
  6523. End If
  6524. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  6525. Me.Adapter.DeleteCommand.Connection = value
  6526. End If
  6527. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  6528. Me.Adapter.UpdateCommand.Connection = value
  6529. End If
  6530. Dim i As Integer = 0
  6531. Do While (i < Me.CommandCollection.Length)
  6532. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  6533. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  6534. End If
  6535. i = (i + 1)
  6536. Loop
  6537. End Set
  6538. End Property
  6539. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6540. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  6541. Get
  6542. Return Me._transaction
  6543. End Get
  6544. Set
  6545. Me._transaction = value
  6546. Dim i As Integer = 0
  6547. Do While (i < Me.CommandCollection.Length)
  6548. Me.CommandCollection(i).Transaction = Me._transaction
  6549. i = (i + 1)
  6550. Loop
  6551. If ((Not (Me.Adapter) Is Nothing) _
  6552. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  6553. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  6554. End If
  6555. If ((Not (Me.Adapter) Is Nothing) _
  6556. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  6557. Me.Adapter.InsertCommand.Transaction = Me._transaction
  6558. End If
  6559. If ((Not (Me.Adapter) Is Nothing) _
  6560. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  6561. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  6562. End If
  6563. End Set
  6564. End Property
  6565. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6566. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  6567. Get
  6568. If (Me._commandCollection Is Nothing) Then
  6569. Me.InitCommandCollection
  6570. End If
  6571. Return Me._commandCollection
  6572. End Get
  6573. End Property
  6574. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6575. Public Property ClearBeforeFill() As Boolean
  6576. Get
  6577. Return Me._clearBeforeFill
  6578. End Get
  6579. Set
  6580. Me._clearBeforeFill = value
  6581. End Set
  6582. End Property
  6583. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6584. Private Sub InitAdapter()
  6585. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  6586. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  6587. tableMapping.SourceTable = "Table"
  6588. tableMapping.DataSetTable = "OnlineCourse"
  6589. tableMapping.ColumnMappings.Add("CourseID", "CourseID")
  6590. tableMapping.ColumnMappings.Add("URL", "URL")
  6591. Me._adapter.TableMappings.Add(tableMapping)
  6592. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
  6593. Me._adapter.DeleteCommand.Connection = Me.Connection
  6594. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OnlineCourse] WHERE (([CourseID] = @Original_CourseID) AND ([U"& _
  6595. "RL] = @Original_URL))"
  6596. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  6597. 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, "", "", ""))
  6598. 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, "", "", ""))
  6599. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
  6600. Me._adapter.InsertCommand.Connection = Me.Connection
  6601. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OnlineCourse] ([CourseID], [URL]) VALUES (@CourseID, @URL);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"S"& _
  6602. "ELECT CourseID, URL FROM OnlineCourse WHERE (CourseID = @CourseID)"
  6603. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  6604. 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, "", "", ""))
  6605. 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, "", "", ""))
  6606. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
  6607. Me._adapter.UpdateCommand.Connection = Me.Connection
  6608. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OnlineCourse] SET [CourseID] = @CourseID, [URL] = @URL WHERE (([Cou"& _
  6609. "rseID] = @Original_CourseID) AND ([URL] = @Original_URL));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, URL"& _
  6610. " FROM OnlineCourse WHERE (CourseID = @CourseID)"
  6611. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  6612. 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, "", "", ""))
  6613. 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, "", "", ""))
  6614. 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, "", "", ""))
  6615. 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, "", "", ""))
  6616. End Sub
  6617. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6618. Private Sub InitConnection()
  6619. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  6620. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  6621. End Sub
  6622. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6623. Private Sub InitCommandCollection()
  6624. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  6625. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  6626. Me._commandCollection(0).Connection = Me.Connection
  6627. Me._commandCollection(0).CommandText = "SELECT CourseID, URL FROM dbo.OnlineCourse"
  6628. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  6629. End Sub
  6630. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6631. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6632. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  6633. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.OnlineCourseDataTable) As Integer
  6634. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6635. If (Me.ClearBeforeFill = true) Then
  6636. dataTable.Clear
  6637. End If
  6638. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  6639. Return returnValue
  6640. End Function
  6641. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6642. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6643. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  6644. Public Overloads Overridable Function GetData() As SchoolDataSet.OnlineCourseDataTable
  6645. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6646. Dim dataTable As SchoolDataSet.OnlineCourseDataTable = New SchoolDataSet.OnlineCourseDataTable
  6647. Me.Adapter.Fill(dataTable)
  6648. Return dataTable
  6649. End Function
  6650. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6651. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6652. Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.OnlineCourseDataTable) As Integer
  6653. Return Me.Adapter.Update(dataTable)
  6654. End Function
  6655. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6656. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6657. Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
  6658. Return Me.Adapter.Update(dataSet, "OnlineCourse")
  6659. End Function
  6660. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6661. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6662. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  6663. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  6664. End Function
  6665. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6666. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6667. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  6668. Return Me.Adapter.Update(dataRows)
  6669. End Function
  6670. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6671. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6672. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  6673. Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_URL As String) As Integer
  6674. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
  6675. If (Original_URL Is Nothing) Then
  6676. Throw New Global.System.ArgumentNullException("Original_URL")
  6677. Else
  6678. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_URL,String)
  6679. End If
  6680. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  6681. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6682. <> Global.System.Data.ConnectionState.Open) Then
  6683. Me.Adapter.DeleteCommand.Connection.Open
  6684. End If
  6685. Try
  6686. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  6687. Return returnValue
  6688. Finally
  6689. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6690. Me.Adapter.DeleteCommand.Connection.Close
  6691. End If
  6692. End Try
  6693. End Function
  6694. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6695. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6696. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  6697. Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal URL As String) As Integer
  6698. Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
  6699. If (URL Is Nothing) Then
  6700. Throw New Global.System.ArgumentNullException("URL")
  6701. Else
  6702. Me.Adapter.InsertCommand.Parameters(1).Value = CType(URL,String)
  6703. End If
  6704. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  6705. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6706. <> Global.System.Data.ConnectionState.Open) Then
  6707. Me.Adapter.InsertCommand.Connection.Open
  6708. End If
  6709. Try
  6710. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  6711. Return returnValue
  6712. Finally
  6713. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6714. Me.Adapter.InsertCommand.Connection.Close
  6715. End If
  6716. End Try
  6717. End Function
  6718. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6719. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6720. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  6721. 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
  6722. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
  6723. If (URL Is Nothing) Then
  6724. Throw New Global.System.ArgumentNullException("URL")
  6725. Else
  6726. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(URL,String)
  6727. End If
  6728. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_CourseID,Integer)
  6729. If (Original_URL Is Nothing) Then
  6730. Throw New Global.System.ArgumentNullException("Original_URL")
  6731. Else
  6732. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_URL,String)
  6733. End If
  6734. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  6735. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6736. <> Global.System.Data.ConnectionState.Open) Then
  6737. Me.Adapter.UpdateCommand.Connection.Open
  6738. End If
  6739. Try
  6740. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  6741. Return returnValue
  6742. Finally
  6743. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6744. Me.Adapter.UpdateCommand.Connection.Close
  6745. End If
  6746. End Try
  6747. End Function
  6748. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6749. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6750. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  6751. Public Overloads Overridable Function Update(ByVal URL As String, ByVal Original_CourseID As Integer, ByVal Original_URL As String) As Integer
  6752. Return Me.Update(Original_CourseID, URL, Original_CourseID, Original_URL)
  6753. End Function
  6754. End Class
  6755. '''<summary>
  6756. '''Represents the connection and commands used to retrieve and save data.
  6757. '''</summary>
  6758. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  6759. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  6760. Global.System.ComponentModel.ToolboxItem(true), _
  6761. Global.System.ComponentModel.DataObjectAttribute(true), _
  6762. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  6763. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  6764. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6765. Partial Public Class OnsiteCourseTableAdapter
  6766. Inherits Global.System.ComponentModel.Component
  6767. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  6768. Private _connection As Global.System.Data.SqlClient.SqlConnection
  6769. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  6770. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  6771. Private _clearBeforeFill As Boolean
  6772. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6773. Public Sub New()
  6774. MyBase.New
  6775. Me.ClearBeforeFill = true
  6776. End Sub
  6777. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6778. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  6779. Get
  6780. If (Me._adapter Is Nothing) Then
  6781. Me.InitAdapter
  6782. End If
  6783. Return Me._adapter
  6784. End Get
  6785. End Property
  6786. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6787. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  6788. Get
  6789. If (Me._connection Is Nothing) Then
  6790. Me.InitConnection
  6791. End If
  6792. Return Me._connection
  6793. End Get
  6794. Set
  6795. Me._connection = value
  6796. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  6797. Me.Adapter.InsertCommand.Connection = value
  6798. End If
  6799. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  6800. Me.Adapter.DeleteCommand.Connection = value
  6801. End If
  6802. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  6803. Me.Adapter.UpdateCommand.Connection = value
  6804. End If
  6805. Dim i As Integer = 0
  6806. Do While (i < Me.CommandCollection.Length)
  6807. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  6808. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  6809. End If
  6810. i = (i + 1)
  6811. Loop
  6812. End Set
  6813. End Property
  6814. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6815. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  6816. Get
  6817. Return Me._transaction
  6818. End Get
  6819. Set
  6820. Me._transaction = value
  6821. Dim i As Integer = 0
  6822. Do While (i < Me.CommandCollection.Length)
  6823. Me.CommandCollection(i).Transaction = Me._transaction
  6824. i = (i + 1)
  6825. Loop
  6826. If ((Not (Me.Adapter) Is Nothing) _
  6827. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  6828. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  6829. End If
  6830. If ((Not (Me.Adapter) Is Nothing) _
  6831. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  6832. Me.Adapter.InsertCommand.Transaction = Me._transaction
  6833. End If
  6834. If ((Not (Me.Adapter) Is Nothing) _
  6835. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  6836. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  6837. End If
  6838. End Set
  6839. End Property
  6840. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6841. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  6842. Get
  6843. If (Me._commandCollection Is Nothing) Then
  6844. Me.InitCommandCollection
  6845. End If
  6846. Return Me._commandCollection
  6847. End Get
  6848. End Property
  6849. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6850. Public Property ClearBeforeFill() As Boolean
  6851. Get
  6852. Return Me._clearBeforeFill
  6853. End Get
  6854. Set
  6855. Me._clearBeforeFill = value
  6856. End Set
  6857. End Property
  6858. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6859. Private Sub InitAdapter()
  6860. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  6861. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  6862. tableMapping.SourceTable = "Table"
  6863. tableMapping.DataSetTable = "OnsiteCourse"
  6864. tableMapping.ColumnMappings.Add("CourseID", "CourseID")
  6865. tableMapping.ColumnMappings.Add("Location", "Location")
  6866. tableMapping.ColumnMappings.Add("Days", "Days")
  6867. tableMapping.ColumnMappings.Add("Time", "Time")
  6868. Me._adapter.TableMappings.Add(tableMapping)
  6869. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
  6870. Me._adapter.DeleteCommand.Connection = Me.Connection
  6871. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OnsiteCourse] WHERE (([CourseID] = @Original_CourseID) AND ([L"& _
  6872. "ocation] = @Original_Location) AND ([Days] = @Original_Days) AND ([Time] = @Orig"& _
  6873. "inal_Time))"
  6874. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  6875. 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, "", "", ""))
  6876. 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, "", "", ""))
  6877. 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, "", "", ""))
  6878. 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, "", "", ""))
  6879. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
  6880. Me._adapter.InsertCommand.Connection = Me.Connection
  6881. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OnsiteCourse] ([CourseID], [Location], [Days], [Time]) VALUES "& _
  6882. "(@CourseID, @Location, @Days, @Time);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Location, Days, Time FRO"& _
  6883. "M OnsiteCourse WHERE (CourseID = @CourseID)"
  6884. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  6885. 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, "", "", ""))
  6886. 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, "", "", ""))
  6887. 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, "", "", ""))
  6888. 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, "", "", ""))
  6889. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
  6890. Me._adapter.UpdateCommand.Connection = Me.Connection
  6891. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OnsiteCourse] SET [CourseID] = @CourseID, [Location] = @Location, ["& _
  6892. "Days] = @Days, [Time] = @Time WHERE (([CourseID] = @Original_CourseID) AND ([Loc"& _
  6893. "ation] = @Original_Location) AND ([Days] = @Original_Days) AND ([Time] = @Origin"& _
  6894. "al_Time));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Location, Days, Time FROM OnsiteCourse WHERE (Cours"& _
  6895. "eID = @CourseID)"
  6896. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  6897. 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, "", "", ""))
  6898. 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, "", "", ""))
  6899. 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, "", "", ""))
  6900. 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, "", "", ""))
  6901. 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, "", "", ""))
  6902. 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, "", "", ""))
  6903. 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, "", "", ""))
  6904. 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, "", "", ""))
  6905. End Sub
  6906. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6907. Private Sub InitConnection()
  6908. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  6909. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  6910. End Sub
  6911. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  6912. Private Sub InitCommandCollection()
  6913. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  6914. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  6915. Me._commandCollection(0).Connection = Me.Connection
  6916. Me._commandCollection(0).CommandText = "SELECT CourseID, Location, Days, Time FROM dbo.OnsiteCourse"
  6917. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  6918. End Sub
  6919. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6920. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6921. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  6922. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.OnsiteCourseDataTable) As Integer
  6923. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6924. If (Me.ClearBeforeFill = true) Then
  6925. dataTable.Clear
  6926. End If
  6927. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  6928. Return returnValue
  6929. End Function
  6930. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6931. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6932. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  6933. Public Overloads Overridable Function GetData() As SchoolDataSet.OnsiteCourseDataTable
  6934. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  6935. Dim dataTable As SchoolDataSet.OnsiteCourseDataTable = New SchoolDataSet.OnsiteCourseDataTable
  6936. Me.Adapter.Fill(dataTable)
  6937. Return dataTable
  6938. End Function
  6939. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6940. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6941. Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.OnsiteCourseDataTable) As Integer
  6942. Return Me.Adapter.Update(dataTable)
  6943. End Function
  6944. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6945. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6946. Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
  6947. Return Me.Adapter.Update(dataSet, "OnsiteCourse")
  6948. End Function
  6949. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6950. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6951. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  6952. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  6953. End Function
  6954. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6955. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  6956. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  6957. Return Me.Adapter.Update(dataRows)
  6958. End Function
  6959. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6960. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6961. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  6962. 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
  6963. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
  6964. If (Original_Location Is Nothing) Then
  6965. Throw New Global.System.ArgumentNullException("Original_Location")
  6966. Else
  6967. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Location,String)
  6968. End If
  6969. If (Original_Days Is Nothing) Then
  6970. Throw New Global.System.ArgumentNullException("Original_Days")
  6971. Else
  6972. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Days,String)
  6973. End If
  6974. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_Time,Date)
  6975. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  6976. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  6977. <> Global.System.Data.ConnectionState.Open) Then
  6978. Me.Adapter.DeleteCommand.Connection.Open
  6979. End If
  6980. Try
  6981. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  6982. Return returnValue
  6983. Finally
  6984. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  6985. Me.Adapter.DeleteCommand.Connection.Close
  6986. End If
  6987. End Try
  6988. End Function
  6989. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  6990. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  6991. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  6992. Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal Location As String, ByVal Days As String, ByVal Time As Date) As Integer
  6993. Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
  6994. If (Location Is Nothing) Then
  6995. Throw New Global.System.ArgumentNullException("Location")
  6996. Else
  6997. Me.Adapter.InsertCommand.Parameters(1).Value = CType(Location,String)
  6998. End If
  6999. If (Days Is Nothing) Then
  7000. Throw New Global.System.ArgumentNullException("Days")
  7001. Else
  7002. Me.Adapter.InsertCommand.Parameters(2).Value = CType(Days,String)
  7003. End If
  7004. Me.Adapter.InsertCommand.Parameters(3).Value = CType(Time,Date)
  7005. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  7006. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  7007. <> Global.System.Data.ConnectionState.Open) Then
  7008. Me.Adapter.InsertCommand.Connection.Open
  7009. End If
  7010. Try
  7011. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  7012. Return returnValue
  7013. Finally
  7014. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  7015. Me.Adapter.InsertCommand.Connection.Close
  7016. End If
  7017. End Try
  7018. End Function
  7019. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7020. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7021. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  7022. 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
  7023. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
  7024. If (Location Is Nothing) Then
  7025. Throw New Global.System.ArgumentNullException("Location")
  7026. Else
  7027. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Location,String)
  7028. End If
  7029. If (Days Is Nothing) Then
  7030. Throw New Global.System.ArgumentNullException("Days")
  7031. Else
  7032. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Days,String)
  7033. End If
  7034. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Time,Date)
  7035. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_CourseID,Integer)
  7036. If (Original_Location Is Nothing) Then
  7037. Throw New Global.System.ArgumentNullException("Original_Location")
  7038. Else
  7039. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_Location,String)
  7040. End If
  7041. If (Original_Days Is Nothing) Then
  7042. Throw New Global.System.ArgumentNullException("Original_Days")
  7043. Else
  7044. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_Days,String)
  7045. End If
  7046. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Time,Date)
  7047. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  7048. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  7049. <> Global.System.Data.ConnectionState.Open) Then
  7050. Me.Adapter.UpdateCommand.Connection.Open
  7051. End If
  7052. Try
  7053. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  7054. Return returnValue
  7055. Finally
  7056. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  7057. Me.Adapter.UpdateCommand.Connection.Close
  7058. End If
  7059. End Try
  7060. End Function
  7061. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7062. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7063. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  7064. 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
  7065. Return Me.Update(Original_CourseID, Location, Days, Time, Original_CourseID, Original_Location, Original_Days, Original_Time)
  7066. End Function
  7067. End Class
  7068. '''<summary>
  7069. '''Represents the connection and commands used to retrieve and save data.
  7070. '''</summary>
  7071. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  7072. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  7073. Global.System.ComponentModel.ToolboxItem(true), _
  7074. Global.System.ComponentModel.DataObjectAttribute(true), _
  7075. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  7076. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  7077. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  7078. Partial Public Class PersonTableAdapter
  7079. Inherits Global.System.ComponentModel.Component
  7080. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  7081. Private _connection As Global.System.Data.SqlClient.SqlConnection
  7082. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  7083. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  7084. Private _clearBeforeFill As Boolean
  7085. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7086. Public Sub New()
  7087. MyBase.New
  7088. Me.ClearBeforeFill = true
  7089. End Sub
  7090. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7091. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  7092. Get
  7093. If (Me._adapter Is Nothing) Then
  7094. Me.InitAdapter
  7095. End If
  7096. Return Me._adapter
  7097. End Get
  7098. End Property
  7099. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7100. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  7101. Get
  7102. If (Me._connection Is Nothing) Then
  7103. Me.InitConnection
  7104. End If
  7105. Return Me._connection
  7106. End Get
  7107. Set
  7108. Me._connection = value
  7109. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  7110. Me.Adapter.InsertCommand.Connection = value
  7111. End If
  7112. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  7113. Me.Adapter.DeleteCommand.Connection = value
  7114. End If
  7115. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  7116. Me.Adapter.UpdateCommand.Connection = value
  7117. End If
  7118. Dim i As Integer = 0
  7119. Do While (i < Me.CommandCollection.Length)
  7120. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  7121. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  7122. End If
  7123. i = (i + 1)
  7124. Loop
  7125. End Set
  7126. End Property
  7127. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7128. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  7129. Get
  7130. Return Me._transaction
  7131. End Get
  7132. Set
  7133. Me._transaction = value
  7134. Dim i As Integer = 0
  7135. Do While (i < Me.CommandCollection.Length)
  7136. Me.CommandCollection(i).Transaction = Me._transaction
  7137. i = (i + 1)
  7138. Loop
  7139. If ((Not (Me.Adapter) Is Nothing) _
  7140. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  7141. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  7142. End If
  7143. If ((Not (Me.Adapter) Is Nothing) _
  7144. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  7145. Me.Adapter.InsertCommand.Transaction = Me._transaction
  7146. End If
  7147. If ((Not (Me.Adapter) Is Nothing) _
  7148. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  7149. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  7150. End If
  7151. End Set
  7152. End Property
  7153. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7154. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  7155. Get
  7156. If (Me._commandCollection Is Nothing) Then
  7157. Me.InitCommandCollection
  7158. End If
  7159. Return Me._commandCollection
  7160. End Get
  7161. End Property
  7162. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7163. Public Property ClearBeforeFill() As Boolean
  7164. Get
  7165. Return Me._clearBeforeFill
  7166. End Get
  7167. Set
  7168. Me._clearBeforeFill = value
  7169. End Set
  7170. End Property
  7171. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7172. Private Sub InitAdapter()
  7173. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  7174. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  7175. tableMapping.SourceTable = "Table"
  7176. tableMapping.DataSetTable = "Person"
  7177. tableMapping.ColumnMappings.Add("PersonID", "PersonID")
  7178. tableMapping.ColumnMappings.Add("LastName", "LastName")
  7179. tableMapping.ColumnMappings.Add("FirstName", "FirstName")
  7180. tableMapping.ColumnMappings.Add("PersonCategory", "PersonCategory")
  7181. tableMapping.ColumnMappings.Add("HireDate", "HireDate")
  7182. tableMapping.ColumnMappings.Add("EnrollmentDate", "EnrollmentDate")
  7183. tableMapping.ColumnMappings.Add("Picture", "Picture")
  7184. Me._adapter.TableMappings.Add(tableMapping)
  7185. Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
  7186. Me._adapter.DeleteCommand.Connection = Me.Connection
  7187. Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Person] WHERE (([PersonID] = @Original_PersonID) AND ([LastNam"& _
  7188. "e] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ([PersonCat"& _
  7189. "egory] = @Original_PersonCategory) AND ((@IsNull_HireDate = 1 AND [HireDate] IS "& _
  7190. "NULL) OR ([HireDate] = @Original_HireDate)) AND ((@IsNull_EnrollmentDate = 1 AND"& _
  7191. " [EnrollmentDate] IS NULL) OR ([EnrollmentDate] = @Original_EnrollmentDate)))"
  7192. Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
  7193. 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, "", "", ""))
  7194. 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, "", "", ""))
  7195. 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, "", "", ""))
  7196. 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, "", "", ""))
  7197. 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, "", "", ""))
  7198. 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, "", "", ""))
  7199. 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, "", "", ""))
  7200. 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, "", "", ""))
  7201. Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
  7202. Me._adapter.InsertCommand.Connection = Me.Connection
  7203. Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Person] ([LastName], [FirstName], [PersonCategory], [HireDate]"& _
  7204. ", [EnrollmentDate], [Picture]) VALUES (@LastName, @FirstName, @PersonCategory, @"& _
  7205. "HireDate, @EnrollmentDate, @Picture);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT PersonID, LastName, FirstName, Per"& _
  7206. "sonCategory, HireDate, EnrollmentDate, Picture FROM Person WHERE (PersonID = SCO"& _
  7207. "PE_IDENTITY())"
  7208. Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
  7209. 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, "", "", ""))
  7210. 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, "", "", ""))
  7211. 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, "", "", ""))
  7212. 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, "", "", ""))
  7213. 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, "", "", ""))
  7214. 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, "", "", ""))
  7215. Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
  7216. Me._adapter.UpdateCommand.Connection = Me.Connection
  7217. Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Person] SET [LastName] = @LastName, [FirstName] = @FirstName, [Pers"& _
  7218. "onCategory] = @PersonCategory, [HireDate] = @HireDate, [EnrollmentDate] = @Enrol"& _
  7219. "lmentDate, [Picture] = @Picture WHERE (([PersonID] = @Original_PersonID) AND ([L"& _
  7220. "astName] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ([Per"& _
  7221. "sonCategory] = @Original_PersonCategory) AND ((@IsNull_HireDate = 1 AND [HireDat"& _
  7222. "e] IS NULL) OR ([HireDate] = @Original_HireDate)) AND ((@IsNull_EnrollmentDate ="& _
  7223. " 1 AND [EnrollmentDate] IS NULL) OR ([EnrollmentDate] = @Original_EnrollmentDate"& _
  7224. ")));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT PersonID, LastName, FirstName, PersonCategory, HireDate, Enrollment"& _
  7225. "Date, Picture FROM Person WHERE (PersonID = @PersonID)"
  7226. Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
  7227. 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, "", "", ""))
  7228. 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, "", "", ""))
  7229. 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, "", "", ""))
  7230. 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, "", "", ""))
  7231. 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, "", "", ""))
  7232. 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, "", "", ""))
  7233. 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, "", "", ""))
  7234. 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, "", "", ""))
  7235. 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, "", "", ""))
  7236. 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, "", "", ""))
  7237. 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, "", "", ""))
  7238. 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, "", "", ""))
  7239. 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, "", "", ""))
  7240. 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, "", "", ""))
  7241. 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, "", "", ""))
  7242. End Sub
  7243. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7244. Private Sub InitConnection()
  7245. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  7246. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  7247. End Sub
  7248. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7249. Private Sub InitCommandCollection()
  7250. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  7251. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  7252. Me._commandCollection(0).Connection = Me.Connection
  7253. Me._commandCollection(0).CommandText = "SELECT PersonID, LastName, FirstName, PersonCategory, HireDate, EnrollmentDate, P"& _
  7254. "icture FROM dbo.Person"
  7255. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
  7256. End Sub
  7257. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7258. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7259. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  7260. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.PersonDataTable) As Integer
  7261. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  7262. If (Me.ClearBeforeFill = true) Then
  7263. dataTable.Clear
  7264. End If
  7265. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  7266. Return returnValue
  7267. End Function
  7268. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7269. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7270. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  7271. Public Overloads Overridable Function GetData() As SchoolDataSet.PersonDataTable
  7272. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  7273. Dim dataTable As SchoolDataSet.PersonDataTable = New SchoolDataSet.PersonDataTable
  7274. Me.Adapter.Fill(dataTable)
  7275. Return dataTable
  7276. End Function
  7277. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7278. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  7279. Public Overloads Overridable Function Update(ByVal dataTable As SchoolDataSet.PersonDataTable) As Integer
  7280. Return Me.Adapter.Update(dataTable)
  7281. End Function
  7282. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7283. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  7284. Public Overloads Overridable Function Update(ByVal dataSet As SchoolDataSet) As Integer
  7285. Return Me.Adapter.Update(dataSet, "Person")
  7286. End Function
  7287. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7288. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  7289. Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
  7290. Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
  7291. End Function
  7292. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7293. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  7294. Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
  7295. Return Me.Adapter.Update(dataRows)
  7296. End Function
  7297. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7298. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7299. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
  7300. 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
  7301. Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_PersonID,Integer)
  7302. If (Original_LastName Is Nothing) Then
  7303. Throw New Global.System.ArgumentNullException("Original_LastName")
  7304. Else
  7305. Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_LastName,String)
  7306. End If
  7307. If (Original_FirstName Is Nothing) Then
  7308. Throw New Global.System.ArgumentNullException("Original_FirstName")
  7309. Else
  7310. Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_FirstName,String)
  7311. End If
  7312. Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_PersonCategory,Short)
  7313. If (Original_HireDate.HasValue = true) Then
  7314. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(0,Object)
  7315. Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_HireDate.Value,Date)
  7316. Else
  7317. Me.Adapter.DeleteCommand.Parameters(4).Value = CType(1,Object)
  7318. Me.Adapter.DeleteCommand.Parameters(5).Value = Global.System.DBNull.Value
  7319. End If
  7320. If (Original_EnrollmentDate.HasValue = true) Then
  7321. Me.Adapter.DeleteCommand.Parameters(6).Value = CType(0,Object)
  7322. Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_EnrollmentDate.Value,Date)
  7323. Else
  7324. Me.Adapter.DeleteCommand.Parameters(6).Value = CType(1,Object)
  7325. Me.Adapter.DeleteCommand.Parameters(7).Value = Global.System.DBNull.Value
  7326. End If
  7327. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
  7328. If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  7329. <> Global.System.Data.ConnectionState.Open) Then
  7330. Me.Adapter.DeleteCommand.Connection.Open
  7331. End If
  7332. Try
  7333. Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
  7334. Return returnValue
  7335. Finally
  7336. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  7337. Me.Adapter.DeleteCommand.Connection.Close
  7338. End If
  7339. End Try
  7340. End Function
  7341. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7342. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7343. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
  7344. 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
  7345. If (LastName Is Nothing) Then
  7346. Throw New Global.System.ArgumentNullException("LastName")
  7347. Else
  7348. Me.Adapter.InsertCommand.Parameters(0).Value = CType(LastName,String)
  7349. End If
  7350. If (FirstName Is Nothing) Then
  7351. Throw New Global.System.ArgumentNullException("FirstName")
  7352. Else
  7353. Me.Adapter.InsertCommand.Parameters(1).Value = CType(FirstName,String)
  7354. End If
  7355. Me.Adapter.InsertCommand.Parameters(2).Value = CType(PersonCategory,Short)
  7356. If (HireDate.HasValue = true) Then
  7357. Me.Adapter.InsertCommand.Parameters(3).Value = CType(HireDate.Value,Date)
  7358. Else
  7359. Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value
  7360. End If
  7361. If (EnrollmentDate.HasValue = true) Then
  7362. Me.Adapter.InsertCommand.Parameters(4).Value = CType(EnrollmentDate.Value,Date)
  7363. Else
  7364. Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
  7365. End If
  7366. If (Picture Is Nothing) Then
  7367. Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value
  7368. Else
  7369. Me.Adapter.InsertCommand.Parameters(5).Value = CType(Picture,Byte())
  7370. End If
  7371. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
  7372. If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  7373. <> Global.System.Data.ConnectionState.Open) Then
  7374. Me.Adapter.InsertCommand.Connection.Open
  7375. End If
  7376. Try
  7377. Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
  7378. Return returnValue
  7379. Finally
  7380. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  7381. Me.Adapter.InsertCommand.Connection.Close
  7382. End If
  7383. End Try
  7384. End Function
  7385. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7386. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7387. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  7388. 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
  7389. If (LastName Is Nothing) Then
  7390. Throw New Global.System.ArgumentNullException("LastName")
  7391. Else
  7392. Me.Adapter.UpdateCommand.Parameters(0).Value = CType(LastName,String)
  7393. End If
  7394. If (FirstName Is Nothing) Then
  7395. Throw New Global.System.ArgumentNullException("FirstName")
  7396. Else
  7397. Me.Adapter.UpdateCommand.Parameters(1).Value = CType(FirstName,String)
  7398. End If
  7399. Me.Adapter.UpdateCommand.Parameters(2).Value = CType(PersonCategory,Short)
  7400. If (HireDate.HasValue = true) Then
  7401. Me.Adapter.UpdateCommand.Parameters(3).Value = CType(HireDate.Value,Date)
  7402. Else
  7403. Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value
  7404. End If
  7405. If (EnrollmentDate.HasValue = true) Then
  7406. Me.Adapter.UpdateCommand.Parameters(4).Value = CType(EnrollmentDate.Value,Date)
  7407. Else
  7408. Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
  7409. End If
  7410. If (Picture Is Nothing) Then
  7411. Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value
  7412. Else
  7413. Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Picture,Byte())
  7414. End If
  7415. Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_PersonID,Integer)
  7416. If (Original_LastName Is Nothing) Then
  7417. Throw New Global.System.ArgumentNullException("Original_LastName")
  7418. Else
  7419. Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_LastName,String)
  7420. End If
  7421. If (Original_FirstName Is Nothing) Then
  7422. Throw New Global.System.ArgumentNullException("Original_FirstName")
  7423. Else
  7424. Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_FirstName,String)
  7425. End If
  7426. Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_PersonCategory,Short)
  7427. If (Original_HireDate.HasValue = true) Then
  7428. Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object)
  7429. Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_HireDate.Value,Date)
  7430. Else
  7431. Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object)
  7432. Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value
  7433. End If
  7434. If (Original_EnrollmentDate.HasValue = true) Then
  7435. Me.Adapter.UpdateCommand.Parameters(12).Value = CType(0,Object)
  7436. Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_EnrollmentDate.Value,Date)
  7437. Else
  7438. Me.Adapter.UpdateCommand.Parameters(12).Value = CType(1,Object)
  7439. Me.Adapter.UpdateCommand.Parameters(13).Value = Global.System.DBNull.Value
  7440. End If
  7441. Me.Adapter.UpdateCommand.Parameters(14).Value = CType(PersonID,Integer)
  7442. Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
  7443. If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
  7444. <> Global.System.Data.ConnectionState.Open) Then
  7445. Me.Adapter.UpdateCommand.Connection.Open
  7446. End If
  7447. Try
  7448. Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
  7449. Return returnValue
  7450. Finally
  7451. If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
  7452. Me.Adapter.UpdateCommand.Connection.Close
  7453. End If
  7454. End Try
  7455. End Function
  7456. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7457. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7458. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
  7459. 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
  7460. Return Me.Update(LastName, FirstName, PersonCategory, HireDate, EnrollmentDate, Picture, Original_PersonID, Original_LastName, Original_FirstName, Original_PersonCategory, Original_HireDate, Original_EnrollmentDate, Original_PersonID)
  7461. End Function
  7462. End Class
  7463. '''<summary>
  7464. '''Represents the connection and commands used to retrieve and save data.
  7465. '''</summary>
  7466. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  7467. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  7468. Global.System.ComponentModel.ToolboxItem(true), _
  7469. Global.System.ComponentModel.DataObjectAttribute(true), _
  7470. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  7471. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  7472. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  7473. Partial Public Class GetStudentGradesTableAdapter
  7474. Inherits Global.System.ComponentModel.Component
  7475. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  7476. Private _connection As Global.System.Data.SqlClient.SqlConnection
  7477. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  7478. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  7479. Private _clearBeforeFill As Boolean
  7480. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7481. Public Sub New()
  7482. MyBase.New
  7483. Me.ClearBeforeFill = true
  7484. End Sub
  7485. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7486. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  7487. Get
  7488. If (Me._adapter Is Nothing) Then
  7489. Me.InitAdapter
  7490. End If
  7491. Return Me._adapter
  7492. End Get
  7493. End Property
  7494. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7495. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  7496. Get
  7497. If (Me._connection Is Nothing) Then
  7498. Me.InitConnection
  7499. End If
  7500. Return Me._connection
  7501. End Get
  7502. Set
  7503. Me._connection = value
  7504. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  7505. Me.Adapter.InsertCommand.Connection = value
  7506. End If
  7507. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  7508. Me.Adapter.DeleteCommand.Connection = value
  7509. End If
  7510. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  7511. Me.Adapter.UpdateCommand.Connection = value
  7512. End If
  7513. Dim i As Integer = 0
  7514. Do While (i < Me.CommandCollection.Length)
  7515. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  7516. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  7517. End If
  7518. i = (i + 1)
  7519. Loop
  7520. End Set
  7521. End Property
  7522. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7523. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  7524. Get
  7525. Return Me._transaction
  7526. End Get
  7527. Set
  7528. Me._transaction = value
  7529. Dim i As Integer = 0
  7530. Do While (i < Me.CommandCollection.Length)
  7531. Me.CommandCollection(i).Transaction = Me._transaction
  7532. i = (i + 1)
  7533. Loop
  7534. If ((Not (Me.Adapter) Is Nothing) _
  7535. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  7536. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  7537. End If
  7538. If ((Not (Me.Adapter) Is Nothing) _
  7539. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  7540. Me.Adapter.InsertCommand.Transaction = Me._transaction
  7541. End If
  7542. If ((Not (Me.Adapter) Is Nothing) _
  7543. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  7544. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  7545. End If
  7546. End Set
  7547. End Property
  7548. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7549. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  7550. Get
  7551. If (Me._commandCollection Is Nothing) Then
  7552. Me.InitCommandCollection
  7553. End If
  7554. Return Me._commandCollection
  7555. End Get
  7556. End Property
  7557. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7558. Public Property ClearBeforeFill() As Boolean
  7559. Get
  7560. Return Me._clearBeforeFill
  7561. End Get
  7562. Set
  7563. Me._clearBeforeFill = value
  7564. End Set
  7565. End Property
  7566. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7567. Private Sub InitAdapter()
  7568. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  7569. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  7570. tableMapping.SourceTable = "Table"
  7571. tableMapping.DataSetTable = "GetStudentGrades"
  7572. tableMapping.ColumnMappings.Add("EnrollmentID", "EnrollmentID")
  7573. tableMapping.ColumnMappings.Add("Grade", "Grade")
  7574. Me._adapter.TableMappings.Add(tableMapping)
  7575. End Sub
  7576. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7577. Private Sub InitConnection()
  7578. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  7579. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  7580. End Sub
  7581. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7582. Private Sub InitCommandCollection()
  7583. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  7584. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  7585. Me._commandCollection(0).Connection = Me.Connection
  7586. Me._commandCollection(0).CommandText = "dbo.GetStudentGrades"
  7587. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure
  7588. 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, "", "", ""))
  7589. 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, "", "", ""))
  7590. End Sub
  7591. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7592. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7593. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  7594. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.GetStudentGradesDataTable, ByVal StudentID As Global.System.Nullable(Of Integer)) As Integer
  7595. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  7596. If (StudentID.HasValue = true) Then
  7597. Me.Adapter.SelectCommand.Parameters(1).Value = CType(StudentID.Value,Integer)
  7598. Else
  7599. Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
  7600. End If
  7601. If (Me.ClearBeforeFill = true) Then
  7602. dataTable.Clear
  7603. End If
  7604. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  7605. Return returnValue
  7606. End Function
  7607. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7608. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7609. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  7610. Public Overloads Overridable Function GetData(ByVal StudentID As Global.System.Nullable(Of Integer)) As SchoolDataSet.GetStudentGradesDataTable
  7611. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  7612. If (StudentID.HasValue = true) Then
  7613. Me.Adapter.SelectCommand.Parameters(1).Value = CType(StudentID.Value,Integer)
  7614. Else
  7615. Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
  7616. End If
  7617. Dim dataTable As SchoolDataSet.GetStudentGradesDataTable = New SchoolDataSet.GetStudentGradesDataTable
  7618. Me.Adapter.Fill(dataTable)
  7619. Return dataTable
  7620. End Function
  7621. End Class
  7622. '''<summary>
  7623. '''Represents the connection and commands used to retrieve and save data.
  7624. '''</summary>
  7625. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  7626. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  7627. Global.System.ComponentModel.ToolboxItem(true), _
  7628. Global.System.ComponentModel.DataObjectAttribute(true), _
  7629. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  7630. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  7631. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  7632. Partial Public Class InsertOfficeAssignmentTableAdapter
  7633. Inherits Global.System.ComponentModel.Component
  7634. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  7635. Private _connection As Global.System.Data.SqlClient.SqlConnection
  7636. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  7637. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  7638. Private _clearBeforeFill As Boolean
  7639. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7640. Public Sub New()
  7641. MyBase.New
  7642. Me.ClearBeforeFill = true
  7643. End Sub
  7644. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7645. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  7646. Get
  7647. If (Me._adapter Is Nothing) Then
  7648. Me.InitAdapter
  7649. End If
  7650. Return Me._adapter
  7651. End Get
  7652. End Property
  7653. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7654. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  7655. Get
  7656. If (Me._connection Is Nothing) Then
  7657. Me.InitConnection
  7658. End If
  7659. Return Me._connection
  7660. End Get
  7661. Set
  7662. Me._connection = value
  7663. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  7664. Me.Adapter.InsertCommand.Connection = value
  7665. End If
  7666. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  7667. Me.Adapter.DeleteCommand.Connection = value
  7668. End If
  7669. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  7670. Me.Adapter.UpdateCommand.Connection = value
  7671. End If
  7672. Dim i As Integer = 0
  7673. Do While (i < Me.CommandCollection.Length)
  7674. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  7675. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  7676. End If
  7677. i = (i + 1)
  7678. Loop
  7679. End Set
  7680. End Property
  7681. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7682. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  7683. Get
  7684. Return Me._transaction
  7685. End Get
  7686. Set
  7687. Me._transaction = value
  7688. Dim i As Integer = 0
  7689. Do While (i < Me.CommandCollection.Length)
  7690. Me.CommandCollection(i).Transaction = Me._transaction
  7691. i = (i + 1)
  7692. Loop
  7693. If ((Not (Me.Adapter) Is Nothing) _
  7694. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  7695. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  7696. End If
  7697. If ((Not (Me.Adapter) Is Nothing) _
  7698. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  7699. Me.Adapter.InsertCommand.Transaction = Me._transaction
  7700. End If
  7701. If ((Not (Me.Adapter) Is Nothing) _
  7702. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  7703. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  7704. End If
  7705. End Set
  7706. End Property
  7707. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7708. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  7709. Get
  7710. If (Me._commandCollection Is Nothing) Then
  7711. Me.InitCommandCollection
  7712. End If
  7713. Return Me._commandCollection
  7714. End Get
  7715. End Property
  7716. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7717. Public Property ClearBeforeFill() As Boolean
  7718. Get
  7719. Return Me._clearBeforeFill
  7720. End Get
  7721. Set
  7722. Me._clearBeforeFill = value
  7723. End Set
  7724. End Property
  7725. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7726. Private Sub InitAdapter()
  7727. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  7728. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  7729. tableMapping.SourceTable = "Table"
  7730. tableMapping.DataSetTable = "InsertOfficeAssignment"
  7731. tableMapping.ColumnMappings.Add("Timestamp", "Timestamp")
  7732. Me._adapter.TableMappings.Add(tableMapping)
  7733. End Sub
  7734. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7735. Private Sub InitConnection()
  7736. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  7737. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  7738. End Sub
  7739. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7740. Private Sub InitCommandCollection()
  7741. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  7742. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  7743. Me._commandCollection(0).Connection = Me.Connection
  7744. Me._commandCollection(0).CommandText = "dbo.InsertOfficeAssignment"
  7745. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure
  7746. 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, "", "", ""))
  7747. 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, "", "", ""))
  7748. 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, "", "", ""))
  7749. End Sub
  7750. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7751. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7752. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  7753. Public Overloads Overridable Function Fill(ByVal dataTable As SchoolDataSet.InsertOfficeAssignmentDataTable, ByVal InstructorID As Global.System.Nullable(Of Integer), ByVal Location As String) As Integer
  7754. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  7755. If (InstructorID.HasValue = true) Then
  7756. Me.Adapter.SelectCommand.Parameters(1).Value = CType(InstructorID.Value,Integer)
  7757. Else
  7758. Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
  7759. End If
  7760. If (Location Is Nothing) Then
  7761. Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
  7762. Else
  7763. Me.Adapter.SelectCommand.Parameters(2).Value = CType(Location,String)
  7764. End If
  7765. If (Me.ClearBeforeFill = true) Then
  7766. dataTable.Clear
  7767. End If
  7768. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  7769. Return returnValue
  7770. End Function
  7771. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7772. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7773. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  7774. Public Overloads Overridable Function GetData(ByVal InstructorID As Global.System.Nullable(Of Integer), ByVal Location As String) As SchoolDataSet.InsertOfficeAssignmentDataTable
  7775. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  7776. If (InstructorID.HasValue = true) Then
  7777. Me.Adapter.SelectCommand.Parameters(1).Value = CType(InstructorID.Value,Integer)
  7778. Else
  7779. Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
  7780. End If
  7781. If (Location Is Nothing) Then
  7782. Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
  7783. Else
  7784. Me.Adapter.SelectCommand.Parameters(2).Value = CType(Location,String)
  7785. End If
  7786. Dim dataTable As SchoolDataSet.InsertOfficeAssignmentDataTable = New SchoolDataSet.InsertOfficeAssignmentDataTable
  7787. Me.Adapter.Fill(dataTable)
  7788. Return dataTable
  7789. End Function
  7790. End Class
  7791. '''<summary>
  7792. '''Represents the connection and commands used to retrieve and save data.
  7793. '''</summary>
  7794. <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
  7795. Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
  7796. Global.System.ComponentModel.ToolboxItem(true), _
  7797. Global.System.ComponentModel.DataObjectAttribute(true), _
  7798. Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
  7799. ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
  7800. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
  7801. Partial Public Class InsertPersonTableAdapter
  7802. Inherits Global.System.ComponentModel.Component
  7803. Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
  7804. Private _connection As Global.System.Data.SqlClient.SqlConnection
  7805. Private _transaction As Global.System.Data.SqlClient.SqlTransaction
  7806. Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
  7807. Private _clearBeforeFill As Boolean
  7808. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7809. Public Sub New()
  7810. MyBase.New
  7811. Me.ClearBeforeFill = true
  7812. End Sub
  7813. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7814. Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
  7815. Get
  7816. If (Me._adapter Is Nothing) Then
  7817. Me.InitAdapter
  7818. End If
  7819. Return Me._adapter
  7820. End Get
  7821. End Property
  7822. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7823. Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
  7824. Get
  7825. If (Me._connection Is Nothing) Then
  7826. Me.InitConnection
  7827. End If
  7828. Return Me._connection
  7829. End Get
  7830. Set
  7831. Me._connection = value
  7832. If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
  7833. Me.Adapter.InsertCommand.Connection = value
  7834. End If
  7835. If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
  7836. Me.Adapter.DeleteCommand.Connection = value
  7837. End If
  7838. If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
  7839. Me.Adapter.UpdateCommand.Connection = value
  7840. End If
  7841. Dim i As Integer = 0
  7842. Do While (i < Me.CommandCollection.Length)
  7843. If (Not (Me.CommandCollection(i)) Is Nothing) Then
  7844. CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
  7845. End If
  7846. i = (i + 1)
  7847. Loop
  7848. End Set
  7849. End Property
  7850. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7851. Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
  7852. Get
  7853. Return Me._transaction
  7854. End Get
  7855. Set
  7856. Me._transaction = value
  7857. Dim i As Integer = 0
  7858. Do While (i < Me.CommandCollection.Length)
  7859. Me.CommandCollection(i).Transaction = Me._transaction
  7860. i = (i + 1)
  7861. Loop
  7862. If ((Not (Me.Adapter) Is Nothing) _
  7863. AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
  7864. Me.Adapter.DeleteCommand.Transaction = Me._transaction
  7865. End If
  7866. If ((Not (Me.Adapter) Is Nothing) _
  7867. AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
  7868. Me.Adapter.InsertCommand.Transaction = Me._transaction
  7869. End If
  7870. If ((Not (Me.Adapter) Is Nothing) _
  7871. AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
  7872. Me.Adapter.UpdateCommand.Transaction = Me._transaction
  7873. End If
  7874. End Set
  7875. End Property
  7876. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7877. Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
  7878. Get
  7879. If (Me._commandCollection Is Nothing) Then
  7880. Me.InitCommandCollection
  7881. End If
  7882. Return Me._commandCollection
  7883. End Get
  7884. End Property
  7885. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7886. Public Property ClearBeforeFill() As Boolean
  7887. Get
  7888. Return Me._clearBeforeFill
  7889. End Get
  7890. Set
  7891. Me._clearBeforeFill = value
  7892. End Set
  7893. End Property
  7894. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7895. Private Sub InitAdapter()
  7896. Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
  7897. Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
  7898. tableMapping.SourceTable = "Table"
  7899. tableMapping.DataSetTable = "InsertPerson"
  7900. tableMapping.ColumnMappings.Add("NewPersonID", "NewPersonID")
  7901. Me._adapter.TableMappings.Add(tableMapping)
  7902. End Sub
  7903. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7904. Private Sub InitConnection()
  7905. Me._connection = New Global.System.Data.SqlClient.SqlConnection
  7906. Me._connection.ConnectionString = Global.VBVstoExcelWorkbook.MySettings.Default.SchoolConnectionString
  7907. End Sub
  7908. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
  7909. Private Sub InitCommandCollection()
  7910. Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
  7911. Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
  7912. Me._commandCollection(0).Connection = Me.Connection
  7913. Me._commandCollection(0).CommandText = "dbo.InsertPerson"
  7914. Me._commandCollection(0).CommandType = Global.System.Data.CommandType.StoredProcedure
  7915. 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, "", "", ""))
  7916. 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, "", "", ""))
  7917. 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, "", "", ""))
  7918. 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, "", "", ""))
  7919. 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, "", "", ""))
  7920. End Sub
  7921. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7922. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7923. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
  7924. 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
  7925. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  7926. If (LastName Is Nothing) Then
  7927. Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
  7928. Else
  7929. Me.Adapter.SelectCommand.Parameters(1).Value = CType(LastName,String)
  7930. End If
  7931. If (FirstName Is Nothing) Then
  7932. Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
  7933. Else
  7934. Me.Adapter.SelectCommand.Parameters(2).Value = CType(FirstName,String)
  7935. End If
  7936. If (HireDate.HasValue = true) Then
  7937. Me.Adapter.SelectCommand.Parameters(3).Value = CType(HireDate.Value,Date)
  7938. Else
  7939. Me.Adapter.SelectCommand.Parameters(3).Value = Global.System.DBNull.Value
  7940. End If
  7941. If (EnrollmentDate.HasValue = true) Then
  7942. Me.Adapter.SelectCommand.Parameters(4).Value = CType(EnrollmentDate.Value,Date)
  7943. Else
  7944. Me.Adapter.SelectCommand.Parameters(4).Value = Global.System.DBNull.Value
  7945. End If
  7946. If (Me.ClearBeforeFill = true) Then
  7947. dataTable.Clear
  7948. End If
  7949. Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
  7950. Return returnValue
  7951. End Function
  7952. <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
  7953. Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
  7954. Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
  7955. 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
  7956. Me.Adapter.SelectCommand = Me.CommandCollection(0)
  7957. If (LastName Is Nothing) Then
  7958. Me.Adapter.SelectCommand.Parameters(1).Value = Global.System.DBNull.Value
  7959. Else
  7960. Me.Adapter.SelectCommand.Parameters(1).Value = CType(LastName,String)
  7961. End If
  7962. If (FirstName Is Nothing) Then
  7963. Me.Adapter.SelectCommand.Parameters(2).Value = Global.System.DBNull.Value
  7964. Else
  7965. Me.Adapter.SelectCommand.Parameters(2).Value = CType(FirstName,String)
  7966. End If
  7967. If (HireDate.HasValue = true) Then
  7968. Me.Adapter.SelectCommand.