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

📄 form2_1.frm

📁 本人自己开发的超市管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2_1 
   Caption         =   "新招员工"
   ClientHeight    =   3870
   ClientLeft      =   4185
   ClientTop       =   3810
   ClientWidth     =   9990
   LinkTopic       =   "Form1"
   ScaleHeight     =   3870
   ScaleWidth      =   9990
   Begin VB.Frame Frame1 
      Caption         =   "附加资料"
      Height          =   1935
      Left            =   4800
      TabIndex        =   10
      Top             =   600
      Width           =   3975
      Begin VB.TextBox Text6 
         Height          =   375
         Left            =   1320
         TabIndex        =   16
         Top             =   1200
         Width           =   1215
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "Form2_1.frx":0000
         Left            =   1320
         List            =   "Form2_1.frx":000D
         TabIndex        =   15
         Text            =   "请选择"
         Top             =   840
         Width           =   1335
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   1320
         TabIndex        =   14
         Top             =   480
         Width           =   1335
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         Caption         =   "元"
         Height          =   180
         Index           =   3
         Left            =   2640
         TabIndex        =   17
         Top             =   1320
         Width           =   195
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         Caption         =   "薪     水:"
         Height          =   180
         Index           =   2
         Left            =   315
         TabIndex        =   13
         Top             =   1320
         Width           =   1005
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         Caption         =   "职     务:"
         Height          =   180
         Index           =   1
         Left            =   315
         TabIndex        =   12
         Top             =   960
         Width           =   1005
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         AutoSize        =   -1  'True
         Caption         =   "所在商店号:"
         Height          =   180
         Index           =   0
         Left            =   240
         TabIndex        =   11
         Top             =   600
         Width           =   1095
      End
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取  消"
      Height          =   375
      Left            =   3000
      TabIndex        =   9
      Top             =   2640
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "提  交"
      Default         =   -1  'True
      Height          =   375
      Left            =   1320
      TabIndex        =   8
      Top             =   2640
      Width           =   1095
   End
   Begin VB.TextBox Text4 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2400
      PasswordChar    =   "*"
      TabIndex        =   7
      Top             =   1800
      Width           =   1575
   End
   Begin VB.TextBox Text3 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2400
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   1440
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   2400
      TabIndex        =   5
      Top             =   1080
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2400
      TabIndex        =   4
      Top             =   720
      Width           =   1575
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "确认密码:"
      Height          =   180
      Index           =   3
      Left            =   1440
      TabIndex        =   3
      Top             =   1920
      Width           =   915
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "初始密码:"
      Height          =   180
      Index           =   2
      Left            =   1425
      TabIndex        =   2
      Top             =   1560
      Width           =   915
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "姓    名:"
      Height          =   180
      Index           =   1
      Left            =   1425
      TabIndex        =   1
      Top             =   1200
      Width           =   915
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "员 工 号:"
      Height          =   180
      Index           =   0
      Left            =   1410
      TabIndex        =   0
      Top             =   840
      Width           =   915
   End
End
Attribute VB_Name = "Form2_1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim Mm1 As String, Mm2 As String    '密码

Private Sub Command1_Click()
            
    
    Dim YGH As String, YGM As String    '员工号,姓名
    Dim SDH As String, ZW As String, XS As String
    Dim QX1 As Integer   '权限
            
            
            
    If Command1.Caption = "提  交" Then
        
        Mm1 = Text3.Text
        Mm2 = Text4.Text
        
        If Text1.Text = "" Then
            
            MsgBox "该项不能留空!"
            Text1.SetFocus
            SendKeys "{Home}+{End}"
            Exit Sub
        End If
        
        If Text2.Text = "" Then
            
            MsgBox "该项不能留空!"
            Text2.SetFocus
            SendKeys "{Home}+{End}"
            Exit Sub
        End If
        
                
                
        If Mm1 = "" Or Mm2 = "" Then
            
            MsgBox "初始密码不能为空!"
            Text3.SetFocus
            SendKeys "{Home}+{End}"
            
            Exit Sub
        ElseIf Mm1 <> Mm2 Then
            
                MsgBox "两次密码不符合!"
                Text3.SetFocus
                SendKeys "{Home}+{End}"
        Else
                
                Form2_1.Width = 9930
        
'               Form2_1.StartUpPosition = 2

                Command1.Caption = "确  认"
                Frame1.Visible = True
        End If
        
    
    Exit Sub
    
    End If
    
    
    
    If Command1.Caption = "确  认" Then
        
        Dim str1 As String, str2 As String
        
        If Combo1.Text = "经理" Then
            
            QX1 = 1
        
        ElseIf Combo1.Text = "收银员" Then
            
            QX1 = 2
        ElseIf Combo1.Text = "业务员" Then
            QX1 = 3
        Else
            MsgBox "请作选择!"
            Combo1.SetFocus
            Exit Sub
        End If
        
        
        
        
        
        str1 = "insert into jx654.Y values('" & Text1.Text & "','" & Text2.Text & "','" & Text5.Text & "','" & Combo1.Text & "','" & Text6.Text & "');"
        
       On Error GoTo L1
            
           J.Execute str1
            
        GoTo L
        
L1:      MsgBox "您录入的资料有错误数据,请核实!"
        Exit Sub
        
L:
        str2 = "insert into dbo.m values('" & Text1.Text & "','" & Mm1 & "','" & QX1 & "');"
        
        On Error GoTo L1
        
            J.Execute str2
        
        GoTo LL
        
LL:     Unload Me
    
    End If
     
End Sub

Private Sub Command2_Click()
    
    Unload Me
    
End Sub

Private Sub Form_Load()

    Me.Caption = Me.Caption + "(当前操作员 - - " & mm & ")"
        
    Me.Width = 5055
    
    Frame1.Visible = False

End Sub

⌨️ 快捷键说明

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