📄 babar.vb
字号:
Private Sub InitClass()
Me.columnpatcode = New DataColumn("patcode", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnpatcode)
Me.columnpatname = New DataColumn("patname", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnpatname)
Me.columnphycode = New DataColumn("phycode", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnphycode)
Me.columnexamstat = New DataColumn("examstat", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnexamstat)
Me.columnexamtype = New DataColumn("examtype", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnexamtype)
Me.columndisease = New DataColumn("disease", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columndisease)
Me.columnexamdate = New DataColumn("examdate", GetType(System.DateTime), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnexamdate)
Me.columnresultfindings = New DataColumn("resultfindings", GetType(System.String), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnresultfindings)
Me.columnexamfee = New DataColumn("examfee", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
Me.Columns.Add(Me.columnexamfee)
End Sub
Public Function NewFindingsRow() As FindingsRow
Return CType(Me.NewRow,FindingsRow)
End Function
Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
Return New FindingsRow(builder)
End Function
Protected Overrides Function GetRowType() As System.Type
Return GetType(FindingsRow)
End Function
Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanged(e)
If (Not (Me.FindingsRowChangedEvent) Is Nothing) Then
RaiseEvent FindingsRowChanged(Me, New FindingsRowChangeEvent(CType(e.Row,FindingsRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowChanging(e)
If (Not (Me.FindingsRowChangingEvent) Is Nothing) Then
RaiseEvent FindingsRowChanging(Me, New FindingsRowChangeEvent(CType(e.Row,FindingsRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleted(e)
If (Not (Me.FindingsRowDeletedEvent) Is Nothing) Then
RaiseEvent FindingsRowDeleted(Me, New FindingsRowChangeEvent(CType(e.Row,FindingsRow), e.Action))
End If
End Sub
Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
MyBase.OnRowDeleting(e)
If (Not (Me.FindingsRowDeletingEvent) Is Nothing) Then
RaiseEvent FindingsRowDeleting(Me, New FindingsRowChangeEvent(CType(e.Row,FindingsRow), e.Action))
End If
End Sub
Public Sub RemoveFindingsRow(ByVal row As FindingsRow)
Me.Rows.Remove(row)
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class FindingsRow
Inherits DataRow
Private tableFindings As FindingsDataTable
Friend Sub New(ByVal rb As DataRowBuilder)
MyBase.New(rb)
Me.tableFindings = CType(Me.Table,FindingsDataTable)
End Sub
Public Property patcode As String
Get
Try
Return CType(Me(Me.tableFindings.patcodeColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableFindings.patcodeColumn) = value
End Set
End Property
Public Property patname As String
Get
Try
Return CType(Me(Me.tableFindings.patnameColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableFindings.patnameColumn) = value
End Set
End Property
Public Property phycode As String
Get
Try
Return CType(Me(Me.tableFindings.phycodeColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableFindings.phycodeColumn) = value
End Set
End Property
Public Property examstat As String
Get
Try
Return CType(Me(Me.tableFindings.examstatColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableFindings.examstatColumn) = value
End Set
End Property
Public Property examtype As String
Get
Try
Return CType(Me(Me.tableFindings.examtypeColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableFindings.examtypeColumn) = value
End Set
End Property
Public Property disease As String
Get
Try
Return CType(Me(Me.tableFindings.diseaseColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableFindings.diseaseColumn) = value
End Set
End Property
Public Property examdate As Date
Get
Try
Return CType(Me(Me.tableFindings.examdateColumn),Date)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableFindings.examdateColumn) = value
End Set
End Property
Public Property resultfindings As String
Get
Try
Return CType(Me(Me.tableFindings.resultfindingsColumn),String)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableFindings.resultfindingsColumn) = value
End Set
End Property
Public Property examfee As Decimal
Get
Try
Return CType(Me(Me.tableFindings.examfeeColumn),Decimal)
Catch e As InvalidCastException
Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
End Try
End Get
Set
Me(Me.tableFindings.examfeeColumn) = value
End Set
End Property
Public Function IspatcodeNull() As Boolean
Return Me.IsNull(Me.tableFindings.patcodeColumn)
End Function
Public Sub SetpatcodeNull()
Me(Me.tableFindings.patcodeColumn) = System.Convert.DBNull
End Sub
Public Function IspatnameNull() As Boolean
Return Me.IsNull(Me.tableFindings.patnameColumn)
End Function
Public Sub SetpatnameNull()
Me(Me.tableFindings.patnameColumn) = System.Convert.DBNull
End Sub
Public Function IsphycodeNull() As Boolean
Return Me.IsNull(Me.tableFindings.phycodeColumn)
End Function
Public Sub SetphycodeNull()
Me(Me.tableFindings.phycodeColumn) = System.Convert.DBNull
End Sub
Public Function IsexamstatNull() As Boolean
Return Me.IsNull(Me.tableFindings.examstatColumn)
End Function
Public Sub SetexamstatNull()
Me(Me.tableFindings.examstatColumn) = System.Convert.DBNull
End Sub
Public Function IsexamtypeNull() As Boolean
Return Me.IsNull(Me.tableFindings.examtypeColumn)
End Function
Public Sub SetexamtypeNull()
Me(Me.tableFindings.examtypeColumn) = System.Convert.DBNull
End Sub
Public Function IsdiseaseNull() As Boolean
Return Me.IsNull(Me.tableFindings.diseaseColumn)
End Function
Public Sub SetdiseaseNull()
Me(Me.tableFindings.diseaseColumn) = System.Convert.DBNull
End Sub
Public Function IsexamdateNull() As Boolean
Return Me.IsNull(Me.tableFindings.examdateColumn)
End Function
Public Sub SetexamdateNull()
Me(Me.tableFindings.examdateColumn) = System.Convert.DBNull
End Sub
Public Function IsresultfindingsNull() As Boolean
Return Me.IsNull(Me.tableFindings.resultfindingsColumn)
End Function
Public Sub SetresultfindingsNull()
Me(Me.tableFindings.resultfindingsColumn) = System.Convert.DBNull
End Sub
Public Function IsexamfeeNull() As Boolean
Return Me.IsNull(Me.tableFindings.examfeeColumn)
End Function
Public Sub SetexamfeeNull()
Me(Me.tableFindings.examfeeColumn) = System.Convert.DBNull
End Sub
End Class
<System.Diagnostics.DebuggerStepThrough()> _
Public Class FindingsRowChangeEvent
Inherits EventArgs
Private eventRow As FindingsRow
Private eventAction As DataRowAction
Public Sub New(ByVal row As FindingsRow, ByVal action As DataRowAction)
MyBase.New
Me.eventRow = row
Me.eventAction = action
End Sub
Public ReadOnly Property Row As FindingsRow
Get
Return Me.eventRow
End Get
End Property
Public ReadOnly Property Action As DataRowAction
Get
Return Me.eventAction
End Get
End Property
End Class
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -