⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_add_doctor.frm

📁 国外的医院管理系统。基于水晶报表。Crystal Hospital Management System
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      BackStyle       =   0  'Transparent
      Caption         =   "Doctor Name"
      Height          =   495
      Left            =   360
      TabIndex        =   17
      Top             =   840
      Width           =   1695
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "Address"
      Height          =   495
      Left            =   360
      TabIndex        =   16
      Top             =   1440
      Width           =   1695
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "Telephone"
      Height          =   495
      Left            =   360
      TabIndex        =   15
      Top             =   2040
      Width           =   1695
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "Date Of Birth"
      Height          =   495
      Left            =   360
      TabIndex        =   14
      Top             =   2640
      Width           =   1695
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "Speciality"
      Height          =   495
      Left            =   360
      TabIndex        =   13
      Top             =   3840
      Width           =   1695
   End
   Begin VB.Label Label7 
      BackStyle       =   0  'Transparent
      Caption         =   "Sex"
      Height          =   495
      Left            =   360
      TabIndex        =   12
      Top             =   3240
      Width           =   1695
   End
   Begin VB.Label Label8 
      BackStyle       =   0  'Transparent
      Caption         =   "Insurance Coperation"
      Height          =   495
      Left            =   360
      TabIndex        =   11
      Top             =   4440
      Width           =   1935
   End
   Begin VB.Label Label9 
      BackStyle       =   0  'Transparent
      Caption         =   "Insurance Number"
      Height          =   495
      Left            =   360
      TabIndex        =   10
      Top             =   5040
      Width           =   1695
   End
   Begin VB.Label Label10 
      BackStyle       =   0  'Transparent
      Caption         =   "Status"
      Height          =   495
      Left            =   360
      TabIndex        =   9
      Top             =   5640
      Width           =   1695
   End
End
Attribute VB_Name = "frm_add_doctor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "RVB_UniqueId" ,"3CBB305903D6"
Private strsex As String
Private ddate As Date


Private Sub cmd_doc_delete_Click()

If txt_docid = "" Then
MsgBox "There Is No Current Record", vbInformation
Else
res = MsgBox("Do You Want To Delete The Current Record ? ", vbCritical + vbYesNo, "Data Deletion")
If res = vbYes Then
con.Execute ("delete from doctor_detail where doc_id='" & txt_docid & "'")
Call clear
ElseIf res = vbNo Then
MsgBox "Deletion Cancled", vbInformation
End If
End If

End Sub

Private Sub cmd_doc_modify_Click()
txt_docid.Enabled = False

If txt_docid = "" Then
MsgBox "There Is No Current Record", vbInformation
Else
res = MsgBox("Do You Want To Modify The Current Record ? ", vbCritical + vbYesNo, "Data Modification")
If res = vbYes Then

con.Execute ("delete from doctor_detail where doc_id='" & txt_docid & "'")
con.Execute ("Insert into doctor_detail values('" & txt_docid & "','" & txt_doc_name & "','" & txt_doc_address & "','" & txt_Telephone & "','" & txt_mobile & "','" & DTPicker1.Value & "','" & strsex & "','" & cmb_doc_spec & "','" & txt_doc_insurecorp & "','" & txt_doc_insurno & "','" & cmb_status & "')")

Call clear
ElseIf res = vbNo Then
MsgBox "Modifcation Cancled", vbInformation
End If
End If
End Sub

Private Sub cmd_doc_refresh_Click()
rsDocs.Close
rsDocs.Open "select * from doctor_detail where doc_id='" & txt_docid & "' ", con, adOpenDynamic, adLockOptimistic

If rsDocs.RecordCount = 0 Then
MsgBox "No Current Records To Refresh", vbInformation, "Alert"

ElseIf rsDocs.RecordCount > 0 Then
With rsDocs
.Requery
.MoveFirst
End With
End If
End Sub

'##ModelId=3CBB305A0003
Private Sub cmd_doc_save_Click()
cmd_doc_save.Enabled = False
cmd_add_doctor.Enabled = True

Dim sex As String

If Option1(0).Value = True Then
strsex = "male"
Else
strsex = "female"
End If

con.Execute ("Insert into doctor_detail values('" & txt_docid & "','" & txt_doc_name & "','" & txt_doc_address & "','" & txt_Telephone & "','" & txt_mobile & "','" & DTPicker1.Value & "','" & strsex & "','" & cmb_doc_spec & "','" & txt_doc_insurecorp & "','" & txt_doc_insurno & "','" & cmb_status & "')")

Call clear
End Sub

Private Sub cmd_doc_search_Click()
rsDocs.Close
rsDocs.Open "select * from doctor_detail  ", con, adOpenDynamic, adLockOptimistic

txt_docid.Enabled = False

str_search_number = InputBox("Enter The Doctor ID ", "Data Search")
If rsDocs.RecordCount = 0 Then
MsgBox "No Current Records To Display", vbInformation, "Alert"
ElseIf rsDocs.RecordCount > 0 Then

rsDocs.MoveFirst
While Not rsDocs.EOF
If rsDocs.Fields(0) = str_search_number Then
MsgBox "Record Found"
Call recassign
End If
rsDocs.MoveNext
Wend
txt_docid.Enabled = False
End If
End Sub

'##ModelId=3CBB305A000C
Private Sub cmd_doc_viewall_Click()
frm_doctor_view.Show
End Sub

'##ModelId=3CBB305A000D
Private Sub Form_Load()

Set con = New ADODB.Connection
Set docs = New ADODB.Recordset
Set rs1 = New ADODB.Recordset

Dim dep

cmd_add_doctor.Enabled = True
cmd_doc_save.Enabled = False
con.CursorLocation = adUseClient
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\pay\Pay.mdb;persist security info=false"

rsDocs.Open "select * from doctor_detail  ", con, adOpenDynamic, adLockOptimistic
rs1.Open "select * from Doctor_special", con, adOpenDynamic, adLockOptimistic

rs1.MoveFirst
While rs1.EOF = False
cmb_doc_spec.AddItem rs1(1)
rs1.MoveNext
Wend
ddate = DTPicker1.Value
Call clear
End Sub
'##ModelId=3CBB305903E0
Private Sub cmd_add_doctor_Click()
cmd_doc_save.Enabled = True
cmd_add_doctor.Enabled = False
txt_doc_name.Enabled = True
txt_docid.Enabled = True
Call clear
End Sub

'##ModelId=3CBB305A0002
Private Sub cmd_doc_back_Click()
Unload Me
frm_employee.Show
End Sub
Public Sub clear()
 With frm_add_doctor
    .txt_doc_address.Text = ""
    .txt_doc_insurecorp.Text = ""
    .txt_doc_insurno.Text = ""
    .txt_doc_name.Text = ""
    .txt_docid.Text = ""
    .txt_mobile.Text = ""
    .txt_Telephone.Text = ""
    .cmb_doc_spec.Text = ""
    .cmb_status.Text = ""
    .DTPicker1.Value = ddate
   End With
End Sub

Public Sub recassign()
With frm_add_doctor
.txt_docid.Text = rsDocs.Fields(0)
.txt_doc_name.Text = rsDocs.Fields(1)
.txt_doc_address.Text = rsDocs.Fields(2)
.txt_Telephone.Text = rsDocs.Fields(3)
.txt_mobile.Text = rsDocs.Fields(4)
.DTPicker1.Value = rsDocs.Fields(5)
.cmb_doc_spec.Text = rsDocs.Fields(7)
.txt_doc_insurecorp.Text = rsDocs(8)
.txt_doc_insurno.Text = rsDocs.Fields(9)
.cmb_status.Text = rsDocs.Fields(10)

If rsDocs.Fields(6) = "male" Then
Option1(0).Value = True
Option1(1).Value = False
ElseIf rsDocs.Fields(6) = "female" Then
Option1(0).Value = False
Option1(1).Value = True
End If
End With
End Sub

Private Sub Form_Unload(Cancel As Integer)
rsDocs.Open
rsDocs.Close
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -