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

📄 frmclear.frm

📁 是医药卫生综合管理系统的一部分.住院病人管理
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmclear 
   BackColor       =   &H00404040&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "清除住病人院历史记录"
   ClientHeight    =   3465
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10095
   Icon            =   "frmclear.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   Picture         =   "frmclear.frx":030A
   ScaleHeight     =   3465
   ScaleWidth      =   10095
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command5 
      Caption         =   "刷新列表&(R)"
      Height          =   350
      Left            =   6240
      TabIndex        =   5
      Top             =   3000
      Width           =   1200
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   4440
      Top             =   0
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      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 MSDataGridLib.DataGrid DataGrid1 
      Height          =   2775
      Left            =   120
      TabIndex        =   4
      Top             =   120
      Width           =   9855
      _ExtentX        =   17383
      _ExtentY        =   4895
      _Version        =   393216
      BackColor       =   255
      ForeColor       =   16777215
      HeadLines       =   1.5
      RowHeight       =   15
      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     =   2
      BeginProperty Column00 
         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 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
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Command4 
      Caption         =   "关闭窗口&(C)"
      Height          =   350
      Left            =   7920
      TabIndex        =   3
      Top             =   3000
      Width           =   1300
   End
   Begin VB.CommandButton Command3 
      Caption         =   "全部删除&(A)"
      Height          =   350
      Left            =   4440
      TabIndex        =   2
      Top             =   3000
      Width           =   1300
   End
   Begin VB.CommandButton Command2 
      Caption         =   "选择范围&(S)"
      Height          =   350
      Left            =   2640
      TabIndex        =   1
      Top             =   3000
      Width           =   1300
   End
   Begin VB.CommandButton Command1 
      Caption         =   "单项删除&(D)"
      Height          =   350
      Left            =   840
      TabIndex        =   0
      Top             =   3000
      Width           =   1300
   End
End
Attribute VB_Name = "frmclear"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim respond As String
On Error GoTo err1
With Adodc1.Recordset
If .BOF = True And .EOF = True Then
Command1.Enabled = False
MsgBox "数据库已空,无记录可删除!"
Else
respond = MsgBox("本操作将删除当前记录,继续吗?", 4, "特别警告")
If respond = vbYes Then
.Delete adAffectCurrent
If .EOF Then .MoveNext
.UpdateBatch
End If
End If
End With
Exit Sub
err1:
MsgBox "数据库已空或共享冲突!"
End Sub

Private Sub Command2_Click()
Dim i As Integer
If Command2.Caption = "选择范围&(S)" Then
    Command2.Enabled = False
    frmfind.Show
Else
    With Adodc1.Recordset
        respond = MsgBox("本操作将删除选定范围内所有记录,继续吗?", 4, "特别警告")
    If respond = vbYes Then
        For i = 0 To .RecordCount - 1
        .MoveFirst
        .Delete adAffectCurrent
        .MoveNext
        .UpdateBatch
        Next
    End If
    End With
    Command2.Caption = "选择范围&(S)"
    Command1.Enabled = True
    Command3.Enabled = True
    Command5.Enabled = True
End If
End Sub

Private Sub Command3_Click()
Dim respond As String
On Error GoTo err4
With Adodc1.Recordset
If .BOF = True And .EOF = True Then
    Command3.Enabled = False
    MsgBox "数据库已空,无记录可删除!"
Else
    respond = MsgBox("本操作将删除所有过期报废药品记录,继续吗?", 4, "特别警告")
    If respond = vbYes Then
        For i = 0 To .RecordCount - 1
            .MoveFirst
            .Delete adAffectCurrent
            .MoveNext
            .UpdateBatch
        Next
    End If
End If
End With
Exit Sub
err4:
MsgBox "数据库已空,无记录可删除!"
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Command5_Click()
On Error GoTo err1
Command2.Caption = "选择范围&(S)"
Adodc1.RecordSource = "select 住院证号,患者姓名,性别,年龄,地址,病种,科室类别,病房号,床位号,主治大夫,住院日期,出院日期,操作员,预交费,费用合计 from zyf where 出院标记=true"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Columns(0).Width = 800
DataGrid1.Columns(1).Width = 800
DataGrid1.Columns(2).Width = 500
DataGrid1.Columns(3).Width = 500
DataGrid1.Columns(4).Width = 2000
DataGrid1.Columns(5).Width = 1200
DataGrid1.Columns(6).Width = 800
DataGrid1.Columns(7).Width = 600
DataGrid1.Columns(8).Width = 600
DataGrid1.Columns(9).Width = 800
DataGrid1.Columns(10).Width = 800
DataGrid1.Columns(11).Width = 800
DataGrid1.Columns(12).Width = 800
DataGrid1.Columns(13).Width = 800
DataGrid1.Columns(13).NumberFormat = "0.0"
DataGrid1.Columns(14).Width = 800
DataGrid1.Columns(14).NumberFormat = "0.0"
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Exit Sub
err1:
MsgBox "数据库连接失败!"
End Sub

Private Sub Form_Activate()
frmmain.StatusBar1.Panels(2) = "活动窗口:" & frmclear.Caption
End Sub

Private Sub Form_Load()
On Error GoTo err1
frmclear.Top = (frmmain.Height - frmclear.Height) / 2 - 500
frmclear.Left = (frmmain.Width - frmclear.Width) / 2
Adodc1.ConnectionString = frmlogin.conn
Command2.Caption = "选择范围&(S)"
Adodc1.RecordSource = "select 住院证号,患者姓名,性别,年龄,地址,病种,科室类别,病房号,床位号,主治大夫,住院日期,出院日期,操作员,预交费,费用合计 from zyf where 出院标记=true"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Columns(0).Width = 800
DataGrid1.Columns(1).Width = 800
DataGrid1.Columns(2).Width = 500
DataGrid1.Columns(3).Width = 500
DataGrid1.Columns(4).Width = 2000
DataGrid1.Columns(5).Width = 1200
DataGrid1.Columns(6).Width = 800
DataGrid1.Columns(7).Width = 600
DataGrid1.Columns(8).Width = 600
DataGrid1.Columns(9).Width = 800
DataGrid1.Columns(10).Width = 800
DataGrid1.Columns(11).Width = 800
DataGrid1.Columns(12).Width = 800
DataGrid1.Columns(13).Width = 800
DataGrid1.Columns(13).NumberFormat = "0.0"
DataGrid1.Columns(14).Width = 800
DataGrid1.Columns(14).NumberFormat = "0.0"
If Adodc1.Recordset.AbsolutePosition = adPosUnknown Then '.BOF = True And Adodc1.Recordset.EOF = True Then
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command5.Enabled = False
Else
Command1.Enabled = True
Command2.Enabled = True
Command3.Enabled = True
Command5.Enabled = True
End If
Exit Sub
err1:
MsgBox "数据库连接失败!"
End Sub

Private Sub Form_Unload(Cancel As Integer)
frmmain.StatusBar1.Panels(2) = "目前没有窗口被激活"
End Sub

⌨️ 快捷键说明

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