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

📄 frm_cygl.frm

📁 可运行的一个医院住院管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         BackColor       =   &H00C0C0FF&
         Height          =   300
         Left            =   6120
         Locked          =   -1  'True
         TabIndex        =   24
         Top             =   1320
         Width           =   1815
      End
      Begin VB.TextBox Text7 
         BackColor       =   &H00C0C0FF&
         Height          =   300
         Left            =   6120
         Locked          =   -1  'True
         TabIndex        =   22
         Top             =   1800
         Width           =   1815
      End
      Begin MSComCtl2.DTPicker DT2 
         Height          =   300
         Left            =   3600
         TabIndex        =   20
         Top             =   1800
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   529
         _Version        =   393216
         Format          =   30081025
         CurrentDate     =   38210
      End
      Begin VB.ComboBox Combo2 
         BackColor       =   &H00C0C0FF&
         Height          =   300
         Left            =   1080
         Locked          =   -1  'True
         TabIndex        =   18
         Top             =   1800
         Width           =   1335
      End
      Begin VB.TextBox Text6 
         BackColor       =   &H00C0C0FF&
         Height          =   300
         Left            =   1080
         Locked          =   -1  'True
         TabIndex        =   16
         Top             =   1320
         Width           =   4095
      End
      Begin VB.TextBox Text5 
         BackColor       =   &H00C0C0FF&
         Height          =   300
         Left            =   6120
         Locked          =   -1  'True
         TabIndex        =   14
         Top             =   840
         Width           =   1815
      End
      Begin VB.TextBox Text4 
         BackColor       =   &H00C0C0FF&
         Height          =   300
         Left            =   2760
         Locked          =   -1  'True
         TabIndex        =   12
         Top             =   840
         Width           =   2415
      End
      Begin VB.TextBox Text3 
         Height          =   300
         Left            =   7560
         Locked          =   -1  'True
         TabIndex        =   10
         Top             =   360
         Width           =   375
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   300
         Left            =   6120
         TabIndex        =   9
         Top             =   360
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   529
         _Version        =   393216
         Format          =   30081025
         CurrentDate     =   38210
      End
      Begin VB.ComboBox Combo1 
         BackColor       =   &H00C0C0FF&
         Height          =   300
         Left            =   4440
         Locked          =   -1  'True
         TabIndex        =   7
         Top             =   360
         Width           =   735
      End
      Begin VB.TextBox Text2 
         BackColor       =   &H00C0C0FF&
         Height          =   300
         Left            =   2760
         Locked          =   -1  'True
         TabIndex        =   5
         Top             =   360
         Width           =   1095
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00C0C0FF&
         Height          =   300
         Left            =   1080
         TabIndex        =   3
         Top             =   360
         Width           =   1095
      End
      Begin MSAdodcLib.Adodc Adodc2 
         Height          =   375
         Left            =   1920
         Top             =   2640
         Width           =   2175
         _ExtentX        =   3836
         _ExtentY        =   661
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   1
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ZYGL"
         OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=ZYGL"
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   "select * from View_cyxx1"
         Caption         =   "Adodc2"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin VB.Label Label13 
         Caption         =   "病房号"
         Height          =   255
         Index           =   1
         Left            =   240
         TabIndex        =   36
         Top             =   960
         Width           =   615
      End
      Begin VB.Label Label12 
         BackStyle       =   0  'Transparent
         Caption         =   "备注信息"
         Height          =   255
         Left            =   240
         TabIndex        =   25
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label Label11 
         BackStyle       =   0  'Transparent
         Caption         =   "收入科室"
         Height          =   255
         Left            =   5280
         TabIndex        =   23
         Top             =   1440
         Width           =   855
      End
      Begin VB.Label Label10 
         BackStyle       =   0  'Transparent
         Caption         =   "主治医生"
         Height          =   255
         Left            =   5280
         TabIndex        =   21
         Top             =   1920
         Width           =   855
      End
      Begin VB.Label Label9 
         BackStyle       =   0  'Transparent
         Caption         =   "出院时间"
         Height          =   255
         Left            =   2640
         TabIndex        =   19
         Top             =   1920
         Width           =   975
      End
      Begin VB.Label Label8 
         BackStyle       =   0  'Transparent
         Caption         =   "付款方式"
         Height          =   255
         Left            =   240
         TabIndex        =   17
         Top             =   1920
         Width           =   855
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "主要诊断"
         Height          =   375
         Left            =   240
         TabIndex        =   15
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "电话"
         Height          =   255
         Left            =   5280
         TabIndex        =   13
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "联系地址"
         Height          =   255
         Left            =   1920
         TabIndex        =   11
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label4 
         BackStyle       =   0  'Transparent
         Caption         =   "出生日期"
         Height          =   255
         Left            =   5280
         TabIndex        =   8
         Top             =   480
         Width           =   855
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "性别"
         Height          =   255
         Left            =   3960
         TabIndex        =   6
         Top             =   480
         Width           =   495
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "姓名"
         Height          =   255
         Left            =   2280
         TabIndex        =   4
         Top             =   480
         Width           =   495
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "住院号"
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   480
         Width           =   735
      End
   End
   Begin VB.TextBox Text10 
      Height          =   270
      Left            =   2040
      TabIndex        =   34
      Text            =   "Text10"
      Top             =   4680
      Width           =   1095
   End
   Begin VB.Label Label13 
      BackStyle       =   0  'Transparent
      Caption         =   "出院日期"
      Height          =   255
      Index           =   0
      Left            =   2760
      TabIndex        =   32
      Top             =   5880
      Width           =   855
   End
