⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.prg

📁 一个很优秀的企业人事管理系统。本软件免费
💻 PRG
📖 第 1 页 / 共 4 页
字号:
		Option1.Name = "Option1", ;
		Option2.FontBold = .T., ;
		Option2.FontSize = 11, ;
		Option2.Caption = "删除某月数据", ;
		Option2.Height = 19, ;
		Option2.Left = 144, ;
		Option2.Top = 10, ;
		Option2.Width = 122, ;
		Option2.AutoSize = .T., ;
		Option2.ForeColor = RGB(255,0,0), ;
		Option2.Name = "Option2"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 413, ;
		Left = 645, ;
		Height = 37, ;
		Width = 73, ;
		FontBold = .T., ;
		FontName = "楷体_GB2312", ;
		FontSize = 14, ;
		Caption = "返回", ;
		ForeColor = RGB(255,0,0), ;
		Name = "Command1"


	PROCEDURE testa
		ok=.T.
		oldp=sys(5)+sys(2003)
		on error ok=.F.
		set defa to a:
		set defa to &oldp
		return ok
	ENDPROC


	PROCEDURE Destroy
		clear event
	ENDPROC


	PROCEDURE pageframe1.Page1.Activate
		select sfjl
		count to sl
		sum 收费 to sfs
		thisform.pageframe1.page1.text1.value=sl
		thisform.pageframe1.page1.text2.value=sfs
	ENDPROC


	PROCEDURE pageframe1.Page2.Activate
		public rb
		thisform.pageframe1.page2.container1.visible=.f.
		thisform.pageframe1.page2.container2.visible=.f.
		thisform.pageframe1.page2.container3.visible=.f.
		thisform.pageframe1.page2.container4.visible=.f.
		thisform.pageframe1.page2.container5.visible=.f.
		thisform.pageframe1.page2.container6.visible=.f.
		thisform.pageframe1.page2.container4.combo1.value=""
		thisform.pageframe1.page2.container5.combo1.value=""
	ENDPROC


	PROCEDURE pageframe1.Page3.Activate
		thisform.pageframe1.page3.grid1.visible=.F.
		thisform.pageframe1.page3.grid2.visible=.F.
		thisform.pageframe1.page3.commandgroup1.visible=.F.
		thisform.pageframe1.page3.commandgroup2.visible=.F.
	ENDPROC


	PROCEDURE pageframe1.Page4.Activate
		thisform.pageframe1.page4.container1.visible=.f.
		thisform.pageframe1.page4.container2.visible=.f.
		thisform.pageframe1.page4.container3.visible=.f.
		thisform.pageframe1.page4.container4.visible=.f.
	ENDPROC


	PROCEDURE command1.Click
		select sfjl
		do form find
		count to sl
		sum 收费 to sfs
		thisform.pageframe1.page1.text1.value=sl
		thisform.pageframe1.page1.text2.value=sfs
		thisform.refresh
	ENDPROC


	PROCEDURE command2.Click
		select sfjl
		report form rep8 preview
	ENDPROC


	PROCEDURE command2.Click
		rb=1
		this.parent.container2.visible=.t.
	ENDPROC


	PROCEDURE command3.Click
		rb=2
		this.parent.container2.visible=.t.
	ENDPROC


	PROCEDURE command4.Click
		this.parent.container3.visible=.t.
	ENDPROC


	PROCEDURE command5.Click
		this.parent.container4.visible=.t.
	ENDPROC


	PROCEDURE command6.Click
		this.parent.container5.visible=.t.
	ENDPROC


	PROCEDURE command7.Click
		this.parent.container6.visible=.t.
	ENDPROC


	PROCEDURE command1.Click
		this.parent.container1.visible=.t.
	ENDPROC


	PROCEDURE text2.GotFocus
		this.value=date()
	ENDPROC


	PROCEDURE command1.Click
		select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		   where 计算日期=this.parent.text2.value and 操作员=this.parent.text1.value ;
		   group by 收费编号 into dbf repsf
		select repsf
		if reccount()=0
		   =messagebox("不存在满足条件的任何数据,无法打印报表",48,"信息提示")
		   return
		endif
		report form rep1 preview
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE text1.GotFocus
		this.value=date()
	ENDPROC


	PROCEDURE command1.Click
		do case
		   case rb=1
		        select 操作员,count(收费编号) as 数量,sum(收费) as 金额 from sfjl;
		          where 计算日期=this.parent.text1.value ;
		          group by 操作员 into dbf repsf1
		        select repsf1
		        if reccount()=0
		           =messagebox("不存在满足条件的任何数据,无法打印报表",48,"信息提示")
		           return
		        endif
		        report form rep2 preview
		   case rb=2
		        select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		          where 计算日期=this.parent.text1.value;
		          group by 收费编号 into dbf repsf
		        select repsf
		        if reccount()=0
		           =messagebox("不存在满足条件的任何数据,无法打印报表",48,"信息提示")
		           return
		        endif
		        report form rep3 preview
		endcase
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE text1.GotFocus
		this.value=year(date())
	ENDPROC


	PROCEDURE command1.Click
		select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		   where year(计算日期)=this.parent.text1.value and month(计算日期)=this.parent.text2.value ;
		   group by 收费编号 into dbf repsf
		select repsf
		if reccount()=0
		   =messagebox("不存在满足条件的任何数据,无法打印报表",48,"信息提示")
		   return
		endif
		report form rep4 preview
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE text2.GotFocus
		this.value=month(date())
	ENDPROC


	PROCEDURE text1.GotFocus
		this.value=year(date())
	ENDPROC


	PROCEDURE command1.Click
		do case
		   case this.parent.combo1.value="第一季度"
		        select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		          where year(计算日期)=this.parent.text1.value and month(计算日期)>=1 and  month(计算日期)<=3;
		          group by 收费编号 into dbf repsf
		   case this.parent.combo1.value="第二季度"
		        select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		          where year(计算日期)=this.parent.text1.value and month(计算日期)>=4 and  month(计算日期)<=6;
		          group by 收费编号 into dbf repsf
		   case this.parent.combo1.value="第三季度"
		        select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		          where year(计算日期)=this.parent.text1.value and month(计算日期)>=7 and  month(计算日期)<=9;
		          group by 收费编号 into dbf repsf
		   case this.parent.combo1.value="第四季度"
		        select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		          where year(计算日期)=this.parent.text1.value and month(计算日期)>=10 and  month(计算日期)<=12;
		          group by 收费编号 into dbf repsf
		endcase
		select repsf
		if reccount()=0
		   =messagebox("不存在满足条件的任何数据,无法打印报表",48,"信息提示")
		   return
		endif
		report form rep5 preview
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE text1.GotFocus
		this.value=year(date())
	ENDPROC


	PROCEDURE command1.Click
		do case
		   case this.parent.combo1.value="上半年"
		        select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		          where year(计算日期)=this.parent.text1.value and month(计算日期)>=1 and  month(计算日期)<=6;
		          group by 收费编号 into dbf repsf
		   case this.parent.combo1.value="下半年"
		        select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		          where year(计算日期)=this.parent.text1.value and month(计算日期)>=7 and  month(计算日期)<=12;
		          group by 收费编号 into dbf repsf
		endcase
		select repsf
		if reccount()=0
		   =messagebox("不存在满足条件的任何数据,无法打印报表",48,"信息提示")
		   return
		endif
		report form rep6 preview
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE text1.GotFocus
		this.value=year(date())
	ENDPROC


	PROCEDURE command1.Click
		select 收费编号,收费,count(收费编号) as 数量,sum(收费) as 金额 from sfjl ;
		          where year(计算日期)=this.parent.text1.value ;
		          group by 收费编号 into dbf repsf
		select repsf
		if reccount()=0
		   =messagebox("不存在满足条件的任何数据,无法打印报表",48,"信息提示")
		   return
		endif
		report form rep7 preview
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE command1.Click
		thisform.pageframe1.page3.grid2.visible=.F.
		thisform.pageframe1.page3.commandgroup2.visible=.F.
		select sfbz
		go top
		thisform.pageframe1.page3.grid1.visible=.T.
		thisform.pageframe1.page3.commandgroup1.visible=.T.
	ENDPROC


	PROCEDURE command2.Click
		thisform.pageframe1.page3.grid1.visible=.F.
		thisform.pageframe1.page3.commandgroup1.visible=.F.
		select oper
		go top
		thisform.pageframe1.page3.grid2.visible=.T.
		thisform.pageframe1.page3.commandgroup2.visible=.T.
	ENDPROC


	PROCEDURE commandgroup1.Command1.Click
		append blank
		thisform.pageframe1.page3.grid1.setfocus
	ENDPROC


	PROCEDURE commandgroup1.Command2.Click
		delete
		thisform.pageframe1.page3.refresh
	ENDPROC


	PROCEDURE commandgroup2.Command1.Click
		append blank
		thisform.pageframe1.page3.grid2.setfocus
	ENDPROC


	PROCEDURE commandgroup2.Command2.Click
		delete
		thisform.pageframe1.page3.refresh
	ENDPROC


	PROCEDURE command2.Click
		thisform.pageframe1.page4.container2.visible=.t.
	ENDPROC


	PROCEDURE command3.Click
		this.parent.container3.optiongroup1.value=0
		thisform.pageframe1.page4.container3.visible=.t.
	ENDPROC


	PROCEDURE command1.Click
		thisform.pageframe1.page4.container1.visible=.t.
	ENDPROC


	PROCEDURE text1.Click
		this.value=date()
	ENDPROC


	PROCEDURE command1.Click
		if thisform.testa()=.F.
		    =messagebox("请将要一张空白软盘插入到A驱动器中后再选择本选项",48,"提示信息")
		    return
		endif
		select sfjl
		locate for 日期=this.parent.text1.value
		if !found()
		   =messagebox("不存在{"+dtoc(this.parent.text1.value)+"}的数据,不能转出",48,"信息提示")
		   return
		endif
		fn=alltrim(str(year(this.parent.text1.value))+"-"+alltrim(str(month(this.parent.text1.value))) ;
		            +"-"+alltrim(str(day(this.parent.text1.value))))
		select sfjl
		copy to a:&fn. for 日期=this.parent.text1.value
		=messagebox("数  据  转  出  完  毕!",48+0,"信息提示")
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE text1.Click
		this.value=date()
	ENDPROC


	PROCEDURE command1.Click
		if thisform.testa()=.F.
		    =messagebox("请将要转入数据的软盘插入到A驱动器中后再选择本选项",48,"提示信息")
		    return
		endif
		curpath=sys(5)+sys(2003)
		set defau to a:
		fn=alltrim(str(year(this.parent.text1.value))+"-"+alltrim(str(month(this.parent.text1.value))) ;
		            +"-"+alltrim(str(day(this.parent.text1.value))))
		if !file(fn+".dbf")
		    =messagebox("你的软盘不包含要转入的数据,请插入正确的软盘后再选择本选项",48,"提示信息")
		    set defau to (curpath)
		    return
		endif
		set defau to (curpath)
		select sfjl
		locate for 日期=this.parent.text1.value
		if found()
		   =messagebox("已包含该日期的数据,不能转入",48,"信息提示")
		   return
		endif
		append from a:&fn.
		=messagebox("数  据  转  入  完  毕 !",48+0,"信息提示")
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE text1.Click
		this.value=date()
	ENDPROC


	PROCEDURE command1.Click
		select sfjl
		do case
		   case this.parent.optiongroup1.value=1
		        locate for 日期=this.parent.text1.value
		        if !found()
		           =messagebox("没有该日期的收费数据,不能进行逻辑删除",48,"信息提示")
		           return
		        endif
		        delete for 日期=this.parent.text1.value
		        =messagebox("指定的数据删除完毕",48,"信息提示")
		   case this.parent.optiongroup1.value=1
		        locate for year(日期)=year(this.parent.text1.value) and month(日期)=month(this.parent.text1.value)
		        if !found()
		           =messagebox("没有该年月的收费数据,不能进行逻辑删除",48,"信息提示")
		           return
		        endif
		        delete for year(日期)=year(this.parent.text1.value) and month(日期)=month(this.parent.text1.value)
		        =messagebox("指定的数据删除完毕",48,"信息提示")
		endcase
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE optiongroup1.InteractiveChange
		this.parent.text1.enabled=.t.
	ENDPROC


	PROCEDURE command4.Click
		this.parent.container4.optiongroup1.value=0
		thisform.pageframe1.page4.container4.visible=.t.
	ENDPROC


	PROCEDURE text1.Click
		this.value=date()
	ENDPROC


	PROCEDURE command1.Click
		set delete off
		select sfjl
		do case
		   case this.parent.optiongroup1.value=1
		        locate for 日期=this.parent.text1.value
		        if !found()
		           =messagebox("没有该日期的被删数据,不能进行逻辑恢复",48,"信息提示")
		           return
		        endif
		        recall for 日期=this.parent.text1.value
		        =messagebox("指定的数据恢复完毕",48,"信息提示")
		   case this.parent.optiongroup1.value=1
		        locate for year(日期)=year(this.parent.text1.value) and month(日期)=month(this.parent.text1.value)
		        if !found()
		           =messagebox("没有该年月的被删数据,不能进行逻辑恢复",48,"信息提示")
		           return
		        endif
		        delete for year(日期)=year(this.parent.text1.value) and month(日期)=month(this.parent.text1.value)
		        =messagebox("指定的数据恢复完毕",48,"信息提示")
		endcase
		set delete on
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE command2.Click
		this.parent.visible=.f.
	ENDPROC


	PROCEDURE optiongroup1.InteractiveChange
		this.parent.text1.enabled=.t.
	ENDPROC


	PROCEDURE command1.Click
		thisform.release
	ENDPROC


ENDDEFINE
*
*-- 结束定义: main
**************************************************

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -