📄 yongdianguanlixitong.txt
字号:
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
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.page4.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.page4.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
a=alltrim(thisform.pageframe1.page5.text2.value)
b=alltrim(thisform.pageframe1.page5.text3.value)
c=alltrim(thisform.pageframe1.page5.text4.value)
d=alltrim(thisform.pageframe1.page5.text5.value)
e=alltrim(thisform.pageframe1.page5.text6.value)
f=val(thisform.pageframe1.page5.text7.value)
g=val(thisform.pageframe1.page5.text8.value)
h=val(thisform.pageframe1.page5.text9.value)
i=val(thisform.pageframe1.page5.text10.value)
j=val(thisform.pageframe1.page5.text11.value)
k=val(thisform.pageframe1.page5.text12.value)
l=val(thisform.pageframe1.page5.text13.value)
m=val(thisform.pageframe1.page5.text14.value)
n=val(thisform.pageframe1.page5.text15.value)
o=val(thisform.pageframe1.page5.text16.value)
p=val(thisform.pageframe1.page5.text17.value)
q=val(thisform.pageframe1.page5.text18.value)
if a == ""
messagebox("企业编号不能为空")
else
if b == ""
messagebox("企业名不能为空")
else
if c == ""
messagebox("企业地址不能为空")
else
if d == ""
messagebox("联系人不能为空")
else
if e == ""
messagebox("电话号码不能为空")
else
goto bottom
insert into 用户浏览表 (cno,cname,caddress,ctel,crp,jan,feb,mar,apr,may,;
jun,jul,aug,sep,oct,nov,dec) values (a,b,c,e,d,f,g,h,i,j,k,l,m,;
n,o,p,q)
endif
endif
endif
endif
endif
对象 command2 过程 click
release thisform
对象 command1 过程 click
select * from c into array v
update 用户浏览表 set janf=round(jan*v(1),2),febf=round(feb*v(2),2),;
marf=round(mar*v(3),2),aprf=round(apr*v(4),2),mayf=round(may*v(5),2),;
junf=round(jun*v(6),2),julf=round(jul*v(7),2),augf=round(aug*v(8),2),;
sepf=round(sep*v(9),2),octf=round(oct*v(10),2),novf=round(nov*v(11),2),;
decf=round(dec*v(12),2),yef=ROUND(jan*v(1)+v(2)*feb+;
mar*v(3)+apr*v(4)+v(5)*may+jun*v(6)+v(7)*jul+;
aug*v(8)+sep*v(9)+v(10)*oct+nov*v(11)+v(12)*dec,2),;
yec=jan+feb+mar+apr+may+jun+jul+aug+sep+oct+nov+dec
对象 command2 过程 click
release thisform
对象 command1 过程 click
if !bof()
skip -1
else
go top
endif
THISFORM.pageframe1.page1.COMMANDGROUP1.COMMAND2.ENABLED=.T.
THISFORM.REFRESH()
对象 command2 过程 click
IF !EOF()
SKIP
ELSE
GO BOTTOM
ENDIF
THISFORM.pageframe1.page1.COMMANDGROUP1.COMMAND1.ENABLED=.T.
THISFORM.REFRESH()
对象 command1 过程 click
GO TOP
THISFORM.pageframe1.page1.COMMANDGROUP1.COMMAND1.ENABLED=.F.
THISFORM.pageframe1.page1.COMMANDGROUP1.COMMAND2.ENABLED=.T.
THISFORM.REFRESH()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -