?? frmevaman.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmEvaMan
BorderStyle = 1 'Fixed Single
Caption = "員工考評信息管理"
ClientHeight = 9465
ClientLeft = 45
ClientTop = 330
ClientWidth = 15270
Icon = "FrmEvaMan.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 9465
ScaleWidth = 15270
WindowState = 2 'Maximized
Begin VB.ComboBox ComboY
Height = 315
Left = 3720
TabIndex = 0
Text = "Combo1"
Top = 600
Width = 1095
End
Begin VB.ComboBox ComboM
Height = 315
Left = 4920
TabIndex = 1
Text = "Combo1"
Top = 600
Width = 735
End
Begin VB.ComboBox ComboDep
Height = 315
Left = 10080
TabIndex = 2
Text = "Combo1"
Top = 600
Width = 1815
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "FrmEvaMan.frx":0CCA
Height = 6735
Left = 840
TabIndex = 3
Top = 1200
Width = 13575
_ExtentX = 23945
_ExtentY = 11880
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 4080
Top = 8040
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label LblAdd
BackStyle = 0 'Transparent
Caption = "添加"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 6240
MouseIcon = "FrmEvaMan.frx":0CDF
MousePointer = 99 'Custom
TabIndex = 9
Top = 8160
Width = 615
End
Begin VB.Image Image5
Height = 300
Left = 5640
Picture = "FrmEvaMan.frx":0FE9
Top = 8160
Width = 300
End
Begin VB.Label LblModify
BackStyle = 0 'Transparent
Caption = "修改"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 7800
MouseIcon = "FrmEvaMan.frx":1405
MousePointer = 99 'Custom
TabIndex = 8
Top = 8160
Width = 615
End
Begin VB.Image Image2
Height = 300
Left = 7200
Picture = "FrmEvaMan.frx":170F
Top = 8160
Width = 300
End
Begin VB.Label LblDelete
BackStyle = 0 'Transparent
Caption = "刪除"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 9240
MouseIcon = "FrmEvaMan.frx":1B2B
MousePointer = 99 'Custom
TabIndex = 7
Top = 8160
Width = 615
End
Begin VB.Image Image3
Height = 300
Left = 8640
Picture = "FrmEvaMan.frx":1E35
Top = 8160
Width = 300
End
Begin VB.Label LblBack
BackStyle = 0 'Transparent
Caption = "返回"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 10680
MouseIcon = "FrmEvaMan.frx":2251
MousePointer = 99 'Custom
TabIndex = 6
Top = 8160
Width = 615
End
Begin VB.Image Image4
Height = 300
Left = 10080
Picture = "FrmEvaMan.frx":255B
Top = 8160
Width = 300
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "選擇月份"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 2640
TabIndex = 5
Top = 660
Width = 1020
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "選擇部門"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 8880
TabIndex = 4
Top = 660
Width = 1020
End
End
Attribute VB_Name = "FrmEvaMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Refresh_Eva()
' If CurDep.Dep_Id <= 0 Then
' DataGrid1.Visible = False
' Exit Sub
' End If
' DataGrid1.Visible = True
Adodc1.RecordSource = "SELECT e.Emp_Id as 員工編號," _
+ "e.Emp_Name as 員工姓名, c.Performance as 工作業績," _
+ "c.HrEvaluation as 評價," _
+ "c.PrizeFactor2 as 獎金系數" _
+ " FROM Employees e, Evaluation c WHERE c.EvaMonth='" _
+ ComboY.Text + "-" + ComboM.Text + "' And e.Emp_Id=c.Emp_Id" _
+ " And e.Dep_Id=" + Trim(Str(CurDep.Dep_Id))
' + "c.SupervisorEvaluation as 領導評價," _
' + "c.PrizeFactor1 as 領導獎金系數," _
Adodc1.Refresh
If ComboDep.Text <> "" Then
LblAdd.Enabled = True
LblModify.Enabled = True
LblDelete.Enabled = True
End If
End Sub
Private Sub ComboDep_GotFocus()
ComboY.SetFocus
'設置frmdepsel窗體的位置
FrmDepSel.Left = Me.Left + ComboDep.Left + 350 - FrmDepSel.Width
FrmDepSel.Top = Me.Top + ComboDep.Top + ComboDep.Height + 450
FrmDepSel.Show 1
'將選擇的員工姓名顯示到ComboUpper控件中
ComboDep.Text = CurDep.Dep_name
Refresh_Eva
End Sub
Private Sub ComboM_Click()
Refresh_Eva
End Sub
Private Sub ComboY_Click()
Refresh_Eva
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
Adodc1.RecordSource = "SELECT * FROM Checkin"
Adodc1.Refresh
Dim yy, mm As Integer
For i = 1999 To 2100
ComboY.AddItem Trim(Str(i))
Next
For i = 1 To 12
ComboM.AddItem Trim(Str(i))
Next
yy = Year(Now)
If yy > 1998 And yy < 2101 Then
ComboY.Text = Trim(Str(yy))
End If
mm = Month(Now)
If mm > 0 And mm < 13 Then
ComboM.Text = Trim(Str(mm))
End If
ComboDep.Text = ""
CurDep.Init
LblAdd.Enabled = False
LblModify.Enabled = False
LblDelete.Enabled = False
Refresh_Eva
End Sub
Private Sub LblAdd_Click()
FrmEvaEdit.lblMonth = ComboY.Text + "-" + ComboM.Text
UpperEmp.Init
FrmEvaEdit.ComboName.Text = ""
FrmEvaEdit.txtEva = ""
FrmEvaEdit.txtPerformance = ""
FrmEvaEdit.ComboFactor.Text = "100"
FrmEvaEdit.HrFlag = True
' FrmEvaEdit.Label11 = "人事部門評價"
FrmEvaEdit.Modify = False
FrmEvaEdit.Show 1
If FrmEvaEdit.TmpOk = True Then
ComboDep.Text = CurDep.Dep_name
Refresh_Eva
End If
End Sub
Private Sub LblBack_Click()
Unload Me
End Sub
Private Sub LblDelete_Click()
Dim TmpId As Long
If Adodc1.Recordset.BOF = True Then
MsgBox "請選擇記錄"
Exit Sub
End If
TmpId = Adodc1.Recordset.Fields(0)
If MsgBox("是否刪除當前行?", vbYesNo, "確認") = vbYes Then
Call MyEva.Delete(ComboY.Text + "-" + ComboM.Text, TmpId)
End If
Refresh_Eva
End Sub
Private Sub LblModify_Click()
If Adodc1.Recordset.BOF = True Then
MsgBox "請選擇記錄"
Exit Sub
End If
'初始化frmevaedit信息
FrmEvaEdit.lblMonth = ComboY.Text + "-" + ComboM.Text
FrmEvaEdit.OriEmpId = Adodc1.Recordset.Fields(0)
UpperEmp.Emp_Id = FrmEvaEdit.OriEmpId
UpperEmp.GetInfo (UpperEmp.Emp_Id)
FrmEvaEdit.ComboName.Text = UpperEmp.Emp_Name
FrmEvaEdit.txtPerformance = Adodc1.Recordset.Fields(2)
' If (Check1.Visible = True And Check1.Value = 1) Or Check1.Visible = False Then
' FrmEvaEdit.HrFlag = False
' FrmEvaEdit.txtEva = Adodc1.Recordset.Fields(3)
' FrmEvaEdit.ComboFactor.Text = Adodc1.Recordset.Fields(4)
' Else
FrmEvaEdit.HrFlag = True
FrmEvaEdit.Label11 = "評價"
FrmEvaEdit.txtEva = Adodc1.Recordset.Fields(3)
FrmEvaEdit.ComboFactor.Text = Adodc1.Recordset.Fields(4)
' End If
FrmEvaEdit.Modify = True
FrmEvaEdit.Show 1
If FrmEvaEdit.TmpOk = True Then
ComboDep.Text = CurDep.Dep_name
Refresh_Eva
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -