?? frmaddjob.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 = "擔任職務(wù)"
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 = "結(jié)束時間"
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("結(jié)束時間").Value = dtpET.Value
rs.Fields("工作單位").Value = fitobj(txtDW)
rs.Fields("部門名稱").Value = fitobj(txtBM)
rs.Fields("擔任職務(wù)").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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -