?? frmemployeeinsert.frm
字號:
VERSION 5.00
Begin VB.Form frmEmployeeInsert
BorderStyle = 3 'Fixed Dialog
Caption = "新加員工"
ClientHeight = 6975
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 9960
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6975
ScaleWidth = 9960
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.ComboBox cbLogon
Height = 315
Left = 5520
Style = 2 'Dropdown List
TabIndex = 13
Top = 3120
Width = 2295
End
Begin VB.TextBox txtPassword
Height = 375
IMEMode = 3 'DISABLE
Left = 2160
MaxLength = 20
PasswordChar = "*"
TabIndex = 11
Top = 3120
Width = 1455
End
Begin VB.TextBox txtDept
Height = 375
Left = 5520
MaxLength = 20
TabIndex = 10
Top = 2520
Width = 2295
End
Begin VB.TextBox txtLogin
Height = 375
IMEMode = 3 'DISABLE
Left = 2160
MaxLength = 20
TabIndex = 8
Top = 2520
Width = 1455
End
Begin VB.TextBox txtName
Height = 375
Left = 5520
MaxLength = 20
TabIndex = 6
Top = 1920
Width = 2295
End
Begin VB.TextBox txtNo
Height = 375
Left = 2160
MaxLength = 10
TabIndex = 4
Top = 1920
Width = 1455
End
Begin VB.CommandButton cmdApply
Caption = "應用"
Height = 375
Left = 8430
TabIndex = 2
Top = 6360
Width = 1095
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 375
Left = 7200
TabIndex = 1
Top = 6360
Width = 1095
End
Begin VB.CommandButton cmdOK
Caption = "確定"
Height = 375
Left = 6000
TabIndex = 0
Top = 6360
Width = 1095
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "系統用戶"
Height = 195
Left = 4680
TabIndex = 14
Top = 3120
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "密碼"
Height = 195
Left = 1320
TabIndex = 12
Top = 3120
Width = 360
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "部門"
Height = 195
Left = 4680
TabIndex = 9
Top = 2520
Width = 360
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "登錄名"
Height = 195
Left = 1320
TabIndex = 7
Top = 2520
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "員工名稱"
Height = 195
Left = 4680
TabIndex = 5
Top = 1920
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "員工編號"
Height = 195
Left = 1320
TabIndex = 3
Top = 1920
Width = 720
End
End
Attribute VB_Name = "frmEmployeeInsert"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdApply_Click()
'新加員工
Dim sSQL As String
Dim ID As String
ID = newGUID
sSQL = "insert into hrEmployee(ID,No,Name,LoginName,Password,Logon," & _
"Department,OperatorID,CreateDate,ModifyDate) values(" + CheckString(ID) + _
"," + CheckString(Trim(txtNo.Text)) + "," + CheckString(Trim(txtName.Text)) + _
"," + CheckString(Trim(txtLogin)) + "," + CheckString(Trim(txtPassword.Text)) + _
"," & CheckString(Me.cbLogon.Text) & "," + CheckString(Trim(txtDept.Text)) + "," + CheckString(g_sUserID) + _
",getDate(),getDate())"
g_cn.Execute sSQL
frmEmployee.RefreshData
End Sub
Private Sub cmdCancel_Click()
Unload Me
frmEmployee.RefreshData
End Sub
Private Sub cmdOK_Click()
'新加員工
Dim sSQL As String
Dim ID As String
ID = newGUID
sSQL = "insert into hrEmployee(ID,No,Name,LoginName,Password,Logon," & _
"Department,OperatorID,CreateDate,ModifyDate) values(" + CheckString(ID) + _
"," + CheckString(Trim(txtNo.Text)) + "," + CheckString(Trim(txtName.Text)) + _
"," + CheckString(Trim(txtLogin)) + "," + CheckString(Trim(txtPassword.Text)) + _
"," & CheckString(Me.cbLogon.Text) & "," + CheckString(Trim(txtDept.Text)) + "," + CheckString(g_sUserID) + _
",getDate(),getDate())"
g_cn.Execute sSQL
Unload Me
frmEmployee.RefreshData
End Sub
Private Sub Form_Load()
'center the form
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
Me.cbLogon.AddItem "是"
Me.cbLogon.AddItem "否"
Me.cbLogon.ListIndex = 0
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -