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

📄 frmaddjob.frm

📁 企业人事管理系统,有考勤,人员管理等功能,值得研究,也是我付费弄来的,绝对超值
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Begin VB.Form frmAddJob 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "添加工作记录"
   ClientHeight    =   3270
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6480
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3270
   ScaleWidth      =   6480
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame2 
      Height          =   735
      Left            =   0
      TabIndex        =   13
      Top             =   2400
      Width           =   6255
      Begin MSForms.CommandButton cmdOK 
         Height          =   375
         Left            =   1080
         TabIndex        =   16
         Top             =   240
         Width           =   1095
         Caption         =   "确定"
         PicturePosition =   327683
         Size            =   "1931;661"
         Picture         =   "frmAddJob.frx":0000
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
         ParagraphAlign  =   3
      End
      Begin MSForms.CommandButton cmdExit 
         Height          =   375
         Left            =   4125
         TabIndex        =   15
         Top             =   240
         Width           =   1095
         Caption         =   "返回"
         PicturePosition =   327683
         Size            =   "1931;661"
         Picture         =   "frmAddJob.frx":039A
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
         ParagraphAlign  =   3
      End
      Begin MSForms.CommandButton cmdClear 
         Height          =   375
         Left            =   2610
         TabIndex        =   14
         Top             =   240
         Width           =   1095
         Caption         =   "清空"
         PicturePosition =   327683
         Size            =   "1931;661"
         Picture         =   "frmAddJob.frx":25D4
         FontName        =   "宋体"
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   34
         ParagraphAlign  =   3
      End
   End
   Begin VB.Frame Frame1 
      Height          =   2295
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   6255
      Begin VB.CheckBox chkTM 
         Caption         =   "透明"
         Height          =   255
         Left            =   5400
         TabIndex        =   17
         Top             =   0
         Width           =   855
      End
      Begin VB.TextBox txtJB 
         Height          =   270
         Left            =   4440
         MaxLength       =   30
         TabIndex        =   11
         Top             =   1680
         Width           =   1335
      End
      Begin VB.TextBox txtZW 
         Height          =   270
         Left            =   1440
         MaxLength       =   30
         TabIndex        =   10
         Top             =   1680
         Width           =   1335
      End
      Begin VB.TextBox txtBM 
         Height          =   270
         Left            =   4440
         MaxLength       =   30
         TabIndex        =   8
         Top             =   960
         Width           =   1335
      End
      Begin VB.TextBox txtDW 
         Height          =   270
         Left            =   1440
         MaxLength       =   30
         TabIndex        =   5
         Top             =   960
         Width           =   1335
      End
      Begin MSComCtl2.DTPicker dtpET 
         Height          =   270
         Left            =   4440
         TabIndex        =   3
         Top             =   360
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   476
         _Version        =   393216
         Format          =   41943041
         CurrentDate     =   38074
      End
      Begin MSComCtl2.DTPicker dtpBT 
         Height          =   270
         Left            =   1440
         TabIndex        =   2
         Top             =   360
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   476
         _Version        =   393216
         Format          =   41943041
         CurrentDate     =   38074
      End
      Begin VB.Label Label6 
         Caption         =   "级   别"
         Height          =   255
         Left            =   3240
         TabIndex        =   12
         Top             =   1680
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "担任职务"
         Height          =   255
         Left            =   360
         TabIndex        =   9
         Top             =   1680
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "部门名称"
         Height          =   255
         Left            =   3240
         TabIndex        =   7
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "工作单位"
         Height          =   255
         Left            =   360
         TabIndex        =   6
         Top             =   960
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "结束时间"
         Height          =   375
         Left            =   3240
         TabIndex        =   4
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "开始时间"
         Height          =   255
         Left            =   360
         TabIndex        =   1
         Top             =   360
         Width           =   735
      End
   End
End
Attribute VB_Name = "frmAddJob"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public gh As String
Private Sub chkTM_Click()
   If chkTM.Value = 1 Then
       Call DarkMe(Me, 200)
      Me.Refresh
   Else
       Call DarkMe(Me, 255)
       Me.Refresh
   End If
End Sub

Private Sub cmdClear_Click()
   txtDW = ""
   txtBM = ""
   txtZW = ""
   txtJB = ""
End Sub

Private Sub cmdExit_Click()
  Unload Me
End Sub

Private Sub cmdOk_Click()
Dim strSql As String
Dim strMsg As String
Dim rs As ADODB.Recordset

  If dtpBT.Value > dtpET.Value Then
    TextFocus dtpBT
    Exit Sub
  End If
  
  If txtDW.Text = "" Then
    MsgBox "工作单位不能为空"
    TextFocus txtDW
    Exit Sub
  End If
  
  strSql = "select * from t_job where 工号='" & gh & "'"
  Set rs = ExecuteSQL(strSql, strMsg)
  
  rs.AddNew
  rs.Fields("工号").Value = gh
  rs.Fields("开始时间").Value = dtpBT.Value
  rs.Fields("结束时间").Value = dtpET.Value
  rs.Fields("工作单位").Value = fitobj(txtDW)
  rs.Fields("部门名称").Value = fitobj(txtBM)
  rs.Fields("担任职务").Value = fitobj(txtZW)
  rs.Fields("级别").Value = fitobj(txtJB)
  
  rs.Update
  
  rs.Close
  Set rs = Nothing
  
  MsgBox "添加成功"
  Call frmRS.showJob(gh)
End Sub

Private Sub Form_Load()
  Call DarkMe(Me, 255)
  Me.Refresh
End Sub

'文本型
Private Function fitobj(objControl As Control)
  Dim v As String
  v = Trim(objControl)
  If v = "" Then
    fitobj = Null
  Else
    fitobj = v
  End If
End Function

Private Sub txtZW_Change()

End Sub

⌨️ 快捷键说明

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