📄 yongdianguanlixitong.txt
字号:
对象 command2 过程 click
GO BOTTOM
THISFORM.pageframe1.page1.COMMANDGROUP1.COMMAND2.ENABLED=.F.
THISFORM.pageframe1.page1.COMMANDGROUP1.COMMAND1.ENABLED=.T.
THISFORM.REFRESH()
对象 command1 过程 click
set exact on
a=alltrim(thisform.pageframe1.page2.text1.value)
b=alltrim(thisform.pageframe1.page2.text2.value)
c=alltrim(thisform.pageframe1.page2.text3.value)
d=alltrim(thisform.pageframe1.page2.text4.value)
e=alltrim(thisform.pageframe1.page2.text5.value)
if thisform.pageframe1.page2.optiongroup1.option1.value=1
if a = ""
messagebox("企业编号不能为空")
else
store a to indexa
SELECT DISTINCT _a.cno as 企业编号,_a.cname as 企业名,;
_a.caddress as 企业地址, _a.ctel as 电话号码, _a.crp as 联系人,;
_a.jan as 一月用电量,_a.jan*_c.jan as 一月电费, _a.feb as 二月用电量,;
_a.feb*_c.feb as 二月电费, _a.mar as 三月用电量, _a.mar*_c.mar as 三月电费,;
_a.apr as 四月用电量,_a.apr*_c.apr as 四月电费, _a.may as 五月用电量,;
_a.may*_c.may as 五月电费, _a.jun as 六月用电量, _a.jun*_c.jun as 六月电费,;
_a.jul as 七月用电量, _a.jul* _c.jul as 七月电费,_a.aug as 八月用电量,;
_a.aug*_c.aug as 八月电费,_a.sep as 九月用电量, _a.sep*_c.sep as 九月电费,;
_a.oct as 十月用电量,_a.oct*_c.oct as 十月电费, _a.nov as 十一月用电量,;
_a.nov*_c.nov as 十一月电费, _a.dec as 十二月用电量,;
_a.dec*_c.dec as 十二月电费,;
_a.jan+_a.feb+_a.mar+_a.apr+_a.may+_a.jun+_a.jul+_a.aug+_a.sep+_a.oct+_a.nov+_a.dec as 合计年用电量,;
ROUND(_a.jan*_c.jan+_c.feb*_a.feb+_a.mar*_c.mar+_a.apr*_c.apr+_c.may*_a.may+_a.jun*_c.jun+_c.jul*_a.jul+;
_a.aug*_c.aug+_a.sep*_c.sep+_c.oct*_a.oct+_a.nov*_c.nov+_c.dec*_a.dec,2) as 合计年电费;
FROM 用电管理系统!a _a, 用电管理系统!c _c;
where a=_a.cno;
ORDER BY _a.cno
endif
endif
if thisform.pageframe1.page2.optiongroup1.option2.value=1
if b= ""
messagebox("企业名不能为空")
else
SELECT DISTINCT _a.cno as 企业编号,_a.cname as 企业名,;
_a.caddress as 企业地址, _a.ctel as 电话号码, _a.crp as 联系人,;
_a.jan as 一月用电量,_a.jan*_c.jan as 一月电费, _a.feb as 二月用电量,;
_a.feb*_c.feb as 二月电费, _a.mar as 三月用电量, _a.mar*_c.mar as 三月电费,;
_a.apr as 四月用电量,_a.apr*_c.apr as 四月电费, _a.may as 五月用电量,;
_a.may*_c.may as 五月电费, _a.jun as 六月用电量, _a.jun*_c.jun as 六月电费,;
_a.jul as 七月用电量, _a.jul* _c.jul as 七月电费,_a.aug as 八月用电量,;
_a.aug*_c.aug as 八月电费,_a.sep as 九月用电量, _a.sep*_c.sep as 九月电费,;
_a.oct as 十月用电量,_a.oct*_c.oct as 十月电费, _a.nov as 十一月用电量,;
_a.nov*_c.nov as 十一月电费, _a.dec as 十二月用电量,;
_a.dec*_c.dec as 十二月电费,;
_a.jan+_a.feb+_a.mar+_a.apr+_a.may+_a.jun+_a.jul+_a.aug+_a.sep+_a.oct+_a.nov+_a.dec as 合计年用电量,;
ROUND(_a.jan*_c.jan+_c.feb*_a.feb+_a.mar*_c.mar+_a.apr*_c.apr+_c.may*_a.may+_a.jun*_c.jun+_c.jul*_a.jul+;
_a.aug*_c.aug+_a.sep*_c.sep+_c.oct*_a.oct+_a.nov*_c.nov+_c.dec*_a.dec,2) as 合计年电费;
FROM 用电管理系统!a _a, 用电管理系统!c _c;
where b=_a.cname;
ORDER BY _a.cno
endif
endif
if thisform.pageframe1.page2.optiongroup1.option3.value=1
if c= ""
messagebox("企业地址不能为空")
else
SELECT DISTINCT _a.cno as 企业编号,_a.cname as 企业名,;
_a.caddress as 企业地址, _a.ctel as 电话号码, _a.crp as 联系人,;
_a.jan as 一月用电量,_a.jan*_c.jan as 一月电费, _a.feb as 二月用电量,;
_a.feb*_c.feb as 二月电费, _a.mar as 三月用电量, _a.mar*_c.mar as 三月电费,;
_a.apr as 四月用电量,_a.apr*_c.apr as 四月电费, _a.may as 五月用电量,;
_a.may*_c.may as 五月电费, _a.jun as 六月用电量, _a.jun*_c.jun as 六月电费,;
_a.jul as 七月用电量, _a.jul* _c.jul as 七月电费,_a.aug as 八月用电量,;
_a.aug*_c.aug as 八月电费,_a.sep as 九月用电量, _a.sep*_c.sep as 九月电费,;
_a.oct as 十月用电量,_a.oct*_c.oct as 十月电费, _a.nov as 十一月用电量,;
_a.nov*_c.nov as 十一月电费, _a.dec as 十二月用电量,;
_a.dec*_c.dec as 十二月电费,;
_a.jan+_a.feb+_a.mar+_a.apr+_a.may+_a.jun+_a.jul+_a.aug+_a.sep+_a.oct+_a.nov+_a.dec as 合计年用电量,;
ROUND(_a.jan*_c.jan+_c.feb*_a.feb+_a.mar*_c.mar+_a.apr*_c.apr+_c.may*_a.may+_a.jun*_c.jun+_c.jul*_a.jul+;
_a.aug*_c.aug+_a.sep*_c.sep+_c.oct*_a.oct+_a.nov*_c.nov+_c.dec*_a.dec,2) as 合计年电费;
FROM 用电管理系统!a _a, 用电管理系统!c _c;
where c=_a.caddress;
ORDER BY _a.cno
endif
endif
if thisform.pageframe1.page2.optiongroup1.option4.value=1
if d = ""
messagebox("电话号码不能为空")
else
SELECT DISTINCT _a.cno as 企业编号,_a.cname as 企业名,;
_a.caddress as 企业地址, _a.ctel as 电话号码, _a.crp as 联系人,;
_a.jan as 一月用电量,_a.jan*_c.jan as 一月电费, _a.feb as 二月用电量,;
_a.feb*_c.feb as 二月电费, _a.mar as 三月用电量, _a.mar*_c.mar as 三月电费,;
_a.apr as 四月用电量,_a.apr*_c.apr as 四月电费, _a.may as 五月用电量,;
_a.may*_c.may as 五月电费, _a.jun as 六月用电量, _a.jun*_c.jun as 六月电费,;
_a.jul as 七月用电量, _a.jul* _c.jul as 七月电费,_a.aug as 八月用电量,;
_a.aug*_c.aug as 八月电费,_a.sep as 九月用电量, _a.sep*_c.sep as 九月电费,;
_a.oct as 十月用电量,_a.oct*_c.oct as 十月电费, _a.nov as 十一月用电量,;
_a.nov*_c.nov as 十一月电费, _a.dec as 十二月用电量,;
_a.dec*_c.dec as 十二月电费,;
_a.jan+_a.feb+_a.mar+_a.apr+_a.may+_a.jun+_a.jul+_a.aug+_a.sep+_a.oct+_a.nov+_a.dec as 合计年用电量,;
ROUND(_a.jan*_c.jan+_c.feb*_a.feb+_a.mar*_c.mar+_a.apr*_c.apr+_c.may*_a.may+_a.jun*_c.jun+_c.jul*_a.jul+;
_a.aug*_c.aug+_a.sep*_c.sep+_c.oct*_a.oct+_a.nov*_c.nov+_c.dec*_a.dec,2) as 合计年电费;
FROM 用电管理系统!a _a, 用电管理系统!c _c;
where d= _a.ctel;
ORDER BY _a.cno
endif
endif
if thisform.pageframe1.page2.optiongroup1.option5.value=1
if e = ""
messagebox("联系人不能为空")
else
SELECT DISTINCT _a.cno as 企业编号,_a.cname as 企业名,;
_a.caddress as 企业地址, _a.ctel as 电话号码, _a.crp as 联系人,;
_a.jan as 一月用电量,_a.jan*_c.jan as 一月电费, _a.feb as 二月用电量,;
_a.feb*_c.feb as 二月电费, _a.mar as 三月用电量, _a.mar*_c.mar as 三月电费,;
_a.apr as 四月用电量,_a.apr*_c.apr as 四月电费, _a.may as 五月用电量,;
_a.may*_c.may as 五月电费, _a.jun as 六月用电量, _a.jun*_c.jun as 六月电费,;
_a.jul as 七月用电量, _a.jul* _c.jul as 七月电费,_a.aug as 八月用电量,;
_a.aug*_c.aug as 八月电费,_a.sep as 九月用电量, _a.sep*_c.sep as 九月电费,;
_a.oct as 十月用电量,_a.oct*_c.oct as 十月电费, _a.nov as 十一月用电量,;
_a.nov*_c.nov as 十一月电费, _a.dec as 十二月用电量,;
_a.dec*_c.dec as 十二月电费,;
_a.jan+_a.feb+_a.mar+_a.apr+_a.may+_a.jun+_a.jul+_a.aug+_a.sep+_a.oct+_a.nov+_a.dec as 合计年用电量,;
ROUND(_a.jan*_c.jan+_c.feb*_a.feb+_a.mar*_c.mar+_a.apr*_c.apr+_c.may*_a.may+_a.jun*_c.jun+_c.jul*_a.jul+;
_a.aug*_c.aug+_a.sep*_c.sep+_c.oct*_a.oct+_a.nov*_c.nov+_c.dec*_a.dec,2) as 合计年电费;
FROM 用电管理系统!a _a, 用电管理系统!c _c;
where e=_a.crp;
ORDER BY _a.cno
endif
endif
对象 command2 过程 click
release thisform
对象 command1 过程 click
release thisform
对象 form1 过程 init
#define CRLF CHR(13)+CHR(10)
#DEFINE TAB CHR(9)
#DEFINE bartype -4099
set safety off
creat table tg (genl g)
set safety on
append blank
SELECT DISTINCT 用户浏览表.cno,用户浏览表.jan, 用户浏览表.feb, 用户浏览表.mar, 用户浏览表.apr,;
用户浏览表.may, 用户浏览表.jun, 用户浏览表.jul, 用户浏览表.aug,;
用户浏览表.sep, 用户浏览表.oct, 用户浏览表.nov, 用户浏览表.dec,;
用户浏览表.janf, 用户浏览表.febf, 用户浏览表.marf, 用户浏览表.aprf,;
用户浏览表.mayf, 用户浏览表.junf, 用户浏览表.julf, 用户浏览表.augf,;
用户浏览表.sepf, 用户浏览表.octf, 用户浏览表.novf, 用户浏览表.decf,;
用户浏览表.yec, 用户浏览表.yef;
FROM 用电管理系统!用户浏览表;
where indexa=用户浏览表.cno into array array1
gdata =""+tab +"一月用电量和电费"+tab+"二月用电量和电费"+tab+"三月用电量和电费"+tab+"四月用电量和电费"+tab+;
"五月用电量和电费"+tab+"六月用电量和电费"+tab+"七月用电量和电费"+tab+"八月用电量和电费"+tab+;
"九月用电量和电费"+tab+"十月用电量和电费"+tab+"十一月用电量和电费"+tab+"十二月用电量和电费"+crlf+;
tab+str(array1(2))+tab+str(array1(3))+tab;
+str(array1(4))+tab+str(array1(5))+ ;
tab+str(array1(6))+tab+str(array1(7))+tab+;
str(array1(8))+tab+str(array1(9))+tab+;
str(array1(10))+tab+str(array1(11))+tab+str(array1(12));
+tab+str(array1(13))+tab+crlf+tab+str(array1(14))+tab+str(array1(15))+;
tab+str(array1(16))+tab+str(array1(17))+tab+str(array1(18))+tab+str(array1(19))+;
tab+str(array1(20))+tab+str(array1(21))+tab+str(array1(22))+tab+str(array1(23))+;
tab+str(array1(24))+tab+str(array1(25))+crlf
this.lockscreen=.t.
append general genl class "msgraph.chart" data M.gdata
this.oleBoundControl1.ControlSource='genl'
this.oleBoundControl1.Haslegend=.f.
this.oleBoundControl1.autoformat(bartype ,1)
this.lockscreen=.f.
对象 command1 过程 click
release thisform
对象 command1 过程 click
if !bof()
skip -1
else
go top
endif
THISFORM.pageframe1.page3.COMMANDGROUP1.COMMAND2.ENABLED=.T.
THISFORM.REFRESH()
对象 command2 过程 click
IF !EOF()
SKIP
ELSE
GO BOTTOM
ENDIF
THISFORM.pageframe1.page3.COMMANDGROUP1.COMMAND1.ENABLED=.T.
THISFORM.REFRESH()
对象 command1 过程 click
GO TOP
THISFORM.pageframe1.page3.COMMANDGROUP1.COMMAND1.ENABLED=.F.
THISFORM.pageframe1.page3.COMMANDGROUP1.COMMAND2.ENABLED=.T.
THISFORM.REFRESH()
对象 command2 过程 click
GO BOTTOM
THISFORM.pageframe1.page3.COMMANDGROUP1.COMMAND2.ENABLED=.F.
THISFORM.pageframe1.page3.COMMANDGROUP1.COMMAND1.ENABLED=.T.
THISFORM.REFRESH()
对象 command1 过程 click
indexa=thisform.pageframe1.page3.text1.value
do form 视图查看表单
对象 command1 过程 click
set exact on
a=alltrim(thisform.pageframe1.page4.text1.value)
b=alltrim(thisform.pageframe1.page4.text2.value)
c=alltrim(thisform.pageframe1.page4.text3.value)
d=alltrim(thisform.pageframe1.page4.text4.value)
e=alltrim(thisform.pageframe1.page4.text5.value)
if thisform.pageframe1.page4.optiongroup1.option1.value=1
if a = ""
messagebox("企业编号不能为空")
else
store a to indexa
SELECT DISTINCT _a.cno as 企业编号,_a.cname as 企业名,;
_a.caddress as 企业地址, _a.ctel as 电话号码, _a.crp as 联系人,;
_a.jan as 一月用电量,_a.jan*_c.jan as 一月电费, _a.feb as 二月用电量,;
_a.feb*_c.feb as 二月电费, _a.mar as 三月用电量, _a.mar*_c.mar as 三月电费,;
_a.apr as 四月用电量,_a.apr*_c.apr as 四月电费, _a.may as 五月用电量,;
_a.may*_c.may as 五月电费, _a.jun as 六月用电量, _a.jun*_c.jun as 六月电费,;
_a.jul as 七月用电量, _a.jul* _c.jul as 七月电费,_a.aug as 八月用电量,;
_a.aug*_c.aug as 八月电费,_a.sep as 九月用电量, _a.sep*_c.sep as 九月电费,;
_a.oct as 十月用电量,_a.oct*_c.oct as 十月电费, _a.nov as 十一月用电量,;
_a.nov*_c.nov as 十一月电费, _a.dec as 十二月用电量,;
_a.dec*_c.dec as 十二月电费,;
_a.jan+_a.feb+_a.mar+_a.apr+_a.may+_a.jun+_a.jul+_a.aug+_a.sep+_a.oct+_a.nov+_a.dec as 合计年用电量,;
ROUND(_a.jan*_c.jan+_c.feb*_a.feb+_a.mar*_c.mar+_a.apr*_c.apr+_c.may*_a.may+_a.jun*_c.jun+_c.jul*_a.jul+;
_a.aug*_c.aug+_a.sep*_c.sep+_c.oct*_a.oct+_a.nov*_c.nov+_c.dec*_a.dec,2) as 合计年电费;
FROM 用电管理系统!a _a, 用电管理系统!c _c;
where a=_a.cno;
ORDER BY _a.cno
endif
endif
if thisform.pageframe1.page4.optiongroup1.option2.value=1
if b= ""
messagebox("企业名不能为空")
else
SELECT DISTINCT _a.cno as 企业编号,_a.cname as 企业名,;
_a.caddress as 企业地址, _a.ctel as 电话号码, _a.crp as 联系人,;
_a.jan as 一月用电量,_a.jan*_c.jan as 一月电费, _a.feb as 二月用电量,;
_a.feb*_c.feb as 二月电费, _a.mar as 三月用电量, _a.mar*_c.mar as 三月电费,;
_a.apr as 四月用电量,_a.apr*_c.apr as 四月电费, _a.may as 五月用电量,;
_a.may*_c.may as 五月电费, _a.jun as 六月用电量, _a.jun*_c.jun as 六月电费,;
_a.jul as 七月用电量, _a.jul* _c.jul as 七月电费,_a.aug as 八月用电量,;
_a.aug*_c.aug as 八月电费,_a.sep as 九月用电量, _a.sep*_c.sep as 九月电费,;
_a.oct as 十月用电量,_a.oct*_c.oct as 十月电费, _a.nov as 十一月用电量,;
_a.nov*_c.nov as 十一月电费, _a.dec as 十二月用电量,;
_a.dec*_c.dec as 十二月电费,;
_a.jan+_a.feb+_a.mar+_a.apr+_a.may+_a.jun+_a.jul+_a.aug+_a.sep+_a.oct+_a.nov+_a.dec as 合计年用电量,;
ROUND(_a.jan*_c.jan+_c.feb*_a.feb+_a.mar*_c.mar+_a.apr*_c.apr+_c.may*_a.may+_a.jun*_c.jun+_c.jul*_a.jul+;
_a.aug*_c.aug+_a.sep*_c.sep+_c.oct*_a.oct+_a.nov*_c.nov+_c.dec*_a.dec,2) as 合计年电费;
FROM 用电管理系统!a _a, 用电管理系统!c _c;
where b=_a.cname;
ORDER BY _a.cno
endif
endif
if thisform.pageframe1.page4.optiongroup1.option3.value=1
if c= ""
messagebox("企业地址不能为空")
else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -