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

📄 frm_xkcfd.frm

📁 可运行的一个医院住院管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         DataField       =   "处方医嘱"
         Caption         =   "处方医嘱"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column01 
            Object.Visible         =   0   'False
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column06 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column07 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column08 
            ColumnWidth     =   2085.166
         EndProperty
         BeginProperty Column09 
            ColumnWidth     =   2085.166
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Command1 
      Caption         =   "录入"
      Height          =   350
      Left            =   1800
      TabIndex        =   9
      Top             =   4030
      Width           =   975
   End
   Begin VB.Frame Frame1 
      Caption         =   "单项药物处方录入"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C000C0&
      Height          =   1575
      Left            =   50
      TabIndex        =   0
      Top             =   720
      Width           =   4935
      Begin VB.TextBox Text9 
         Height          =   300
         Left            =   3840
         TabIndex        =   22
         Top             =   1080
         Width           =   495
      End
      Begin VB.TextBox Text8 
         Height          =   300
         Left            =   1080
         TabIndex        =   20
         Top             =   720
         Width           =   1815
      End
      Begin VB.ComboBox Combo2 
         Height          =   300
         ItemData        =   "frm_xkcfd.frx":0015
         Left            =   1080
         List            =   "frm_xkcfd.frx":001F
         TabIndex        =   11
         Top             =   1080
         Width           =   1815
      End
      Begin VB.TextBox Text5 
         Height          =   300
         Left            =   3840
         TabIndex        =   8
         Top             =   720
         Width           =   495
      End
      Begin VB.TextBox Text4 
         Height          =   300
         Left            =   3840
         TabIndex        =   4
         Text            =   "1"
         Top             =   360
         Width           =   495
      End
      Begin VB.TextBox Text3 
         Height          =   300
         Left            =   2880
         TabIndex        =   3
         Top             =   360
         Width           =   615
      End
      Begin VB.TextBox Text2 
         Height          =   300
         Left            =   1080
         TabIndex        =   2
         Top             =   360
         Width           =   1815
      End
      Begin VB.Label Label8 
         Caption         =   "总金额"
         Height          =   255
         Left            =   3000
         TabIndex        =   21
         Top             =   1200
         Width           =   735
      End
      Begin VB.Label Label7 
         Caption         =   "×"
         Height          =   255
         Left            =   3600
         TabIndex        =   12
         Top             =   480
         Width           =   375
      End
      Begin VB.Label Label6 
         Caption         =   "处方医嘱"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   1200
         Width           =   855
      End
      Begin VB.Label Label5 
         Caption         =   "单价(元)"
         Height          =   255
         Left            =   2950
         TabIndex        =   7
         Top             =   840
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "用法"
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   840
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "支"
         Height          =   255
         Left            =   4440
         TabIndex        =   5
         Top             =   480
         Width           =   255
      End
      Begin VB.Label Label2 
         Caption         =   "药物"
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   480
         Width           =   855
      End
   End
End
Attribute VB_Name = "frm_xkcfd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim c
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Combo2.SetFocus
Else
End If
End Sub

Private Sub Command1_Click()     '录入按钮代码
Call main
Command1.Enabled = False
If Text7.Text = "" Then
MsgBox "挂号单号不能为空"
Else
Adodc2.RecordSource = "select * from Table_cfb_mxb where 药物名称='" + Text2.Text + "' and  处方号='" + Text6.Text + "'"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
MsgBox "此药物信息已经录入过"
Else
  Set adoRs = adoCon.Execute("insert into Table_cfb_mxb values(" & Text6 & ",'" & Text7 & "','" & Text2 & "','" & Text3 & "','" & Text4 & "','" & Label3 & "','" & Text5 & "','" & Text9 & "','" & Text8 & "','" & Combo2 & "')")
  MsgBox "数据保存成功!!", 64, "医院住院管理系统"
  Adodc2.Refresh
  Text1.SetFocus
End If
End If
adoCon.Close
End Sub

Private Sub Command2_Click()
Unload Me
frm_yxzz.Show
End Sub

Private Sub Command3_Click()
  If Adodc2.Recordset.EOF = False Then
     c = MsgBox("您确认要删除信息吗?", 17, "医院住院管理系统")
     If c = vbOK Then
     Adodc2.Recordset.Delete
     Adodc2.Refresh
     Else
     End If
  Else
  MsgBox "当前数据库中已经没有可删除的记录", 64, "医院住院管理系统"
  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 Text1.Text = "" Then
       Exit Sub
   Else
       frm_ypb.Adodc1.RecordSource = "select * from Table_ypb_xy where Pinyin like '%" + Text1.Text + "%'"
       frm_ypb.Adodc1.Refresh
            If frm_ypb.Adodc1.Recordset.RecordCount > 0 Then
                  Command1.Enabled = True
                  frm_ypb.Show
                  frm_ypb.DataGrid1.SetFocus
            Else
            End If
   End If
Else
End If
End Sub

Private Sub Text4_Change()
Text9.Text = Val(Text4.Text) * Val(Text5.Text)
End Sub

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

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

⌨️ 快捷键说明

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