Student information system
Upcoming SlideShare
Loading in...5
×
 

Student information system

on

  • 506 views

Saint...

Saint...

Statistics

Views

Total Views
506
Views on SlideShare
505
Embed Views
1

Actions

Likes
0
Downloads
18
Comments
0

1 Embed 1

http://www.slashdocs.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Student information system Student information system Document Transcript

    • Student Information SystemImports SystemImports System.DataImports System.Runtime.SerializationImports System.Xml<Serializable(), _System.ComponentModel.DesignerCategoryAttribute("code"), _System.Diagnostics.DebuggerStepThrough(), _System.ComponentModel.ToolboxItem(true)> _Public Class DataSet1 Inherits DataSet Private tableDEPARTINGFLIGHTS As DEPARTINGFLIGHTSDataTable Public Sub New() MyBase.New Me.InitClass DimschemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler =AddressOf Me.SchemaChanged AddHandler Me.Tables.CollectionChanged, schemaChangedHandler AddHandler Me.Relations.CollectionChanged, schemaChangedHandler End Sub Protected Sub New(ByVal info As SerializationInfo, ByValcontext As StreamingContext) MyBase.New DimstrSchema As String = CType(info.GetValue("XmlSchema", GetType(System.String)),String) If (Not (strSchema) Is Nothing) Then Dim ds As DataSet = New DataSetds.ReadXmlSchema(New XmlTextReader(New System.IO.StringReader(strSchema))) If (Not (ds.Tables("DEPARTINGFLIGHTS")) Is Nothing) Then
    • Me.Tables.Add(New DEPARTINGFLIGHTSDataTable(ds.Tables("DEPARTINGFLIGHTS"))) End If Me.DataSetName = ds.DataSetName Me.Prefix = ds.Prefix Me.Namespace = ds.Namespace Me.Locale = ds.Locale Me.CaseSensitive = ds.CaseSensitive Me.EnforceConstraints = ds.EnforceConstraints Me.Merge(ds, false, System.Data.MissingSchemaAction.Add) Me.InitVars Else Me.InitClass End If Me.GetSerializationData(info, context) DimschemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler =AddressOf Me.SchemaChanged AddHandler Me.Tables.CollectionChanged, schemaChangedHandler AddHandler Me.Relations.CollectionChanged, schemaChangedHandler End Sub <System.ComponentModel.Browsable(false), _System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)> _ Public ReadOnly Property DEPARTINGFLIGHTS As DEPARTINGFLIGHTSDataTable Get Return Me.tableDEPARTINGFLIGHTS End Get End Property Public Overrides Function Clone() As DataSet Dim cln As DataSet1 = CType(MyBase.Clone,DataSet1) cln.InitVars Return cln End Function
    • Protected Overrides Function ShouldSerializeTables() As Boolean Return false End Function Protected Overrides Function ShouldSerializeRelations() As Boolean Return false End Function Protected Overrides Sub ReadXmlSerializable(ByVal reader As XmlReader) Me.Reset Dim ds As DataSet = New DataSet ds.ReadXml(reader) If (Not (ds.Tables("DEPARTINGFLIGHTS")) Is Nothing) ThenMe.Tables.Add(New DEPARTINGFLIGHTSDataTable(ds.Tables("DEPARTINGFLIGHTS"))) End If Me.DataSetName = ds.DataSetName Me.Prefix = ds.Prefix Me.Namespace = ds.Namespace Me.Locale = ds.Locale Me.CaseSensitive = ds.CaseSensitive Me.EnforceConstraints = ds.EnforceConstraints Me.Merge(ds, false, System.Data.MissingSchemaAction.Add) Me.InitVars End Sub Protected Overrides Function GetSchemaSerializable() As System.Xml.Schema.XmlSchema Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream Me.WriteXmlSchema(New XmlTextWriter(stream, Nothing)) stream.Position = 0 Return System.Xml.Schema.XmlSchema.Read(New XmlTextReader(stream), Nothing) End Function Friend Sub InitVars()
    • Me.tableDEPARTINGFLIGHTS = CType(Me.Tables("DEPARTINGFLIGHTS"),DEPARTINGFLIGHTSDataTable) If (Not (Me.tableDEPARTINGFLIGHTS) Is Nothing) Then Me.tableDEPARTINGFLIGHTS.InitVars End If End Sub Private Sub InitClass() Me.DataSetName = "DataSet1" Me.Prefix = "" Me.Namespace = "http://www.tempuri.org/DataSet1.xsd" Me.Locale = New System.Globalization.CultureInfo("en-US") Me.CaseSensitive = false Me.EnforceConstraints = true Me.tableDEPARTINGFLIGHTS = New DEPARTINGFLIGHTSDataTable Me.Tables.Add(Me.tableDEPARTINGFLIGHTS) End Sub Private Function ShouldSerializeDEPARTINGFLIGHTS() As Boolean Return false End Function Private Sub SchemaChanged(ByVal sender As Object, ByVale As System.ComponentModel.CollectionChangeEventArgs) If (e.Action = System.ComponentModel.CollectionChangeAction.Remove) Then Me.InitVars End If End Sub Public Delegate Sub DEPARTINGFLIGHTSRowChangeEventHandler(ByValsender As Object, ByVal e As DEPARTINGFLIGHTSRowChangeEvent) <System.Diagnostics.DebuggerStepThrough()> _ Public Class DEPARTINGFLIGHTSDataTable Inherits DataTable Implements System.Collections.IEnumerable
    • Private columnFLIGHTNO As DataColumn Private columnORIGIN As DataColumn Private columnDEPTIME As DataColumn Private columnDESTINATION As DataColumn Private columnARRTIME As DataColumn Private columnVIA As DataColumn Private columnDAYS As DataColumn Friend Sub New() MyBase.New("DEPARTINGFLIGHTS") Me.InitClass End Sub Friend Sub New(ByVal table As DataTable) MyBase.New(table.TableName)If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then Me.CaseSensitive = table.CaseSensitive End IfIf (table.Locale.ToString <> table.DataSet.Locale.ToString) Then Me.Locale = table.Locale End If If (table.Namespace <> table.DataSet.Namespace) Then Me.Namespace = table.Namespace End If Me.Prefix = table.Prefix Me.MinimumCapacity = table.MinimumCapacity Me.DisplayExpression = table.DisplayExpression End Sub <System.ComponentModel.Browsable(false)> _
    • Public ReadOnly Property Count As Integer Get Return Me.Rows.Count End GetEnd PropertyFriend ReadOnly Property FLIGHTNOColumn As DataColumn Get Return Me.columnFLIGHTNO End GetEnd PropertyFriend ReadOnly Property ORIGINColumn As DataColumn Get Return Me.columnORIGIN End GetEnd PropertyFriend ReadOnly Property DEPTIMEColumn As DataColumn Get Return Me.columnDEPTIME End GetEnd PropertyFriend ReadOnly Property DESTINATIONColumn As DataColumn Get Return Me.columnDESTINATION End GetEnd PropertyFriend ReadOnly Property ARRTIMEColumn As DataColumn Get Return Me.columnARRTIME End GetEnd PropertyFriend ReadOnly Property VIAColumn As DataColumn Get
    • Return Me.columnVIA End Get End Property Friend ReadOnly Property DAYSColumn As DataColumn Get Return Me.columnDAYS End Get End Property Public Default ReadOnly Property Item(ByValindex As Integer) As DEPARTINGFLIGHTSRow Get Return CType(Me.Rows(index),DEPARTINGFLIGHTSRow) End Get End Property Public EventDEPARTINGFLIGHTSRowChanged As DEPARTINGFLIGHTSRowChangeEventHandler Public EventDEPARTINGFLIGHTSRowChanging As DEPARTINGFLIGHTSRowChangeEventHandler Public EventDEPARTINGFLIGHTSRowDeleted As DEPARTINGFLIGHTSRowChangeEventHandler Public EventDEPARTINGFLIGHTSRowDeleting As DEPARTINGFLIGHTSRowChangeEventHandler Public Overloads Sub AddDEPARTINGFLIGHTSRow(ByValrow As DEPARTINGFLIGHTSRow) Me.Rows.Add(row) End Sub Public Overloads Function AddDEPARTINGFLIGHTSRow(ByValFLIGHTNO As String, ByVal ORIGIN As String, ByVal DEPTIME As String, ByValDESTINATION As String, ByVal ARRTIME As String, ByVal VIA As String, ByValDAYS As String) As DEPARTINGFLIGHTSRow
    • DimrowDEPARTINGFLIGHTSRow As DEPARTINGFLIGHTSRow = CType(Me.NewRow,DEPARTINGFLIGHTSRow)rowDEPARTINGFLIGHTSRow.ItemArray = New Object() {FLIGHTNO, ORIGIN, DEPTIME, DESTINATION, ARRTIME, VIA, DAYS} Me.Rows.Add(rowDEPARTINGFLIGHTSRow) Return rowDEPARTINGFLIGHTSRow End Function Public Function GetEnumerator() As System.Collections.IEnumeratorImplements System.Collections.IEnumerable.GetEnumerator Return Me.Rows.GetEnumerator End Function Public Overrides Function Clone() As DataTable Dimcln As DEPARTINGFLIGHTSDataTable = CType(MyBase.Clone,DEPARTINGFLIGHTSDataTable) cln.InitVars Return cln End Function Protected Overrides Function CreateInstance() As DataTable Return New DEPARTINGFLIGHTSDataTable End Function Friend Sub InitVars() Me.columnFLIGHTNO = Me.Columns("FLIGHTNO") Me.columnORIGIN = Me.Columns("ORIGIN") Me.columnDEPTIME = Me.Columns("DEPTIME") Me.columnDESTINATION = Me.Columns("DESTINATION") Me.columnARRTIME = Me.Columns("ARRTIME") Me.columnVIA = Me.Columns("VIA") Me.columnDAYS = Me.Columns("DAYS") End Sub Private Sub InitClass()
    • Me.columnFLIGHTNO = New DataColumn("FLIGHTNO", GetType(System.String), Nothing, System.Data.MappingType.Element) Me.Columns.Add(Me.columnFLIGHTNO)Me.columnORIGIN = New DataColumn("ORIGIN", GetType(System.String), Nothing, System.Data.MappingType.Element) Me.Columns.Add(Me.columnORIGIN)Me.columnDEPTIME = New DataColumn("DEPTIME", GetType(System.String), Nothing,System.Data.MappingType.Element) Me.Columns.Add(Me.columnDEPTIME)Me.columnDESTINATION = New DataColumn("DESTINATION", GetType(System.String),Nothing, System.Data.MappingType.Element) Me.Columns.Add(Me.columnDESTINATION)Me.columnARRTIME = New DataColumn("ARRTIME", GetType(System.String), Nothing,System.Data.MappingType.Element) Me.Columns.Add(Me.columnARRTIME)Me.columnVIA = New DataColumn("VIA", GetType(System.String), Nothing, System.Data.MappingType.Element) Me.Columns.Add(Me.columnVIA)Me.columnDAYS = New DataColumn("DAYS", GetType(System.String), Nothing, System.Data.MappingType.Element) Me.Columns.Add(Me.columnDAYS) End Sub Public Function NewDEPARTINGFLIGHTSRow() As DEPARTINGFLIGHTSRow Return CType(Me.NewRow,DEPARTINGFLIGHTSRow) End Function Protected Overrides Function NewRowFromBuilder(ByValbuilder As DataRowBuilder) As DataRow Return New DEPARTINGFLIGHTSRow(builder) End Function
    • Protected Overrides Function GetRowType() As System.Type Return GetType(DEPARTINGFLIGHTSRow) End Function Protected Overrides Sub OnRowChanged(ByVale As DataRowChangeEventArgs) MyBase.OnRowChanged(e) If (Not (Me.DEPARTINGFLIGHTSRowChangedEvent) Is Nothing) Then RaiseEventDEPARTINGFLIGHTSRowChanged(Me, New DEPARTINGFLIGHTSRowChangeEvent(CType(e.Row,DEPARTINGFLIGHTSRow), e.Action)) End If End Sub Protected Overrides Sub OnRowChanging(ByVale As DataRowChangeEventArgs) MyBase.OnRowChanging(e) If (Not (Me.DEPARTINGFLIGHTSRowChangingEvent) Is Nothing) Then RaiseEventDEPARTINGFLIGHTSRowChanging(Me, New DEPARTINGFLIGHTSRowChangeEvent(CType(e.Row,DEPARTINGFLIGHTSRow), e.Action)) End If End Sub Protected Overrides Sub OnRowDeleted(ByVale As DataRowChangeEventArgs) MyBase.OnRowDeleted(e) If (Not (Me.DEPARTINGFLIGHTSRowDeletedEvent) Is Nothing) Then RaiseEventDEPARTINGFLIGHTSRowDeleted(Me, New DEPARTINGFLIGHTSRowChangeEvent(CType(e.Row,DEPARTINGFLIGHTSRow), e.Action)) End If End Sub Protected Overrides Sub OnRowDeleting(ByVale As DataRowChangeEventArgs) MyBase.OnRowDeleting(e)
    • If (Not (Me.DEPARTINGFLIGHTSRowDeletingEvent) Is Nothing) Then RaiseEventDEPARTINGFLIGHTSRowDeleting(Me, New DEPARTINGFLIGHTSRowChangeEvent(CType(e.Row,DEPARTINGFLIGHTSRow), e.Action)) End If End Sub Public Sub RemoveDEPARTINGFLIGHTSRow(ByValrow As DEPARTINGFLIGHTSRow) Me.Rows.Remove(row) End Sub End Class <System.Diagnostics.DebuggerStepThrough()> _ Public Class DEPARTINGFLIGHTSRow Inherits DataRow Private tableDEPARTINGFLIGHTS As DEPARTINGFLIGHTSDataTable Friend Sub New(ByVal rb As DataRowBuilder) MyBase.New(rb)Me.tableDEPARTINGFLIGHTS = CType(Me.Table,DEPARTINGFLIGHTSDataTable) End Sub Public Property FLIGHTNO As String Get Try Return CType(Me(Me.tableDEPARTINGFLIGHTS.FLIGHTNOColumn),String) Catch e As InvalidCastException Throw New StrongTypingException("Cannot get value becauseit is DBNull.", e) End Try End Get Set Me(Me.tableDEPARTINGFLIGHTS.FLIGHTNOColumn) = value End Set
    • End Property Public Property ORIGIN As String Get Try Return CType(Me(Me.tableDEPARTINGFLIGHTS.ORIGINColumn),String) Catch e As InvalidCastException Throw New StrongTypingException("Cannot get value becauseit is DBNull.", e) End Try End Get Set Me(Me.tableDEPARTINGFLIGHTS.ORIGINColumn) = value End Set End Property Public Property DEPTIME As String Get Try Return CType(Me(Me.tableDEPARTINGFLIGHTS.DEPTIMEColumn),String) Catch e As InvalidCastException Throw New StrongTypingException("Cannot get value becauseit is DBNull.", e) End Try End Get Set Me(Me.tableDEPARTINGFLIGHTS.DEPTIMEColumn) = value End Set End Property Public Property DESTINATION As String Get Try Return CType(Me(Me.tableDEPARTINGFLIGHTS.DESTINATIONColumn),String) Catch e As InvalidCastException
    • Throw New StrongTypingException("Cannot get value becauseit is DBNull.", e) End Try End Get Set Me(Me.tableDEPARTINGFLIGHTS.DESTINATIONColumn) = value End Set End Property Public Property ARRTIME As String Get Try Return CType(Me(Me.tableDEPARTINGFLIGHTS.ARRTIMEColumn),String) Catch e As InvalidCastException Throw New StrongTypingException("Cannot get value becauseit is DBNull.", e) End Try End Get Set Me(Me.tableDEPARTINGFLIGHTS.ARRTIMEColumn) = value End Set End Property Public Property VIA As String Get Try Return CType(Me(Me.tableDEPARTINGFLIGHTS.VIAColumn),String) Catch e As InvalidCastException Throw New StrongTypingException("Cannot get value becauseit is DBNull.", e) End Try End Get Set Me(Me.tableDEPARTINGFLIGHTS.VIAColumn) = value End Set End Property
    • Public Property DAYS As String Get Try Return CType(Me(Me.tableDEPARTINGFLIGHTS.DAYSColumn),String) Catch e As InvalidCastException Throw New StrongTypingException("Cannot get value becauseit is DBNull.", e) End Try End Get Set Me(Me.tableDEPARTINGFLIGHTS.DAYSColumn) = value End Set End Property Public Function IsFLIGHTNONull() As Boolean Return Me.IsNull(Me.tableDEPARTINGFLIGHTS.FLIGHTNOColumn) End Function Public Sub SetFLIGHTNONull()Me(Me.tableDEPARTINGFLIGHTS.FLIGHTNOColumn) = System.Convert.DBNull End Sub Public Function IsORIGINNull() As Boolean Return Me.IsNull(Me.tableDEPARTINGFLIGHTS.ORIGINColumn) End Function Public Sub SetORIGINNull() Me(Me.tableDEPARTINGFLIGHTS.ORIGINColumn) = System.Convert.DBNull End Sub Public Function IsDEPTIMENull() As Boolean Return Me.IsNull(Me.tableDEPARTINGFLIGHTS.DEPTIMEColumn) End Function Public Sub SetDEPTIMENull()
    • Me(Me.tableDEPARTINGFLIGHTS.DEPTIMEColumn) = System.Convert.DBNull End Sub Public Function IsDESTINATIONNull() As Boolean Return Me.IsNull(Me.tableDEPARTINGFLIGHTS.DESTINATIONColumn) End Function Public Sub SetDESTINATIONNull()Me(Me.tableDEPARTINGFLIGHTS.DESTINATIONColumn) = System.Convert.DBNull End Sub Public Function IsARRTIMENull() As Boolean Return Me.IsNull(Me.tableDEPARTINGFLIGHTS.ARRTIMEColumn) End Function Public Sub SetARRTIMENull()Me(Me.tableDEPARTINGFLIGHTS.ARRTIMEColumn) = System.Convert.DBNull End Sub Public Function IsVIANull() As Boolean Return Me.IsNull(Me.tableDEPARTINGFLIGHTS.VIAColumn) End Function Public Sub SetVIANull() Me(Me.tableDEPARTINGFLIGHTS.VIAColumn) = System.Convert.DBNull End Sub Public Function IsDAYSNull() As Boolean Return Me.IsNull(Me.tableDEPARTINGFLIGHTS.DAYSColumn) End Function Public Sub SetDAYSNull() Me(Me.tableDEPARTINGFLIGHTS.DAYSColumn) = System.Convert.DBNull End Sub End Class
    • <System.Diagnostics.DebuggerStepThrough()> _ Public Class DEPARTINGFLIGHTSRowChangeEvent Inherits EventArgs Private eventRow As DEPARTINGFLIGHTSRow Private eventAction As DataRowAction Public Sub New(ByVal row As DEPARTINGFLIGHTSRow, ByValaction As DataRowAction) MyBase.New Me.eventRow = row Me.eventAction = action End Sub Public ReadOnly Property Row As DEPARTINGFLIGHTSRow Get Return Me.eventRow End Get End Property Public ReadOnly Property Action As DataRowAction Get Return Me.eventAction End Get End Property End ClassEnd Class