📄 gz12.prg
字号:
**************************************************
*-- 类: gz12 (e:\gz\user.vcx)
*-- 父类: form
*-- 基类: form
*
DEFINE CLASS gz12 AS form
Top = 145
Left = 193
DoCreate = .T.
Caption = "复制上月工资"
WindowType = 1
Name = "Form1"
ADD OBJECT label1 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontSize = 12, ;
Caption = "当前月份:", ;
Height = 20, ;
Left = 60, ;
Top = 124, ;
Width = 80, ;
ForeColor = RGB(0,0,255), ;
Name = "Label1"
ADD OBJECT text1 AS textbox WITH ;
FontSize = 12, ;
Height = 25, ;
Left = 149, ;
Top = 119, ;
Width = 51, ;
Name = "Text1"
ADD OBJECT label2 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontSize = 12, ;
Caption = "年", ;
Height = 20, ;
Left = 213, ;
Top = 122, ;
Width = 20, ;
ForeColor = RGB(0,0,255), ;
Name = "Label2"
ADD OBJECT text2 AS textbox WITH ;
FontSize = 12, ;
Height = 25, ;
Left = 244, ;
Top = 118, ;
Width = 30, ;
Name = "Text2"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 169, ;
Left = 86, ;
Height = 35, ;
Width = 74, ;
FontBold = .T., ;
FontName = "楷体_GB2312", ;
FontSize = 18, ;
Caption = "确定", ;
ForeColor = RGB(255,0,0), ;
Name = "Command1"
ADD OBJECT label3 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontSize = 12, ;
Caption = "月", ;
Height = 20, ;
Left = 286, ;
Top = 122, ;
Width = 20, ;
ForeColor = RGB(0,0,255), ;
Name = "Label3"
ADD OBJECT command2 AS commandbutton WITH ;
Top = 169, ;
Left = 208, ;
Height = 35, ;
Width = 74, ;
FontBold = .T., ;
FontName = "楷体_GB2312", ;
FontSize = 18, ;
Caption = "取消", ;
ForeColor = RGB(255,0,0), ;
Name = "Command2"
ADD OBJECT shape1 AS shape WITH ;
Top = 18, ;
Left = 36, ;
Height = 79, ;
Width = 301, ;
SpecialEffect = 0, ;
Name = "Shape1"
ADD OBJECT label4 AS label WITH ;
FontBold = .T., ;
FontSize = 11, ;
WordWrap = .T., ;
Caption = "复制上月工资是将所有上个月的工资记录全部复制到本月。然后用户对本月工资进行修改。但本月已输入的工资记录全部覆盖掉。", ;
Height = 60, ;
Left = 54, ;
Top = 25, ;
Width = 259, ;
ForeColor = RGB(255,0,0), ;
Name = "Label4"
PROCEDURE Init
thisform.text1.value=year(date())
thisform.text2.value=month(date())
ENDPROC
PROCEDURE command1.Click
select gzb
if thisform.text2.value=1
preyf=thisform.text1.value-1
premf=12
else
preyf=thisform.text1.value
premf=thisform.text2.value-1
endif
locate for 年份=preyf and 月份=premf
if !found()
=messagebox("不存在上一月份的工资记录",48,"信息提示")
else
copy to temp for 年份=preyf and 月份=premf
use temp in 0
select temp
repl all 输入日期 with date(),年份 with thisform.text1.value,月份 with thisform.text2.value
select gzb
delete for 年份=thisform.text1.value and 月份=thisform.text2.value
append from temp
use in temp
endif
thisform.release
ENDPROC
PROCEDURE command2.Click
thisform.release
ENDPROC
ENDDEFINE
*
*-- 结束定义: gz12
**************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -