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

📄 frm_sfgl.frm

📁 可运行的一个医院住院管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
   Begin VB.Frame Frame1 
      Caption         =   "除药费以外的收费列表"
      Height          =   4575
      Left            =   0
      TabIndex        =   0
      Top             =   120
      Width           =   4095
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "frm_sfgl.frx":003F
         Height          =   4095
         Left            =   120
         TabIndex        =   1
         Top             =   360
         Width           =   3855
         _ExtentX        =   6800
         _ExtentY        =   7223
         _Version        =   393216
         AllowUpdate     =   0   'False
         BackColor       =   12648384
         HeadLines       =   1
         RowHeight       =   15
         FormatLocked    =   -1  'True
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   7
         BeginProperty Column00 
            DataField       =   "id"
            Caption         =   "id"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               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            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column02 
            DataField       =   "名称"
            Caption         =   "名称"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column03 
            DataField       =   "数量"
            Caption         =   "数量"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column04 
            DataField       =   "单位"
            Caption         =   "单位"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column05 
            DataField       =   "单价"
            Caption         =   "单价"
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column06 
            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 
               Object.Visible         =   0   'False
               ColumnWidth     =   2085.166
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   2085.166
            EndProperty
            BeginProperty Column02 
               ColumnWidth     =   2085.166
            EndProperty
            BeginProperty Column03 
               ColumnWidth     =   1094.74
            EndProperty
            BeginProperty Column04 
               ColumnWidth     =   2085.166
            EndProperty
            BeginProperty Column05 
               ColumnWidth     =   2085.166
            EndProperty
            BeginProperty Column06 
               ColumnWidth     =   2085.166
            EndProperty
         EndProperty
      End
      Begin MSAdodcLib.Adodc Adodc4 
         Height          =   375
         Left            =   480
         Top             =   1920
         Width           =   2535
         _ExtentX        =   4471
         _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 Table_qtsfb"
         Caption         =   "Adodc4"
         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.TextBox Text17 
         Height          =   270
         Left            =   2160
         TabIndex        =   48
         Text            =   "Text17"
         Top             =   1440
         Width           =   975
      End
   End
End
Attribute VB_Name = "frm_sfgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim temp1

Private Sub Command1_Click()
  If Adodc4.Recordset.EOF = False Then
     c = MsgBox("您确认要删除信息吗?", 17, "医院住院管理系统")
     If c = vbOK Then
     Text15.Text = Val(Text15.Text) - Val(Adodc4.Recordset.Fields("总金额"))
     Adodc4.Recordset.Delete
     Adodc4.Refresh
     Else
     End If
  Else
  MsgBox "当前数据库中已经没有可删除的记录", 64, "医院住院管理系统"
  End If
End Sub

Private Sub Command2_Click()
Call main
If Text6.Text = "" Or Text7.Text = "" Then
MsgBox "产生费用和已交费用不能为空值", 64, "医院住院管理系统"
Else
   If Val(Text6.Text) <> Val(Text7.Text) Then
   MsgBox "输入的已交费用金额不正确", 64, "医院住院管理系统"
   Else
   Set adoRs = adoCon.Execute("UPDATE Table_zyxx SET 是否结账= 1 where 住院号='" + Text10.Text + "'")
   Set adoRs = adoCon.Execute("insert into Table_sfb values(" & Text16 & ",'" & Text2 & "','" & Combo1 & "','" & Text10 & "','" & Text13 & "','" & Text3 & "','" & Text4 & "','" & Text5 & "','" & Text12 & "','" & Text9 & "','" & Text15 & "','" & Text6 & "','" & Text7 & "','" & Text8 & "','" & DT1.Value & "')")
   MsgBox "数据保存成功!!", 48, "医院住院管理系统"
   End If
End If
adoCon.Close
End Sub

Private Sub Command3_Click()
Adodc1.RecordSource = "select * from Table_zyxx where 挂号单号='" + Text16.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Text2.Text = Adodc1.Recordset.Fields("姓名")
Combo1.Text = Adodc1.Recordset.Fields("性别")
Text10.Text = Adodc1.Recordset.Fields("住院号")
Text3.Text = Adodc1.Recordset.Fields("联系地址")
Text4.Text = Adodc1.Recordset.Fields("主要诊断")
Text5.Text = Adodc1.Recordset.Fields("付款方式")
Text8.Text = Adodc1.Recordset.Fields("入院时间")
Text13.Text = Adodc1.Recordset.Fields("收入科室")
Text9.Text = Adodc1.Recordset.Fields("主治医师")
Text1.Locked = False
Command1.Enabled = True
Command2.Enabled = True
temp1 = Text16.Text
     Adodc3.RecordSource = "select * from Table_cfb_mxb where 挂号单号='" + Text16.Text + "'"
     Adodc3.Refresh
     If Adodc3.Recordset.RecordCount > 0 Then
     Adodc3.RecordSource = "select sum(总金额) from Table_cfb_mxb where 挂号单号='" + Text16.Text + "' "
     Adodc3.Refresh
     Text12.Text = DataGrid2.Columns.Item(0).Text
     Else
     End If
Else
MsgBox "没有此人的信息", 48, "医院住院管理系统"
End If
End Sub

Private Sub DataGrid3_KeyDown(KeyCode As Integer, Shift As Integer)
Call main
  If KeyCode = 13 Then
       If Adodc2.Recordset.RecordCount > 0 Then
            Adodc4.RecordSource = "select * from Table_qtsfb order by id"
            Adodc4.Refresh
               If Adodc4.Recordset.RecordCount > 0 Then
                    Adodc4.Recordset.MoveLast
                    Text17.Text = Val(Adodc4.Recordset.Fields("id")) + 1
               Else
                    Text17.Text = 1
               End If
                   AA = Val(Adodc2.Recordset("To1LibSN")) * Val(Adodc2.Recordset.Fields("Fee"))
                   Set adoRs = adoCon.Execute("insert into Table_qtsfb values(" & Text17 & ",'" & temp1 & "','" & Adodc2.Recordset.Fields("Name") & "','" & Adodc2.Recordset.Fields("To1LibSN") & "','" & Adodc2.Recordset.Fields("Unit") & "','" & Adodc2.Recordset.Fields("Fee") & "','" & AA & "')")
                   DataGrid3.Visible = False
                   Adodc4.Refresh
       Else
             DataGrid3.Visible = False
       End If
  Else
  End If
'统计出费用总金额
Adodc5.RecordSource = "select sum(总金额) from Table_qtsfb where 挂号单号='" + temp1 + "' "
Adodc5.Refresh
Text15.Text = DataGrid4.Columns.Item(0).Text
adoCon.Close
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_Change()
   If Text1.Text = "" Then
        DataGrid3.Visible = False
   Else
        DataGrid3.Visible = True
        Command1.Enabled = True
        Adodc2.RecordSource = "select * from Table_qtsf where Pinyin like '%" + Text1.Text + "%'"
        Adodc2.Refresh
   End If
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then
         If Text1.Text = "" Then
              Exit Sub
         Else
              DataGrid3.SetFocus
         End If
    Else
    End If
End Sub

Private Sub Text11_Change()
Text7.Text = Text11.Text
End Sub

Private Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text7.Text = Text11.Text
Command2.SetFocus
Else
End If
End Sub

Private Sub Text15_Change()
Text6.Text = Val(Text12.Text) + Val(Text15.Text)
End Sub

Private Sub Text16_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Adodc1.RecordSource = "select * from Table_zyxx where 挂号单号='" + Text16.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Text2.Text = Adodc1.Recordset.Fields("姓名")
Combo1.Text = Adodc1.Recordset.Fields("性别")
Text10.Text = Adodc1.Recordset.Fields("住院号")
Text3.Text = Adodc1.Recordset.Fields("联系地址")
Text4.Text = Adodc1.Recordset.Fields("主要诊断")
Text5.Text = Adodc1.Recordset.Fields("付款方式")
Text8.Text = Adodc1.Recordset.Fields("入院时间")
Text13.Text = Adodc1.Recordset.Fields("收入科室")
Text9.Text = Adodc1.Recordset.Fields("主治医师")
Text11.Enabled = True
Text1.Locked = False
Command1.Enabled = True
Command2.Enabled = True
temp1 = Text16.Text
     Adodc3.RecordSource = "select * from Table_cfb_mxb where 挂号单号='" + Text16.Text + "'"
     Adodc3.Refresh
     If Adodc3.Recordset.RecordCount > 0 Then
     Adodc3.RecordSource = "select sum(总金额) from Table_cfb_mxb where 挂号单号='" + Text16.Text + "' "
     Adodc3.Refresh
     Text12.Text = DataGrid2.Columns.Item(0).Text
     Else
     End If
Else
MsgBox "没有此人的信息", 48, "医院住院管理系统"
End If
Else
End If
End Sub

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

⌨️ 快捷键说明

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