End
Attribute VB_Name = "frm_cygl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_edit_Click()
If Text1.Text = "" Then
MsgBox "请输入住院号进行查询所要修改病人的住院信息", 64, "医院住院管理系统"
Else
    If Not IsNumeric(Text1.Text) Then
    MsgBox "输入必须为数字"
    Text1.Text = ""
    Text1.SetFocus
    Else
    Text1.Locked = False
    Adodc1.RecordSource = "select * from Table_zyxx where 住院号='" + Text1.Text + "' and 是否出院=1"
    Adodc1.Refresh
    If Adodc1.Recordset.RecordCount > 0 Then
    Text1.Text = Adodc1.Recordset.Fields("住院号")
    Text2.Text = Adodc1.Recordset.Fields("性别")
    Combo1.Text = Adodc1.Recordset.Fields("性别")
    Combo2.Text = Adodc1.Recordset.Fields("付款方式")
    Text3.Text = Adodc1.Recordset.Fields("年龄")
    Text4.Text = Adodc1.Recordset.Fields("联系地址")
    DTPicker1.Value = Adodc1.Recordset.Fields("出生日期")
    Text5.Text = Adodc1.Recordset.Fields("联系电话")
    Text6.Text = Adodc1.Recordset.Fields("主要诊断")
    Combo3.Text = Adodc1.Recordset.Fields("收入科室")
    DT2.Value = Adodc1.Recordset.Fields("入院时间")
    Text7.Text = Adodc1.Recordset.Fields("主治医师")
    Text8.Text = Adodc1.Recordset.Fields("备注")
    Cmd_save.Enabled = True
    Cmd_edit.Enabled = False
    Else
    MsgBox "没有此信息", 64, "医院住院管理系统"
    End If
    End If
End If

End Sub

Private Sub Cmd_save_Click()
Call main
If Text1.Text = "" Then
MsgBox "出院号不能为空", 64, "医院住院管理系统"
Else
  If Cmd_edit.Enabled = True Then
  Adodc1.RecordSource = "select * from Table_zyxx where 是否结账=1 and 住院号='" + Text1.Text + "'"
  Adodc1.Refresh
     If Adodc1.Recordset.RecordCount > 0 Then
     Check1.Value = 1
     Text9.Text = DT3.Value
     Set adoRs = adoCon.Execute("UPDATE Table_bfxx SET 是否使用= 0 where 病房号='" + Text11.Text + "'")
     Set adoRs = adoCon.Execute("UPDATE Table_zyxx SET 是否出院= 1,出院时间='" + Text9.Text + "' where 住院号='" + Text1.Text + "'")
     MsgBox "数据保存成功!!", 32, "医院住院管理系统"
     Adodc2.Refresh
     Cmd_save.Enabled = False
     Else
     MsgBox "此病人还没有结账,不能出院"
     End If
  ElseIf Cmd_edit.Enabled = False Then
  Check1.Value = 1
  Set adoRs = adoCon.Execute("UPDATE Table_zyxx SET 出院时间='" + Str(DT3.Value) + "' where 住院号='" + Text1.Text + "'")
  'Set adoRs = adoCon.Execute("insert into Table_zyxx values(" & Text1 & ",'" & Text10 & "','" & Text2 & "','" & Combo1 & "','" & DTPicker1 & "','" & Text3 & "','" & Text4 & "','" & Text5 & "','" & Text6 & "','" & Combo2 & "','" & DT2 & "','" & Text7 & "','" & Combo3 & "','" & Check1 & "','" & Text11 & "','" & Text9 & "','" & Text8 & "')")
  MsgBox "数据修改成功!!", 64, "医院住院管理系统"
  Adodc1.Refresh
   Cmd_edit.Enabled = True
   Cmd_save.Enabled = False
  Else
  End If
End If
adoCon.Close
End Sub

Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
DTPicker2.SetFocus
Else
End If
End Sub

Private Sub Combo3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo2.SetFocus
Else
End If
End Sub

Private Sub DTPicker2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text7.SetFocus
Else
End If
End Sub

Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
'    If Not IsNumeric(Text1.Text) Then
'    MsgBox "输入必须为数字"
'    Text1.Text = ""
'    Text1.SetFocus
'    Else
   DT3.Value = Date
    Cmd_save.Enabled = True
    frm_cyxx_temp.Show
    frm_cyxx_temp.DataGrid1.SetFocus
'    End If
 Else
End If
End Sub

Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo3.SetFocus
Else
End If
End Sub

Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text8.SetFocus
Else
End If
End Sub

⌨️ 快捷键说明

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