📄 frmdoctorvisit.frm
字号:
Width = 1095
End
Begin VB.CommandButton cmdAdd
BackColor = &H00FFFFFF&
Caption = "&Add"
Height = 780
Left = 8640
Picture = "frmDoctorVisit.frx":7414
Style = 1 'Graphical
TabIndex = 15
Top = 1440
Width = 1095
End
Begin VB.Frame Frame3
BackColor = &H00FF8080&
Caption = "Record Navigation"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 1215
Left = 2040
TabIndex = 9
Top = 9240
Width = 7215
Begin VB.CommandButton cmdFirst
BackColor = &H00FFFFFF&
Height = 540
Left = 360
Picture = "frmDoctorVisit.frx":78C3
Style = 1 'Graphical
TabIndex = 13
Top = 360
UseMaskColor = -1 'True
Width = 585
End
Begin VB.CommandButton cmdPrevious
BackColor = &H00FFFFFF&
Height = 540
Left = 1065
Picture = "frmDoctorVisit.frx":7D99
Style = 1 'Graphical
TabIndex = 12
Top = 360
UseMaskColor = -1 'True
Width = 585
End
Begin VB.CommandButton cmdNext
BackColor = &H00FFFFFF&
Height = 540
Left = 5520
Picture = "frmDoctorVisit.frx":827A
Style = 1 'Graphical
TabIndex = 11
Top = 360
UseMaskColor = -1 'True
Width = 585
End
Begin VB.CommandButton cmdLast
BackColor = &H00FFFFFF&
Height = 540
Left = 6240
Picture = "frmDoctorVisit.frx":8755
Style = 1 'Graphical
TabIndex = 10
Top = 360
UseMaskColor = -1 'True
Width = 585
End
Begin VB.Label lblStatus
Alignment = 2 'Center
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Height = 405
Left = 1800
TabIndex = 14
Top = 480
Width = 3480
End
End
Begin VB.Frame Frame2
BackColor = &H00FF8080&
Caption = "Record Operations"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 5415
Left = 8160
TabIndex = 5
Top = 1200
Width = 2055
Begin VB.CommandButton cmdViewAll
BackColor = &H00FFFFFF&
Caption = "&View"
Height = 780
Left = 480
Picture = "frmDoctorVisit.frx":8C2A
Style = 1 'Graphical
TabIndex = 8
Top = 3600
Width = 1095
End
Begin VB.CommandButton cmdClose
BackColor = &H00FFFFFF&
Caption = "&Close"
Height = 780
Left = 480
Picture = "frmDoctorVisit.frx":90E5
Style = 1 'Graphical
TabIndex = 7
Top = 4440
Width = 1095
End
Begin VB.CommandButton cmdRefresh
BackColor = &H00FFFFFF&
Caption = "&Refresh"
Height = 780
Left = 480
Picture = "frmDoctorVisit.frx":95F1
Style = 1 'Graphical
TabIndex = 6
Top = 2760
Width = 1095
End
End
Begin MSDataGridLib.DataGrid grdDataGrid
Height = 2025
Left = 480
TabIndex = 0
Top = 6840
Width = 9960
_ExtentX = 17568
_ExtentY = 3572
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = -1 'True
Appearance = 0
Enabled = -1 'True
ColumnHeaders = -1 'True
HeadLines = 2
RowHeight = 15
TabAction = 2
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin ActiveResizeCtl.ActiveResize ActiveResize1
Left = 0
Top = 0
_ExtentX = 847
_ExtentY = 847
Resolution = 4
ScreenHeight = 1024
ScreenWidth = 1280
ScreenHeightDT = 1024
ScreenWidthDT = 1280
FormHeightDT = 11310
FormWidthDT = 11010
FormScaleHeightDT= 10800
FormScaleWidthDT= 10890
ResizeFormBackground= -1 'True
ResizePictureBoxContents= -1 'True
End
Begin VB.Label lblLabels
AutoSize = -1 'True
BackColor = &H00FF8080&
Caption = "VISIT DETAILS"
BeginProperty Font
Name = "Verdana"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 435
Index = 8
Left = 4080
TabIndex = 47
Top = 360
Width = 3015
End
End
Attribute VB_Name = "frmDoctorVisit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents adoPrimaryRS As Recordset
Attribute adoPrimaryRS.VB_VarHelpID = -1
Dim mbChangedByCode As Boolean
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
Dim IDType As Integer
Private Sub cmbAdmitID_Click()
Dim rsCheckStatus As Recordset
Dim rsAddData As Recordset
Set rsCheckStatus = New ADODB.Recordset
Set rsAddData = New ADODB.Recordset
rsCheckStatus.Open "Select * from In_Patient_Discharge where Admission_ID = '" & cmbAdmitID & "'", cnPatients, adOpenDynamic, adLockReadOnly
If rsCheckStatus.EOF = False Then
txtStatus = "Discharged"
Else
txtStatus = "Under Treatements"
End If
rsCheckStatus.Close
End Sub
Private Sub cmbPatientID_Click()
cmbAdmitID.clear
addAdmissionID cmbPatientID
If cmbAdmitID.ListCount = 0 Then
txtStatus = "Not Yet Admitted"
Else
cmbAdmitID = cmbAdmitID.List(0)
End If
End Sub
Private Sub cmdAdmission_Click()
frmDisplayAdmissionDetails.Show
End Sub
Private Sub cmdExit_Click()
Frame1.Visible = False
Frame1.Caption = ""
If IDType = 0 Then
cmbDoctorID.SetFocus
ElseIf IDType = 1 Then
cmbPatientID.SetFocus
End If
End Sub
Private Sub cmdOK_Click()
If IDType = 0 Then
cmbDoctorID = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 0)
cmbPatientID.SetFocus
End If
If IDType = 1 Then
cmbPatientID = MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, 0)
txtFields(5).SetFocus
End If
Frame1.Caption = ""
Frame1.Visible = False
End Sub
Private Sub cmdDoc_Click()
Frame1.Caption = "Doctor Details"
Frame1.Visible = True
IDType = 0
Dim RowNo As Integer
Dim rsDoctor As New Recordset
Set rsDoctor = New ADODB.Recordset
rsDoctor.Open "Select * from Doctor_Details", cnPatients, adOpenDynamic, adLockReadOnly
If rsDoctor.EOF = False Then
RowNo = 1
With MSFlexGrid1
.clear
.Rows = 1
.Cols = rsDoctor.Fields.Count
While Not rsDoctor.EOF
.Rows = .Rows + 1
'.Row = .Rows - 1
.TextMatrix(RowNo, 0) = rsDoctor(0)
.TextMatrix(RowNo, 1) = rsDoctor(1)
.TextMatrix(RowNo, 2) = rsDoctor(2)
.TextMatrix(RowNo, 3) = rsDoctor(9)
.TextMatrix(RowNo, 4) = rsDoctor(10)
RowNo = RowNo + 1
rsDoctor.MoveNext
Wend
.TextMatrix(0, 0) = "Doctor ID"
.TextMatrix(0, 1) = "First Name"
.TextMatrix(0, 2) = "Last Name"
.TextMatrix(0, 3) = "Specialization"
.TextMatrix(0, 4) = "Type"
.FixedRows = 1
.RowHeight(0) = .RowHeight(1) * 1.5
Functions.SizeColumns MSFlexGrid1, Me
.SetFocus
.RowSel = 1
End With
rsDoctor.Close
End If
End Sub
Private Sub cmdPatient_Click()
Frame1.Caption = "Patient Details"
Frame1.Visible = True
IDType = 1
Dim RowNo As Integer
Dim rsPatient As New Recordset
Set rsPatient = New ADODB.Recordset
'create sql statement
'Set rsDocs.ActiveConnection = cnPatients
rsPatient.Open "Select * from In_Patient_Details", cnPatients, adOpenDynamic, adLockReadOnly
If rsPatient.EOF = False Then
RowNo = 1
With MSFlexGrid1
.clear
.Rows = 1
.Cols = rsPatient.Fields.Count
While Not rsPatient.EOF
.Rows = .Rows + 1
'.Row = .Rows - 1
If Not rsPatient(0) = "" Then
.TextMatrix(RowNo, 0) = rsPatient(0)
End If
If Not rsPatient(1) = "" Then
.TextMatrix(RowNo, 1) = rsPatient(1)
End If
If Not rsPatient(2) = "" Then
.TextMatrix(RowNo, 2) = rsPatient(2)
End If
If Not rsPatient(4) = "" Then
.TextMatrix(RowNo, 3) = rsPatient(4)
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -