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

📄 frmchange.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 frmchange 
   BackColor       =   &H00404040&
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   4530
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9675
   Icon            =   "frmchange.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   Picture         =   "frmchange.frx":030A
   ScaleHeight     =   4530
   ScaleWidth      =   9675
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox Picture1 
      Height          =   680
      Left            =   240
      Picture         =   "frmchange.frx":59F9
      ScaleHeight     =   615
      ScaleWidth      =   9195
      TabIndex        =   0
      Top             =   3720
      Width           =   9255
      Begin VB.ComboBox Combo2 
         Height          =   300
         ItemData        =   "frmchange.frx":B0E8
         Left            =   1080
         List            =   "frmchange.frx":B0F5
         TabIndex        =   6
         Top             =   160
         Width           =   1335
      End
      Begin VB.CommandButton Command2 
         Caption         =   "编辑&(E)"
         Height          =   350
         Left            =   5280
         TabIndex        =   3
         Top             =   120
         Width           =   1100
      End
      Begin VB.CommandButton Command3 
         Caption         =   "更新&(U)"
         Height          =   350
         Left            =   6615
         TabIndex        =   2
         Top             =   120
         Width           =   1100
      End
      Begin VB.CommandButton Command4 
         Caption         =   "关闭&(C)"
         Height          =   350
         Left            =   7920
         TabIndex        =   1
         Top             =   120
         Width           =   1100
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "选择数据库"
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   120
         TabIndex        =   7
         Top             =   230
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         ForeColor       =   &H000000FF&
         Height          =   180
         Left            =   2640
         TabIndex        =   5
         Top             =   240
         Width           =   90
      End
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "frmchange.frx":B11D
      Height          =   3255
      Left            =   240
      TabIndex        =   4
      Top             =   240
      Width           =   9225
      _ExtentX        =   16272
      _ExtentY        =   5741
      _Version        =   393216
      AllowUpdate     =   0   'False
      BackColor       =   16777215
      DefColWidth     =   53
      ForeColor       =   16711680
      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 MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   0
      Top             =   0
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _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
End
Attribute VB_Name = "frmchange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub shaxin()
Adodc1.RecordSource = "select * from " & frmmain.datas & " order by ID"
Adodc1.Refresh
Label1.Caption = "提示:库存总量:" & Adodc1.Recordset.RecordCount & " 种"
Set DataGrid1.DataSource = Adodc1
DataGrid1.Columns(0).Visible = False
DataGrid1.Columns(17).Visible = False
DataGrid1.Columns("进价").NumberFormat = "0.00"
DataGrid1.Columns("进价合计").NumberFormat = "0.00"
DataGrid1.Columns("零售价").NumberFormat = "0.00"
DataGrid1.Columns("零售合计").NumberFormat = "0.00"
DataGrid1.Columns("差额").NumberFormat = "0.00"
DataGrid1.Columns(1).Width = 1000
DataGrid1.Columns(2).Width = 1200
DataGrid1.Columns(3).Width = 1200
DataGrid1.Columns(4).Width = 600
DataGrid1.Columns(5).Width = 600
DataGrid1.Columns(6).Width = 600
DataGrid1.AllowUpdate = False
Command3.Enabled = False
End Sub
Private Sub Command2_Click()
On Error GoTo err3
DataGrid1.AllowUpdate = True
Command3.Enabled = True
Command2.Enabled = False
Exit Sub
err3:
MsgBox "数据更新失败!"
End Sub

Private Sub Command3_Click()
On Error GoTo err2
DataGrid1.AllowUpdate = False
Adodc1.Recordset.UpdateBatch
Command3.Enabled = False
Command2.Enabled = True
Exit Sub
err2:
MsgBox "数据库连接失败!"
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Form_Load()
On Error GoTo err1
frmchange.Top = (frmmain.Height - frmchange.Height) / 2 - 500
frmchange.Left = (frmmain.Width - frmchange.Width) / 2
Adodc1.ConnectionString = frmlogin.conn
frmchange.Caption = "修改库存数据"
Exit Sub
err1:
MsgBox "远程服务器连接失败!"
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmmain.StatusBar1.Panels(2) = "目前没有窗口被激活"
End Sub
Private Sub Form_Activate()
frmmain.StatusBar1.Panels(2) = "活动窗口:" & frmchange.Caption
End Sub
Private Sub Combo2_Click()
Select Case Combo2.Text
Case "西药中成药库"
    frmmain.datas = "kcyp"
    frmchange.Caption = "修改西药和中成药数据库记录"
    Call shaxin
Case "中草药库"
    frmmain.datas = "caoyao"
    frmchange.Caption = "修改中草药数据库记录"
    Call shaxin
Case "器械材料库"
    frmmain.datas = "qixie"
    frmchange.Caption = "修改医疗器械和材料数据库记录"
    Call shaxin
Case Else
    frmchange.Caption = "修改库存数据"
End Select
End Sub

⌨️ 快捷键说明

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