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

📄 reward_punishinfo.frm

📁 人力资源管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frmReward_PunishInfo 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "员工奖励信息:"
   ClientHeight    =   3480
   ClientLeft      =   3510
   ClientTop       =   5175
   ClientWidth     =   7515
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3480
   ScaleWidth      =   7515
   Begin VB.Frame Frame1 
      Height          =   3375
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   7335
      Begin VB.TextBox txtBeizhu 
         Height          =   1335
         Left            =   1440
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   19
         Text            =   "Reward_PunishInfo.frx":0000
         Top             =   1920
         Width           =   5415
      End
      Begin VB.TextBox txtGongXu 
         Height          =   270
         Left            =   1440
         TabIndex        =   8
         Top             =   720
         Width           =   4695
      End
      Begin VB.TextBox txtNum 
         Enabled         =   0   'False
         Height          =   270
         Left            =   1440
         TabIndex        =   7
         Top             =   360
         Width           =   1695
      End
      Begin VB.TextBox txtName 
         Enabled         =   0   'False
         Height          =   270
         Left            =   5160
         TabIndex        =   6
         Top             =   360
         Width           =   1575
      End
      Begin VB.TextBox txtPrice 
         Height          =   270
         Left            =   1440
         TabIndex        =   5
         Top             =   1080
         Width           =   1335
      End
      Begin VB.TextBox txtMonth 
         Enabled         =   0   'False
         Height          =   270
         Left            =   5160
         TabIndex        =   4
         Top             =   1080
         Width           =   1575
      End
      Begin VB.CommandButton cmdCancel 
         Caption         =   "取消(&C)"
         Height          =   375
         Left            =   5520
         TabIndex        =   3
         Top             =   1440
         Width           =   1215
      End
      Begin VB.CommandButton cmdOK 
         Caption         =   "确定(&O)"
         Height          =   375
         Left            =   4200
         TabIndex        =   2
         Top             =   1440
         Width           =   1215
      End
      Begin VB.PictureBox Picture1 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFFFFF&
         BorderStyle     =   0  'None
         ForeColor       =   &H80000008&
         Height          =   375
         Left            =   6120
         Picture         =   "Reward_PunishInfo.frx":0005
         ScaleHeight     =   375
         ScaleWidth      =   375
         TabIndex        =   1
         Top             =   720
         Width           =   375
      End
      Begin MSComCtl2.DTPicker DTPRegistDate 
         Height          =   375
         Left            =   1440
         TabIndex        =   9
         Top             =   1440
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   661
         _Version        =   393216
         Format          =   169541633
         CurrentDate     =   39103
      End
      Begin VB.Label Label5 
         Caption         =   "备    注:"
         Height          =   375
         Left            =   360
         TabIndex        =   20
         Top             =   1920
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "员工编号:"
         Height          =   255
         Left            =   360
         TabIndex        =   18
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "员工姓名:"
         Height          =   255
         Left            =   4080
         TabIndex        =   17
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "奖励项目:"
         Height          =   255
         Left            =   360
         TabIndex        =   16
         Top             =   720
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "奖励金额:"
         Height          =   255
         Left            =   360
         TabIndex        =   15
         Top             =   1080
         Width           =   1095
      End
      Begin VB.Label Label7 
         Caption         =   "所属工资月份:"
         Height          =   255
         Left            =   3720
         TabIndex        =   14
         Top             =   1080
         Width           =   1575
      End
      Begin VB.Label Label8 
         Caption         =   "记录日期:"
         Height          =   375
         Left            =   360
         TabIndex        =   13
         Top             =   1440
         Width           =   1095
      End
      Begin VB.Label Label9 
         Caption         =   "元"
         Height          =   255
         Left            =   2880
         TabIndex        =   12
         Top             =   1080
         Width           =   255
      End
      Begin VB.Label lblgongxu 
         Caption         =   "新工序"
         Height          =   255
         Left            =   1440
         TabIndex        =   11
         Top             =   720
         Width           =   2415
      End
      Begin VB.Label lblID 
         Caption         =   "ID"
         Height          =   255
         Left            =   4320
         TabIndex        =   10
         Top             =   1440
         Width           =   735
      End
   End
End
Attribute VB_Name = "frmReward_PunishInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
Appear_key = 0
End Sub

Private Sub cmdOK_Click()
If Appear = 0 Then
    Update
ElseIf Appear = 1 Then
    AddNew
End If
Appear_key = 0
End Sub

Private Sub Form_Activate()
If Appear = 0 And Appear_key = 0 Then
    fuzhi
    txtNum.Locked = True
    txtName.Locked = True
ElseIf Appear = 0 And Appear_key = 1 Then
    'fuzhi
    txtGongXu.Text = lblgongxu.Caption
    txtNum.Locked = True
    txtName.Locked = True
