PageRenderTime 30ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 2ms

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

#
Visual Basic | 9015 lines | 7797 code | 1047 blank | 171 comment | 13 complexity | 93897e8b697efd5e60ab1eed0f5a6537 MD5 | raw file

Large files files are truncated, but you can click here to view the full 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

Large files files are truncated, but you can click here to view the full file