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

📄 收银员档案管理.frm

📁 完整的超市管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 收银员档案管理 
   Caption         =   "收银员档案管理"
   ClientHeight    =   4335
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7035
   LinkTopic       =   "Form1"
   ScaleHeight     =   4335
   ScaleWidth      =   7035
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command4 
      Caption         =   "退 出"
      Height          =   555
      Left            =   5460
      TabIndex        =   11
      Top             =   3420
      Width           =   1275
   End
   Begin VB.CommandButton Command3 
      Caption         =   "查 询"
      Height          =   555
      Left            =   5490
      TabIndex        =   10
      Top             =   2460
      Width           =   1275
   End
   Begin VB.CommandButton Command2 
      Caption         =   "删  除"
      Height          =   555
      Left            =   5400
      TabIndex        =   9
      Top             =   1380
      Width           =   1275
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保 存"
      Height          =   555
      Left            =   5490
      TabIndex        =   8
      Top             =   360
      Width           =   1275
   End
   Begin VB.TextBox Text1 
      Height          =   345
      Index           =   3
      Left            =   2010
      TabIndex        =   7
      Top             =   3150
      Width           =   2535
   End
   Begin VB.TextBox Text1 
      Height          =   345
      Index           =   2
      Left            =   2010
      TabIndex        =   5
      Top             =   2460
      Width           =   2535
   End
   Begin VB.TextBox Text1 
      Height          =   345
      Index           =   1
      Left            =   2010
      TabIndex        =   4
      Top             =   1770
      Width           =   2535
   End
   Begin VB.TextBox Text1 
      Height          =   345
      Index           =   0
      Left            =   2010
      TabIndex        =   3
      Top             =   1080
      Width           =   2535
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "收银员联系地址"
      Height          =   465
      Index           =   3
      Left            =   570
      TabIndex        =   6
      Top             =   3210
      Width           =   1365
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "收银员联系方式"
      Height          =   465
      Index           =   2
      Left            =   570
      TabIndex        =   2
      Top             =   2520
      Width           =   1365
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "收银员编号"
      Height          =   465
      Index           =   1
      Left            =   900
      TabIndex        =   1
      Top             =   1830
      Width           =   1365
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "收银员名字"
      Height          =   465
      Index           =   0
      Left            =   960
      TabIndex        =   0
      Top             =   1140
      Width           =   1365
   End
End
Attribute VB_Name = "收银员档案管理"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Dim txtSQL As String
Dim txtsql1(0 To 3) As String
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
 
    
    If Trim(Text1(0).Text) = "" Then
        MsgBox "请输入收银员名字!", vbOKOnly + vbExclamation, "警告"
        Exit Sub
        Text1(1).SetFocus
    Else
        txtSQL = "select * from 收银员信息表"
        Set mrc = ExecuteSQL(txtSQL, MsgText)
        While (mrc.EOF = False)
            If Trim(mrc.Fields("收银员名字")) = Trim(Text1(0)) Then
                MsgBox "该收银员已经存在,请单击修改项!", vbOKOnly + vbExclamation, "警告"
          
             
               Exit Sub
            Else
                mrc.MoveNext
            End If
        Wend
  End If
    
   
       
   
        mrc.AddNew
        mrc.Fields("收银员名字") = Trim(Text1(0).Text)
        mrc.Fields("收银员编号") = Trim(Text1(1).Text)
        mrc.Fields("收银员联系方式") = Trim(Text1(2).Text)
        mrc.Fields("收银员联系地址") = Trim(Text1(3).Text)
        MsgBox "添加收银员信息成功!", vbOKOnly + vbExclamation, "添加信息"
        mrc.Update
        mrc.Close
        Text1(0).Text = ""
        Text1(1).Text = ""
        Text1(2).Text = ""
        Text1(3).Text = ""
End Sub

Private Sub Command2_Click()
'Dim intCount As Integer
   ' If flaggedit Then
      '  If 收银员查询结果.msglist.Rows > 1 Then
         
         '   intCount = 收银员查询结果.msglist.Row
         '   收银员查询结果.txtsql = "select * from 收银员查询结果 where 收银员名字'" & Trim(收银员查询结果.msglist.TextMatrix(intCount, 1)) & "'"
          '  收银员查询结果.Show
       ' Else
       '     Call Command2_Click
      '  End If
    'Else
  '  收银员查询结果.txtsql = "select * from 收银员信息表"
   '   '  收银员查询结果.Show
   ' End If
   
   Dim txtSQL As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    
    If 收银员查询结果.msglist.Rows > 1 Then
        If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
            intCount = 收银员查询结果.msglist.Row
           txtSQL = "delete from 收银员查询结果 where 收银员编号='" & Trim(收银员查询结果.msglist.TextMatrix(intCount, 1)) & "'"
           ' txtSQL = "delete from 收银员查询结果 where  收银员编号='trim(text1(1).text)'or 收银员名字='trim(text1(0).text)'"
            Set mrc = ExecuteSQL(txtSQL, MsgText)
            
            Unload 收银员查询结果
            收银员查询结果.txtSQL = "select * from 收银员信息表"
            收银员查询结果.Show
        End If
    End If
   
   
End Sub

Private Sub Command3_Click()
Dim mrc As ADODB.Recordset
Dim txtSQL(0 To 3) As String
Dim MsgText As String
Dim K(0 To 3) As Integer
Dim i, d As Integer
Dim v As Integer
For i = 0 To 3
If Trim(Text1(i).Text) = "" Then v = v + 1
Next i
If v = 4 Then
MsgBox "没有选择查询条件!"
Exit Sub
End If
For d = 0 To 3
If Trim(Text1(d).Text) <> "" Then
K(d) = d

Select Case K(d)
Case 0
txtSQL(0) = "select * from 收银员信息表 where 收银员名字 = '" & Text1(0).Text & "'"
Set mrc = ExecuteSQL(txtSQL(0), MsgText)
        If mrc.EOF = True Then
            MsgBox "对不起,暂时没有符合条件的收银员!", vbOKOnly + vbExclamation, "警告"
            End If
Case 1

      txtSQL(1) = "select * from 收银员信息表 where 收银员编号 = '" & Text1(1).Text & "'"
Set mrc = ExecuteSQL(txtSQL(1), MsgText)
        If mrc.EOF = True Then
            MsgBox "对不起,暂时没有符合条件的收银员!", vbOKOnly + vbExclamation, "警告"
            End If
Case 2
txtSQL(2) = "select * from 收银员信息表 where 收银员联系电话 = '" & Text1(2).Text & "'"
Set mrc = ExecuteSQL(txtSQL(2), MsgText)
        If mrc.EOF = True Then
            MsgBox "对不起,无此样电话记录!", vbOKOnly + vbExclamation, "警告"
            End If
Case 3
txtSQL(3) = "select * from 收银员信息表 where 收银员联系地址 = '" & Text1(3).Text & "'"
Set mrc = ExecuteSQL(txtSQL(3), MsgText)
        If mrc.EOF = True Then
            MsgBox "对不起,暂时没有地址!", vbOKOnly + vbExclamation, "警告"
            End If
            
End Select
End If
     Next d


收银员查询结果.txtSQL = txtSQL(0) & txtSQL(1) & txtSQL(2) & txtSQL(3)
       收银员查询结果.Show

End Sub

Private Sub Command4_Click()
Unload Me
End Sub


⌨️ 快捷键说明

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