ElseIf Appear = 1 And Appear_key = 1 Then
    txtGongXu.Text = lblgongxu.Caption
End If
End Sub

Private Sub fuzhi()
    Dim adors As New Recordset
    Dim strSQL As String
    Set adors.ActiveConnection = ADOcn
    If WageType = "reward" Then
    strSQL = "Select * From 员工奖励表 Where ID=" + lblID
    adors.Open strSQL
       If Not adors.EOF Then
       txtNum = adors("员工编号")
       txtName = adors("员工姓名")
       txtGongXu = adors("奖励项目")
       txtPrice = LTrim(adors("奖励金额"))
       DTPRegistDate.Value = LTrim(adors("记录日期"))
       txtMonth = adors("所属工资月份")
       txtBeizhu = adors("备注")
       End If
    ElseIf WageType = "punish" Then
    strSQL = "Select * From 员工惩罚表 Where ID=" + lblID
    adors.Open strSQL
       If Not adors.EOF Then
       txtNum = adors("员工编号")
       txtName = adors("员工姓名")
       txtGongXu = adors("惩罚项目")
       txtPrice = LTrim(adors("惩罚金额"))
       DTPRegistDate.Value = LTrim(adors("记录日期"))
       txtMonth = adors("所属工资月份")
       txtBeizhu = adors("备注")
       End If
    End If
End Sub
Private Sub Update()
    txtNum.Locked = True
    txtName.Locked = True
If txtGongXu = "" Or txtPrice = "" Or txtBeizhu = "" Or txtMonth = "" Then
        MsgBox "请输入完整信息,没有请填“无”!", vbCritical + vbOKOnly, "信息提示"
Else
    Dim strSQL As String
     If WageType = "reward" Then
    strSQL = "Update 员工奖励表 Set 所属工资月份='" + txtMonth + "',奖励项目= '" + txtGongXu + "',奖励金额= " + txtPrice
    strSQL = strSQL + ",记录日期='" + CStr(DTPRegistDate.Value) + "',备注= '" + txtBeizhu + "'"
    strSQL = strSQL + " Where ID=" + lblID
    ADOcn.Execute strSQL
    MyRefresh_frmRewardWage
    ElseIf WageType = "piece" Then
    strSQL = "Update 员工惩罚表 Set 所属工资月份='" + txtMonth + "',惩罚项目= '" + txtGongXu + "',惩罚金额= " + txtPrice
    strSQL = strSQL + ",记录日期='" + CStr(DTPRegistDate.Value) + "',备注= '" + txtBeizhu + "'"
    strSQL = strSQL + " Where ID=" + lblID
    ADOcn.Execute strSQL
    MyRefresh_frmPunishWage
    End If
Unload Me
End If
End Sub

Private Sub Picture1_Click()
Appear_key = 1
frmGongXuType.Show
If WageType = "reward" Then
frmGongXuType.Caption = "员工奖励类型"
frmGongXuType.Frame1.Caption = "奖励类型信息:"
frmGongXuType.Label2.Caption = "奖励项目:"
ElseIf WageType = "punish" Then
frmGongXuType.Caption = "员工惩罚类型"
frmGongXuType.Frame1.Caption = "惩罚类型信息:"
frmGongXuType.Label2.Caption = "惩罚项目:"
End If
End Sub

Private Sub AddNew()
    Dim adors As New Recordset
    Dim strSQL As String
    adors.ActiveConnection = ADOcn
    
    If txtGongXu = "" Or txtPrice = "" Or txtBeizhu = "" Or txtMonth = "" Then
        MsgBox "请输入完整信息,没有请填“无”!", vbCritical + vbOKOnly, "信息提示"
Else
        If WageType = "reward" Then
        strSQL = "Insert Into 员工奖励表(所属工资月份,员工编号,员工姓名,奖励项目,奖励金额,备注,记录日期) "
        strSQL = strSQL + " Values('" + txtMonth + "','" + txtNum + "','" + txtName + "','" + txtGongXu + "'," + txtPrice + ",'" + txtBeizhu + "','" + CStr(DTPRegistDate.Value) + "')"
        ADOcn.Execute strSQL
        MyRefresh_frmRewardWage
        ElseIf WageType = "punish" Then
        strSQL = "Insert Into 员工惩罚表(所属工资月份,员工编号,员工姓名,惩罚项目,惩罚金额,备注,记录日期) "
        strSQL = strSQL + " Values('" + txtMonth + "','" + txtNum + "','" + txtName + "','" + txtGongXu + "'," + txtPrice + ",'" + txtBeizhu + "','" + CStr(DTPRegistDate.Value) + "')"
        ADOcn.Execute strSQL
        MyRefresh_frmPunishWage
        End If
        Unload Me
    End If
End Sub

Private Sub txtPrice_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 And KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
End If
End Sub

⌨️ 快捷键说明

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