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

📄 addpay.frm

📁 学校财务管理系统课程设计VB+SQL2
💻 FRM
字号:
VERSION 5.00
Begin VB.Form AddPay 
   Caption         =   "Form1"
   ClientHeight    =   4425
   ClientLeft      =   5625
   ClientTop       =   3930
   ClientWidth     =   8205
   LinkTopic       =   "Form1"
   ScaleHeight     =   4425
   ScaleWidth      =   8205
   Begin VB.CommandButton Command2 
      Caption         =   "返 回"
      Height          =   495
      Left            =   5760
      TabIndex        =   8
      Top             =   3600
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "添 加"
      Height          =   495
      Left            =   4320
      TabIndex        =   7
      Top             =   3600
      Width           =   1335
   End
   Begin VB.TextBox txtDate 
      Height          =   495
      Left            =   2520
      TabIndex        =   5
      Top             =   2880
      Width           =   2775
   End
   Begin VB.TextBox txtMoney 
      Height          =   495
      Left            =   2520
      TabIndex        =   3
      Top             =   2160
      Width           =   2775
   End
   Begin VB.TextBox txtUser 
      Height          =   495
      Left            =   2520
      TabIndex        =   1
      Top             =   1440
      Width           =   2775
   End
   Begin VB.Label Label4 
      Caption         =   "工资管理模块"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   2520
      TabIndex        =   9
      Top             =   480
      Width           =   2535
   End
   Begin VB.Label Label3 
      Caption         =   "* 输入格式:YYYY-MM-DD"
      ForeColor       =   &H000000FF&
      Height          =   255
      Left            =   5400
      TabIndex        =   6
      Top             =   3120
      Width           =   2175
   End
   Begin VB.Label Label2 
      Caption         =   "发工资日期:"
      Height          =   375
      Left            =   1200
      TabIndex        =   4
      Top             =   3000
      Width           =   1215
   End
   Begin VB.Label Label1 
      Caption         =   "所发工资:"
      Height          =   375
      Left            =   1440
      TabIndex        =   2
      Top             =   2400
      Width           =   1095
   End
   Begin VB.Label lbluser 
      Caption         =   "员工ID:"
      Height          =   375
      Left            =   1560
      TabIndex        =   0
      Top             =   1560
      Width           =   855
   End
End
Attribute VB_Name = "AddPay"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    If txtUser.Text = "" Then     '判断不为空
        MsgBox "员工ID不能为空!", vbCritical
        txtUser.SetFocus
        Exit Sub
    End If
    
     If txtMoney.Text = "" Then     '判断不为空
        MsgBox "所发工资不能为空!", vbCritical
        txtMoney.SetFocus
        Exit Sub
    End If
    
     If txtDate.Text = "" Then     '判断不为空
        MsgBox "发发工资日期不能为空!", vbCritical
        txtDate.SetFocus
        Exit Sub
    End If
    
    If Not IsNumeric(txtMoney.Text) Then     '判断输入框必须是数字
        MsgBox "所发工资必须是数字!", vbCritical
        txtMoney.SetFocus
        Exit Sub
    Else
    
    Dim strSql As String
    
    strSql = "insert into tb_pay (payuser,paydate,paymoney)values('" & txtUser.Text & "','" & txtDate & "','" & txtMoney.Text & "')"
    
    Set rst = ExecuteSql(strSql)
    MsgBox "添加工资信息成功!", vbOKOnly + vbExclamation, "HKJSJ052201H"
    txtUser.Text = ""
    txtDate.Text = ""
    txtMoney.Text = ""
    txtUser.SetFocus
       
    End If
End Sub

Private Sub Command2_Click()
Me.Hide

End Sub

⌨️ 快捷键说明

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