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

📄 form13.frm

📁 1) 用户管理功能:用户权限、用户添加、修改及登录 2) 药品名称管理:药品名称的添加、修改和删除 3) 药品价格管理:价格初始
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   120
      TabIndex        =   16
      Top             =   2520
      Width           =   960
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "采购单位:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   4560
      TabIndex        =   15
      Top             =   3360
      Width           =   1200
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "药品名称:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   120
      TabIndex        =   14
      Top             =   1560
      Width           =   1200
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "采购价格:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   4560
      TabIndex        =   13
      Top             =   2520
      Width           =   1200
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "供应商代码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   4320
      TabIndex        =   12
      Top             =   1680
      Width           =   1440
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "采购日期:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   0
      TabIndex        =   11
      Top             =   3360
      Width           =   1200
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "采购编号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   1
      Left            =   120
      TabIndex        =   10
      Top             =   840
      Width           =   1200
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "元"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   7320
      TabIndex        =   9
      Top             =   2760
      Width           =   495
   End
End
Attribute VB_Name = "Form13"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_click()
Select Case Combo1.ListIndex
      Case 0
        Text3.Text = "板蓝跟颗粒"
        Text4.Text = "袋"
        Text2.Text = "2001"
     Case 1
        Text3.Text = "诺氟沙星胶囊"
        Text4.Text = "盒"
        Text2.Text = "2002"
     Case 2
        Text3.Text = "阿莫西林胶囊"
        Text4.Text = "盒"
        Text2.Text = "2003"
     Case 3
        Text3.Text = "硫酸庆大霉素注射液"
        Text4.Text = "盒"
        Text2.Text = "2004"
     Case 4
        Text3.Text = "维C银翘片"
        Text4.Text = "盒"
        Text2.Text = "2005"
     Case 5
        Text3.Text = "维生素B2片"
        Text4.Text = "盒"
        Text2.Text = "2006"
End Select
End Sub

Private Sub Command1_Click()
 Dim rs As New ADODB.Recordset
  Dim sql As String
  Dim rs1 As New ADODB.Recordset
  Dim sql1 As String
  If Text1.Text = "" Or (Not IsNumeric(Text1.Text)) Then
    MsgBox "请输入采购编号!", vbOKOnly + vbExclamation, "警告!"
    Text1.SetFocus
  Else
    If Combo1.Text = "" Then
    MsgBox "请输入药品代码!", vbOKOnly + vbExclamation, "警告!"
    Combo1.SetFocus
    Else
      If Text5.Text = "" Or (Not IsNumeric(Text5.Text)) Then
       MsgBox "请输入采购数量!", vbOKOnly + vbExclamation, "警告!"
       Text5.SetFocus
      Else
       If Text6.Text = "" Then
       MsgBox "请输入采购价格!", vbOKOnly + vbExclamation, "警告!"
       Text6.SetFocus
       Else
         sql = "select * from 采购记录"
         rs.Open sql, con, adOpenKeyset, adLockPessimistic
         rs.AddNew
         rs.Fields(0) = Text1.Text
         rs.Fields(1) = Combo1.Text
         rs.Fields(2) = Text3.Text
         rs.Fields(3) = Text2.Text
         rs.Fields(4) = Text5.Text
         rs.Fields(5) = Text6.Text
         rs.Fields(7) = Text4.Text
         rs.Fields(6) = DTPicker1.Value
         rs.Update
         MsgBox "采购记录已成功录入", vbOKOnly + vbExclamation, "恭喜!"
         sql1 = "select * from 药品库存表"
         rs1.Open sql1, con, adOpenKeyset, adLockPessimistic
         rs1.AddNew
         rs1.Fields(0) = Text1.Text
         rs1.Fields(1) = Combo1.Text
         rs1.Fields(2) = Text3.Text
         rs1.Fields(3) = Text4.Text
         rs1.Fields(4) = Text5.Text
         rs1.Fields(5) = DTPicker2.Value
         rs1.Fields(6) = Text6.Text
         rs1.Fields(7) = DTPicker3.Value
         rs1.Update
         MsgBox "已将药品成功录入库存", vbOKOnly + vbExclamation, "恭喜!"
         Text1.Text = ""
         Combo1.Text = ""
         Text3.Text = ""
         Text4.Text = ""
         Text5.Text = ""
         Text6.Text = ""
         Text2.Text = ""
       End If
      End If
      End If
     End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Text1_LostFocus()
Dim rs As New ADODB.Recordset
  Dim sql As String
 If Text1.Text = "" Or (Not IsNumeric(Text1.Text)) Then
    MsgBox "请输入进库编号!", vbOKOnly + vbExclamation, "警告!"
    Text1.SetFocus
  Else
   sql = "select * from 采购记录"
    rs.Open sql, con, adOpenKeyset, adLockPessimistic
     rs.MoveFirst
       Do While Not rs.EOF
      If Text1.Text = rs.Fields(0) Then
         MsgBox "请重新选择一个采购编号", vbOKOnly + vbExclamation, "警告!"
           Text1.SetFocus
         End If
         rs.MoveNext
           Loop
           rs.Close
           End If
End Sub

⌨️ 快捷键说明

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