📄 frmsal.frm
字号:
Left = 840
TabIndex = 13
Top = 1440
Width = 375
End
Begin VB.Label Label1
Caption = "May:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 10
Left = 3480
TabIndex = 12
Top = 1440
Width = 375
End
Begin VB.Label Label1
Caption = "Mar:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 9
Left = 6240
TabIndex = 11
Top = 960
Width = 375
End
Begin VB.Label Label1
Caption = "Jul:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 8
Left = 840
TabIndex = 10
Top = 1920
Width = 375
End
Begin VB.Label Label1
Caption = "Sep:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 7
Left = 6240
TabIndex = 9
Top = 1920
Width = 375
End
Begin VB.Label Label1
Caption = "Jun:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 6
Left = 6240
TabIndex = 8
Top = 1440
Width = 375
End
Begin VB.Label Label1
Caption = "Oct:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 5
Left = 840
TabIndex = 7
Top = 2400
Width = 375
End
Begin VB.Label Label1
Caption = "Aug:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 4
Left = 3480
TabIndex = 6
Top = 1920
Width = 375
End
Begin VB.Label Label1
Caption = "Dec:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 3
Left = 6240
TabIndex = 5
Top = 2400
Width = 375
End
Begin VB.Label Label1
Caption = "Nov:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 3480
TabIndex = 4
Top = 2400
Width = 375
End
Begin VB.Label Label1
Caption = "Entity Code:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 240
TabIndex = 2
Top = 390
Width = 1095
End
End
Begin FPSpread.vaSpread vasent
Height = 2955
Left = 120
TabIndex = 0
Top = 720
Width = 9000
_Version = 131077
_ExtentX = 15875
_ExtentY = 5212
_StockProps = 64
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MaxCols = 1
MaxRows = 1
SpreadDesigner = "frmSal.frx":0000
End
Begin VB.Label lblstatus
Height = 255
Left = 8040
TabIndex = 32
Top = 3000
Width = 735
End
End
Attribute VB_Name = "frmSal"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mkey As String
Dim lCurRow As Integer
Dim lCurCol As Integer
Private Sub Form_Load()
vasent.Width = SpreadW
vasent.Height = SpreadH
cmbcode.AddItem ("SAL")
cmbcode.AddItem ("DEP")
Call InitToolBar
Call initspread
Call initcolbobox
Call vasshow
' If vasent.DataRowCnt > 0 Then
' lCurRow = 1
' lCurCol = 1
' Call vasshow
' frminput.Enabled = False
' End If
End Sub
Private Sub initcolbobox()
Dim year As Integer
Dim syear As String
syear = Format(Now, "yyyy-mm-dd")
syear = LTrim(syear)
syear = Left(syear, 4)
year = Int(syear)
cmbyear.AddItem (syear)
year = year + 1
syear = str(year)
syear = LTrim(syear)
cmbyear.AddItem (syear)
End Sub
Private Sub initspread()
With vasent
.MaxRows = 0
.MaxCols = 15 'enuDetailCols.MaxCols
.ShadowColor = genuBACKCOLOR.CST_Grid_LostFocus
.Row = -1: .Col = -1
.BackColor = genuBACKCOLOR.CST_Grid_LostFocus
.GridColor = vbBlack
End With
Call SetSpreadHead
lockspread vasent, True
End Sub
Private Sub SetSpreadHead()
SetColHead vasent, 1, "Entity Code", 10
SetColHead vasent, 2, "Salary Code", 10
SetColHead vasent, 3, "Year", 8
SetColHead vasent, 4, "January", 10
SetColHead vasent, 5, "February", 10
SetColHead vasent, 6, "March", 10
SetColHead vasent, 7, "April", 10
SetColHead vasent, 8, "May", 10
SetColHead vasent, 9, "June", 10
SetColHead vasent, 10, "July", 10
SetColHead vasent, 11, "August", 10
SetColHead vasent, 12, "September", 10
SetColHead vasent, 13, "October", 10
SetColHead vasent, 14, "November", 10
SetColHead vasent, 15, "December", 10
End Sub
Private Sub vasshow()
Dim rstent As Recordset
Dim sSQL As String
Dim lrow As Integer
sSQL = "select * from syssal"
Set rstent = Acs_cnt.Execute(sSQL)
vasent.MaxRows = 0
lrow = 0
Do While Not rstent.EOF
vasent.MaxRows = vasent.MaxRows + 1
lrow = lrow + 1
SetValue vasent, lrow, 1, gsEntCode
SetValue vasent, lrow, 2, rstent!salcode
SetValue vasent, lrow, 3, rstent!salyear
SetValue vasent, lrow, 4, rstent!perio01
SetValue vasent, lrow, 5, rstent!perio02
SetValue vasent, lrow, 6, rstent!perio03
SetValue vasent, lrow, 7, rstent!perio04
SetValue vasent, lrow, 8, rstent!perio05
SetValue vasent, lrow, 9, rstent!perio06
SetValue vasent, lrow, 10, rstent!perio07
SetValue vasent, lrow, 11, rstent!perio08
SetValue vasent, lrow, 12, rstent!perio09
SetValue vasent, lrow, 13, rstent!perio10
SetValue vasent, lrow, 14, rstent!perio11
SetValue vasent, lrow, 15, rstent!perio12
rstent.MoveNext
Loop
rstent.Close
Set rstent = Nothing
If vasent.MaxRows > 0 Then
lCurCol = 1
lCurRow = 1
Call vasent_Click(lCurCol, lCurRow)
End If
End Sub
Private Sub InitToolBar()
With UserControl1
.DisplayButton "New", "New", True, , "New"
.DisplayButton "Delete", "Delete", True, , "Delete"
.DisplayButton "Save", "Save", False, , "Save"
.DisplayButton "Modify", "Modify", True, , "Modify"
.DisplayButton "Cancel", "Cancel", False, , "Cancel"
'.DisplayButton "Redo", "Redo", False, , "Redo"
'.DisplayButton "Find", "Find", True, , "Find"
'.DisplayButton "Print", "Print", True, , "Print"
.DisplayButton "Close", "Close", True, , "Close"
End With
Call EnableDelete(gsRoleCode, UserControl1)
End Sub
Private Sub SetToolBar(ByVal mkey As String)
Select Case mkey
Case "new"
With UserControl1
.DisplayButton "New", "New", False, , "New"
.DisplayButton "Delete", "Delete", False, , "Delete"
'.DisplayButton "Find", "Find", False, , "Find"
'.DisplayButton "Print", "Print", False, , "Print"
.DisplayButton "Modify", "Modify", False, , "Modify"
.DisplayButton "Save", "Save", True, , "Save"
.DisplayButton "Cancel", "Cancel", True, , "Cancel"
'.DisplayButton "Redo", "Redo", True, , "Redo"
.DisplayButton "Close", "Close", False, , "Close"
'Call ChangeColor(vasent, vasent.ActiveRow, -1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -