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

📄 frm_hzprk.frm

📁 美容院管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frm_hzprk 
   BackColor       =   &H0080C0FF&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "化妆品入库"
   ClientHeight    =   4116
   ClientLeft      =   2760
   ClientTop       =   3756
   ClientWidth     =   6408
   Icon            =   "frm_hzprk.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4116
   ScaleWidth      =   6408
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      BackColor       =   &H0080C0FF&
      Caption         =   "收货人:"
      Height          =   1080
      Index           =   1
      Left            =   120
      TabIndex        =   13
      Top             =   2904
      Width           =   3132
      Begin VB.ComboBox Combo2 
         Height          =   276
         Left            =   948
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   228
         Width           =   2040
      End
      Begin VB.TextBox Text1 
         Height          =   276
         Index           =   2
         Left            =   948
         TabIndex        =   3
         Top             =   648
         Width           =   2040
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "姓名:"
         Height          =   180
         Index           =   4
         Left            =   168
         TabIndex        =   15
         Top             =   276
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "密码:"
         Height          =   180
         Index           =   3
         Left            =   168
         TabIndex        =   14
         Top             =   684
         Width           =   540
      End
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H0080C0FF&
      Caption         =   "入库:"
      Height          =   624
      Left            =   132
      TabIndex        =   11
      Top             =   2244
      Width           =   3108
      Begin VB.TextBox Text1 
         Height          =   276
         Index           =   1
         Left            =   912
         TabIndex        =   1
         Top             =   216
         Width           =   2040
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "数量:"
         Height          =   180
         Index           =   2
         Left            =   144
         TabIndex        =   12
         Top             =   276
         Width           =   540
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H0080C0FF&
      Caption         =   "送货人:"
      Height          =   1080
      Index           =   0
      Left            =   3360
      TabIndex        =   8
      Top             =   2244
      Width           =   2928
      Begin VB.TextBox Text1 
         Height          =   276
         Index           =   0
         Left            =   732
         TabIndex        =   5
         Top             =   648
         Width           =   2040
      End
      Begin VB.ComboBox Combo1 
         Height          =   276
         Left            =   732
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   228
         Width           =   2040
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "密码:"
         Height          =   180
         Index           =   1
         Left            =   168
         TabIndex        =   10
         Top             =   684
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "姓名:"
         Height          =   180
         Index           =   0
         Left            =   168
         TabIndex        =   9
         Top             =   276
         Width           =   540
      End
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Cancel          =   -1  'True
      Height          =   390
      Index           =   1
      Left            =   5100
      MaskColor       =   &H00FFFFFF&
      Picture         =   "frm_hzprk.frx":000C
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   3444
      UseMaskColor    =   -1  'True
      Width           =   1185
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0E0FF&
      Default         =   -1  'True
      Height          =   390
      Index           =   2
      Left            =   3360
      MaskColor       =   &H00FFFFFF&
      Picture         =   "frm_hzprk.frx":226E
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   3444
      UseMaskColor    =   -1  'True
      Width           =   1185
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   2088
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   6156
      _ExtentX        =   10859
      _ExtentY        =   3683
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      AllowReorder    =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      HotTracking     =   -1  'True
      HoverSelection  =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   16777215
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   6
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "名称"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "型号"
         Object.Width           =   1764
      EndProperty
      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   2
         Text            =   "单位"
         Object.Width           =   1058
      EndProperty
      BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Alignment       =   1
         SubItemIndex    =   3
         Text            =   "单价"
         Object.Width           =   1764
      EndProperty
      BeginProperty ColumnHeader(5) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   4
         Text            =   "类型"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(6) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   5
         Text            =   "库存"
         Object.Width           =   2540
      EndProperty
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "2000-12-26"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   216
      Left            =   5412
      TabIndex        =   16
      Top             =   3888
      Width           =   888
   End
End
Attribute VB_Name = "frm_hzprk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Dim rec As Recordset
Dim itmx As ListItem

Private Sub OKButton_Click()

End Sub

Private Sub Command1_Click(Index As Integer)
If Index = 1 Then
    Unload Me
Else
    If ListView1.ListItems.Count = 0 Then
        Exit Sub
    End If
    If Text1(0) = "" Then
        MsgBox "您没有输入密码", vbOKOnly + vbCritical, "错误"
        Text1(0).SetFocus
        Exit Sub
    End If
    If IsNumeric(Text1(1)) = False Or Val(Text1(1)) < 0 Then
        MsgBox "您没有输入的数量或数量小于0", vbOKOnly + vbCritical, "错误"
        Text1(1).SetFocus
        Exit Sub
    End If
    sqlstr = "select * from 美容师人员表 where 姓名='" + Combo1.Text + "' and 密码='" + Text1(0) + "'"
    Set rec = db.OpenRecordset(sqlstr)
    If rec.EOF And rec.BOF Then
        MsgBox "您输入的密码有误", vbOKOnly + vbCritical, "错误"
        Text1(0).SetFocus
        Exit Sub
        
    End If
    sqlstr = "select * from 美容师人员表 where 姓名='" + Combo2.Text + "' and 密码='" + Text1(2) + "'"
    Set rec = db.OpenRecordset(sqlstr)
    If rec.EOF And rec.BOF Then
        MsgBox "您输入的密码有误", vbOKOnly + vbCritical, "错误"
        Text1(2).SetFocus
        Exit Sub
        
    End If
    ListView1.SelectedItem.SubItems(5) = Val(ListView1.SelectedItem.SubItems(5)) + Val(Text1(1))
    sqlstr = "update 化妆品表 set 库存=库存+" + Text1(1) + " where 名称='" + ListView1.SelectedItem.Text + "' and 型号='" + ListView1.SelectedItem.SubItems(1) + "' and 单价=" + ListView1.SelectedItem.SubItems(3)
    db.Execute sqlstr
    sqlstr = "insert into 化妆品入库表 values('" + ListView1.SelectedItem.Text + "','" + ListView1.SelectedItem.SubItems(1) + "','" + ListView1.SelectedItem.SubItems(4) + "'," + Text1(1) + ",'" + Combo1.Text + "','" + Combo2.Text + "',#" + Format(Date, "yyyy-mm-dd") + "#)"
    
    db.Execute sqlstr
    MsgBox "入库成功!", vbOKOnly + vbInformation, "错误"
End If
End Sub

Private Sub Form_Load()
sqlstr = "select * from 化妆品表"
Set rec = db.OpenRecordset(sqlstr)
Do While Not rec.EOF
    Set itmx = ListView1.ListItems.Add(, , "" & rec.Fields(0))
    For i = 1 To rec.Fields.Count - 1
        itmx.SubItems(i) = "" & rec.Fields(i)
    Next i
    rec.MoveNext
Loop
sqlstr = "select 姓名 from 美容师人员表"
Set rec = db.OpenRecordset(sqlstr)
Do While Not rec.EOF
    Combo1.AddItem "" & rec.Fields(0)
    Combo2.AddItem "" & rec.Fields(0)
    rec.MoveNext
Loop
Label2 = Format(Date, "yyyy-mm-dd")
End Sub

⌨️ 快捷键说明

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