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

📄 gjq_addman.frm

📁 小型超市进销存系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form gjq_frmaddman 
   Caption         =   "增加员工"
   ClientHeight    =   5685
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4695
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   5685
   ScaleWidth      =   4695
   Begin VB.TextBox txtBirth 
      Enabled         =   0   'False
      Height          =   375
      Left            =   1560
      TabIndex        =   14
      Top             =   4080
      Width           =   1935
   End
   Begin VB.TextBox txtShenfen 
      Height          =   375
      Left            =   1560
      TabIndex        =   13
      Top             =   2880
      Width           =   3135
   End
   Begin VB.TextBox txtName 
      Height          =   375
      Left            =   1560
      TabIndex        =   12
      Top             =   720
      Width           =   2535
   End
   Begin VB.TextBox txtID 
      Height          =   375
      Left            =   1560
      TabIndex        =   11
      Top             =   120
      Width           =   1455
   End
   Begin VB.CommandButton cmdAdd 
      Caption         =   "保 存"
      Height          =   375
      Left            =   120
      TabIndex        =   10
      Top             =   5040
      Width           =   1215
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   1560
      TabIndex        =   2
      Text            =   "男"
      Top             =   1440
      Width           =   1935
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      Left            =   1560
      TabIndex        =   1
      Text            =   "高中"
      Top             =   2280
      Width           =   1935
   End
   Begin VB.ComboBox Combo3 
      Height          =   300
      Left            =   1560
      TabIndex        =   0
      Text            =   "人事部"
      Top             =   3480
      Width           =   2895
   End
   Begin VB.Label Label7 
      Alignment       =   2  'Center
      Caption         =   "出生日期:"
      Height          =   375
      Left            =   120
      TabIndex        =   9
      Top             =   4080
      Width           =   1215
   End
   Begin VB.Label Label6 
      Alignment       =   2  'Center
      Caption         =   "按部门分类:"
      Height          =   375
      Left            =   120
      TabIndex        =   8
      Top             =   3480
      Width           =   1215
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Caption         =   "身份证号:"
      Height          =   375
      Left            =   120
      TabIndex        =   7
      Top             =   2880
      Width           =   1215
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Caption         =   "员工学历:"
      Height          =   375
      Left            =   120
      TabIndex        =   6
      Top             =   2280
      Width           =   1215
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Caption         =   "员工性别:"
      Height          =   375
      Left            =   120
      TabIndex        =   5
      Top             =   1440
      Width           =   1215
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Caption         =   "员工姓名:"
      Height          =   375
      Left            =   120
      TabIndex        =   4
      Top             =   720
      Width           =   1215
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "员工编号:"
      Height          =   375
      Index           =   1
      Left            =   120
      TabIndex        =   3
      Top             =   120
      Width           =   1215
   End
End
Attribute VB_Name = "gjq_frmaddman"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdAdd_Click()
'如果员工编号或员工姓名为空,则重新输入
If txtId.Text = "" Or txtName.Text = "" Then
MsgBox "输入不允许为空,请重输"
Exit Sub
End If

GJQ_strsql = "select * from t_employee where employeeid='" & Trim(txtId.Text) & "'"
Set Dblink.rs = Dblink.executeSQL(GJQ_strsql)
           If Dblink.rs.RecordCount > 0 Then
        MsgBox "该用户已存在,不能添加"
           Exit Sub
           End If
         
    If txtShenfen.Text = "" Then
    Exit Sub
    End If
    
    Call IsErrorCode(txtShenfen.Text)
    GJQ_strsql = "insert into t_employee values('" & Trim(txtId.Text) & "','" & Trim(txtName.Text) & "','" & Trim(Combo1.Text) & "','" & Trim(txtBirth.Text) & "','" & Trim(Combo2.Text) & "','" & Trim(txtShenfen.Text) & "','" & Trim(Combo3.Text) & "')"
    Call Dblink.executeSQL(GJQ_strsql)
    GJQ_strsql = "select * from t_employee"
    Set gjq_frmmaninfo.MSHFlexGrid1.DataSource = Dblink.executeSQL(GJQ_strsql)

         
    GJQ_strsql = "select employeeid as 编号,empname as 姓名,sex as 性别,birthday as 生日,knowledge as 学历,cardid as 身份证,department as 部门 from t_employee"
    Set gjq_frmmaninfo.MSHFlexGrid1.DataSource = Dblink.executeSQL(GJQ_strsql)

End Sub


Private Sub Form_Load()
txtBirth.Enabled = False
End Sub

Private Sub txtShenfen_LostFocus()
 txtBirth.Text = IsErrorCode(txtShenfen.Text)
End Sub

⌨️ 快捷键说明

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