📄 uinputdata.pas
字号:
edit82.Text:=floattostr(table1.FieldValues['Wluolc']);
edit83.Text:=floattostr(table1.FieldValues['Whlc']);
edit84.Text:=floattostr(table1.FieldValues['Wxianlc']);
edit86.Text:=floattostr(table1.FieldValues['Wbanlc']);
edit85.Text:=floattostr(table1.FieldValues['Wxinglc']);
edit87.Text:=floattostr(table1.FieldValues['Wrelc']);
edit88.Text:=floattostr(table1.FieldValues['Wlenglc']);
edit89.Text:=floattostr(table1.FieldValues['Wdulc']);
edit90.Text:=floattostr(table1.FieldValues['Wcailc']);
edit91.Text:=floattostr(table1.FieldValues['Yluolj']);
edit92.Text:=floattostr(table1.FieldValues['Yhlj']);
edit93.Text:=floattostr(table1.FieldValues['Yxianlj']);
edit95.Text:=floattostr(table1.FieldValues['Ybanlj']);
edit94.Text:=floattostr(table1.FieldValues['Yxinglj']);
edit96.Text:=floattostr(table1.FieldValues['Yrelj']);
edit97.Text:=floattostr(table1.FieldValues['Ylenglj']);
edit98.Text:=floattostr(table1.FieldValues['Ydulj']);
edit99.Text:=floattostr(table1.FieldValues['Ycailj']);
edit100.Text:=floattostr(table1.FieldValues['Yluolc']);
edit101.Text:=floattostr(table1.FieldValues['Yhlc']);
edit102.Text:=floattostr(table1.FieldValues['Yxianlc']);
edit104.Text:=floattostr(table1.FieldValues['Ybanlc']);
edit103.Text:=floattostr(table1.FieldValues['Yxinglc']);
edit105.Text:=floattostr(table1.FieldValues['Yrelc']);
edit106.Text:=floattostr(table1.FieldValues['Ylenglc']);
edit107.Text:=floattostr(table1.FieldValues['Ydulc']);
edit108.Text:=floattostr(table1.FieldValues['Ycailc']);
end;
procedure Tfminputdata.doenterastab(var msg:TMsg; var Handled:boolean);
begin
if msg.message=wm_keydown then
begin
if msg.WParam=VK_RETURN then
keybd_event(vk_tab,0,0,0);
end;
end;
procedure Tfminputdata.FormCreate(Sender: TObject);
begin
bitbtn4.Enabled:=false;
application.OnMessage:=fminputdata.doenterastab;
fminputdata.DateTimePicker1.Date:=date;
end;
procedure Tfminputdata.BitBtn1Click(Sender: TObject);
var l24,l25,l26,l27,l28,l29,l30,l31,l36,l37,l38,l39:real;
begin
i:=true;
if not table1.Locate('ddate',fminputdata.DateTimePicker1.Date,[]) then
begin
table1.Append;
fminputdata.appedit;
table1.Post;
l24:=strtofloat(edit1.Text)+strtofloat(edit5.Text)+strtofloat(edit9.Text)+strtofloat(edit13.Text)+strtofloat(edit17.Text)+strtofloat(edit21.Text)+strtofloat(edit25.Text)+strtofloat(edit29.Text)+strtofloat(edit33.Text);
label24.Caption:=floattostr(l24);
l25:=strtofloat(edit2.Text)+strtofloat(edit6.Text)+strtofloat(edit10.Text)+strtofloat(edit14.Text)+strtofloat(edit18.Text)+strtofloat(edit22.Text)+strtofloat(edit26.Text)+strtofloat(edit30.Text)+strtofloat(edit34.Text);
label25.Caption:=floattostr(l25);
l26:=strtofloat(edit3.Text)+strtofloat(edit7.Text)+strtofloat(edit11.Text)+strtofloat(edit15.Text)+strtofloat(edit19.Text)+strtofloat(edit23.Text)+strtofloat(edit27.Text)+strtofloat(edit31.Text)+strtofloat(edit35.Text);
label26.Caption:=floattostr(l26);
l27:=strtofloat(edit4.Text)+strtofloat(edit8.Text)+strtofloat(edit12.Text)+strtofloat(edit16.Text)+strtofloat(edit20.Text)+strtofloat(edit24.Text)+strtofloat(edit28.Text)+strtofloat(edit32.Text)+strtofloat(edit36.Text);
label27.Caption:=floattostr(l27);
l28:=strtofloat(edit37.Text)+strtofloat(edit41.Text)+strtofloat(edit45.Text)+strtofloat(edit49.Text)+strtofloat(edit53.Text)+strtofloat(edit57.Text)+strtofloat(edit61.Text)+strtofloat(edit65.Text)+strtofloat(edit69.Text);
label28.Caption:=floattostr(l28);
l29:=strtofloat(edit38.Text)+strtofloat(edit42.Text)+strtofloat(edit46.Text)+strtofloat(edit50.Text)+strtofloat(edit54.Text)+strtofloat(edit58.Text)+strtofloat(edit62.Text)+strtofloat(edit66.Text)+strtofloat(edit70.Text);
label29.Caption:=floattostr(l29);
l30:=strtofloat(edit39.Text)+strtofloat(edit43.Text)+strtofloat(edit47.Text)+strtofloat(edit51.Text)+strtofloat(edit55.Text)+strtofloat(edit59.Text)+strtofloat(edit63.Text)+strtofloat(edit67.Text)+strtofloat(edit71.Text);
label30.Caption:=floattostr(l30);
l31:=strtofloat(edit40.Text)+strtofloat(edit44.Text)+strtofloat(edit48.Text)+strtofloat(edit52.Text)+strtofloat(edit56.Text)+strtofloat(edit60.Text)+strtofloat(edit64.Text)+strtofloat(edit68.Text)+strtofloat(edit72.Text);
label31.Caption:=floattostr(l31);
l36:=strtofloat(edit73.Text)+strtofloat(edit74.Text)+strtofloat(edit75.Text)+strtofloat(edit76.Text)+strtofloat(edit77.Text)+strtofloat(edit78.Text)+strtofloat(edit79.Text)+strtofloat(edit80.Text)+strtofloat(edit81.Text);
label36.Caption:=floattostr(l36);
l37:=strtofloat(edit82.Text)+strtofloat(edit83.Text)+strtofloat(edit84.Text)+strtofloat(edit85.Text)+strtofloat(edit86.Text)+strtofloat(edit87.Text)+strtofloat(edit88.Text)+strtofloat(edit89.Text)+strtofloat(edit90.Text);
label37.Caption:=floattostr(l37);
l38:=strtofloat(edit91.Text)+strtofloat(edit92.Text)+strtofloat(edit93.Text)+strtofloat(edit94.Text)+strtofloat(edit95.Text)+strtofloat(edit96.Text)+strtofloat(edit97.Text)+strtofloat(edit98.Text)+strtofloat(edit99.Text);
label38.Caption:=floattostr(l38);
l39:=strtofloat(edit100.Text)+strtofloat(edit101.Text)+strtofloat(edit102.Text)+strtofloat(edit103.Text)+strtofloat(edit104.Text)+strtofloat(edit105.Text)+strtofloat(edit106.Text)+strtofloat(edit107.Text)+strtofloat(edit108.Text);
label39.Caption:=floattostr(l39);
end
else showmessage('当日数据已存在,请核对!!');
end;
procedure Tfminputdata.DateTimePicker1Change(Sender: TObject);
var l24,l25,l26,l27,l28,l29,l30,l31,l36,l37,l38,l39:real;
begin
if (radiogroup1.ItemIndex=0) and (not table1.Locate('ddate',fminputdata.DateTimePicker1.Date,[])) then
begin
if (table1.Locate('ddate',fminputdata.DateTimePicker1.Date-1,[]))
and (monthof(fminputdata.DateTimePicker1.Date)=monthof(fminputdata.DateTimePicker1.Date-1))
then
begin
fminputdata.fmcleardata;
edit1.Text:=floattostr(table1.FieldValues['Wluoc']);
edit5.Text:=floattostr(table1.FieldValues['Whc']);
edit9.Text:=floattostr(table1.FieldValues['Wxianc']);
edit13.Text:=floattostr(table1.FieldValues['Wxingc']);
edit17.Text:=floattostr(table1.FieldValues['Wbanc']);
edit21.Text:=floattostr(table1.FieldValues['Wrec']);
edit25.Text:=floattostr(table1.FieldValues['Wlengc']);
edit29.Text:=floattostr(table1.FieldValues['Wduc']);
edit33.Text:=floattostr(table1.FieldValues['Wcaic']);
edit37.Text:=floattostr(table1.FieldValues['Yluoc']);
edit41.Text:=floattostr(table1.FieldValues['Yhc']);
edit45.Text:=floattostr(table1.FieldValues['Yxianc']);
edit49.Text:=floattostr(table1.FieldValues['Yxingc']);
edit53.Text:=floattostr(table1.FieldValues['Ybanc']);
edit57.Text:=floattostr(table1.FieldValues['Yrec']);
edit61.Text:=floattostr(table1.FieldValues['Ylengc']);
edit65.Text:=floattostr(table1.FieldValues['Yduc']);
edit69.Text:=floattostr(table1.FieldValues['Ycaic']);
edit73.Text:=floattostr(table1.FieldValues['Wluolj']);
edit74.Text:=floattostr(table1.FieldValues['Whlj']);
edit75.Text:=floattostr(table1.FieldValues['Wxianlj']);
edit77.Text:=floattostr(table1.FieldValues['Wbanlj']);
edit76.Text:=floattostr(table1.FieldValues['Wxinglj']);
edit78.Text:=floattostr(table1.FieldValues['Wrelj']);
edit79.Text:=floattostr(table1.FieldValues['Wlenglj']);
edit80.Text:=floattostr(table1.FieldValues['Wdulj']);
edit81.Text:=floattostr(table1.FieldValues['Wcailj']);
edit82.Text:=floattostr(table1.FieldValues['Wluolc']);
edit83.Text:=floattostr(table1.FieldValues['Whlc']);
edit84.Text:=floattostr(table1.FieldValues['Wxianlc']);
edit86.Text:=floattostr(table1.FieldValues['Wbanlc']);
edit85.Text:=floattostr(table1.FieldValues['Wxinglc']);
edit87.Text:=floattostr(table1.FieldValues['Wrelc']);
edit88.Text:=floattostr(table1.FieldValues['Wlenglc']);
edit89.Text:=floattostr(table1.FieldValues['Wdulc']);
edit90.Text:=floattostr(table1.FieldValues['Wcailc']);
edit91.Text:=floattostr(table1.FieldValues['Yluolj']);
edit92.Text:=floattostr(table1.FieldValues['Yhlj']);
edit93.Text:=floattostr(table1.FieldValues['Yxianlj']);
edit95.Text:=floattostr(table1.FieldValues['Ybanlj']);
edit94.Text:=floattostr(table1.FieldValues['Yxinglj']);
edit96.Text:=floattostr(table1.FieldValues['Yrelj']);
edit97.Text:=floattostr(table1.FieldValues['Ylenglj']);
edit98.Text:=floattostr(table1.FieldValues['Ydulj']);
edit99.Text:=floattostr(table1.FieldValues['Ycailj']);
edit100.Text:=floattostr(table1.FieldValues['Yluolc']);
edit101.Text:=floattostr(table1.FieldValues['Yhlc']);
edit102.Text:=floattostr(table1.FieldValues['Yxianlc']);
edit103.Text:=floattostr(table1.FieldValues['Yxinglc']);
edit104.Text:=floattostr(table1.FieldValues['Ybanlc']);
edit105.Text:=floattostr(table1.FieldValues['Yrelc']);
edit106.Text:=floattostr(table1.FieldValues['Ylenglc']);
edit107.Text:=floattostr(table1.FieldValues['Ydulc']);
edit108.Text:=floattostr(table1.FieldValues['Ycailc']);
end
else
begin
if (table1.Locate('ddate',fminputdata.DateTimePicker1.Date-1,[]))
then
begin
fminputdata.fmcleardata;
edit1.Text:=floattostr(table1.FieldValues['Wluoc']);
edit5.Text:=floattostr(table1.FieldValues['Whc']);
edit9.Text:=floattostr(table1.FieldValues['Wxianc']);
edit13.Text:=floattostr(table1.FieldValues['Wxingc']);
edit17.Text:=floattostr(table1.FieldValues['Wbanc']);
edit21.Text:=floattostr(table1.FieldValues['Wrec']);
edit25.Text:=floattostr(table1.FieldValues['Wlengc']);
edit29.Text:=floattostr(table1.FieldValues['Wduc']);
edit33.Text:=floattostr(table1.FieldValues['Wcaic']);
edit37.Text:=floattostr(table1.FieldValues['Yluoc']);
edit41.Text:=floattostr(table1.FieldValues['Yhc']);
edit45.Text:=floattostr(table1.FieldValues['Yxianc']);
edit49.Text:=floattostr(table1.FieldValues['Yxingc']);
edit53.Text:=floattostr(table1.FieldValues['Ybanc']);
edit57.Text:=floattostr(table1.FieldValues['Yrec']);
edit61.Text:=floattostr(table1.FieldValues['Ylengc']);
edit65.Text:=floattostr(table1.FieldValues['Yduc']);
edit69.Text:=floattostr(table1.FieldValues['Ycaic']);
end;
end;
if not table1.Locate('ddate',fminputdata.DateTimePicker1.Date-1,[loPartialKey]) then
begin
fminputdata.fmcleardata;
end ;
end
else
begin
if table1.Locate('ddate',fminputdata.DateTimePicker1.Date,[]) then
begin
edit1.Text:=floattostr(table1.FieldValues['Wluos']);
edit2.Text:=floattostr(table1.FieldValues['Wluoj']);
edit3.Text:=floattostr(table1.FieldValues['Wluoch']);
edit4.Text:=floattostr(table1.FieldValues['Wluoc']);
edit5.Text:=floattostr(table1.FieldValues['Whs']);
edit6.Text:=floattostr(table1.FieldValues['Whj']);
edit7.Text:=floattostr(table1.FieldValues['Whch']);
edit8.Text:=floattostr(table1.FieldValues['Whc']);
edit9.Text:=floattostr(table1.FieldValues['Wxians']);
edit10.Text:=floattostr(table1.FieldValues['Wxianj']);
edit11.Text:=floattostr(table1.FieldValues['Wxianch']);
edit12.Text:=floattostr(table1.FieldValues['Wxianc']);
edit13.Text:=floattostr(table1.FieldValues['Wxings']);
edit14.Text:=floattostr(table1.FieldValues['Wxingj']);
edit15.Text:=floattostr(table1.FieldValues['Wxingch']);
edit16.Text:=floattostr(table1.FieldValues['Wxingc']);
edit17.Text:=floattostr(table1.FieldValues['Wbans']);
edit18.Text:=floattostr(table1.FieldValues['Wbanj']);
edit19.Text:=floattostr(table1.FieldValues['Wbanch']);
edit20.Text:=floattostr(table1.FieldValues['Wbanc']);
edit21.Text:=floattostr(table1.FieldValues['Wres']);
edit22.Text:=floattostr(table1.FieldValues['Wrej']);
edit23.Text:=floattostr(table1.FieldValues['Wrech']);
edit24.Text:=floattostr(table1.FieldValues['Wrec']);
edit25.Text:=floattostr(table1.FieldValues['Wlengs']);
edit26.Text:=floattostr(table1.FieldValues['Wlengj']);
edit27.Text:=floattostr(table1.FieldValues['Wlengch']);
edit28.Text:=floattostr(table1.FieldValues['Wlengc']);
edit29.Text:=floattostr(table1.FieldValues['Wdus']);
edit30.Text:=floattostr(table1.FieldValues['Wduj']);
edit31.Text:=floattostr(table1.FieldValues['Wduch']);
edit32.Text:=floattostr(table1.FieldValues['Wduc']);
edit33.Text:=floattostr(table1.FieldValues['Wcais']);
edit34.Text:=floattostr(table1.FieldValues['Wcaij']);
edit35.Text:=floattostr(table1.FieldValues['Wcaich']);
edit36.Text:=floattostr(table1.FieldValues['Wcaic']);
edit37.Text:=floattostr(table1.FieldValues['Yluos']);
edit38.Text:=floattostr(table1.FieldValues['Yluoj']);
edit39.Text:=floattostr(table1.FieldValues['Yluoch']);
edit40.Text:=floattostr(table1.FieldValues['Yluoc']);
edit41.Text:=floattostr(table1.FieldValues['Yhs']);
edit42.Text:=floattostr(table1.FieldValues['Yhj']);
edit43.Text:=floattostr(table1.FieldValues['Yhch']);
edit44.Text:=floattostr(table1.FieldValues['Yhc']);
edit45.Text:=floattostr(table1.FieldValues['Yxians']);
edit46.Text:=floattostr(table1.FieldValues['Yxianj']);
edit47.Text:=floattostr(table1.FieldValues['Yxianch']);
edit48.Text:=floattostr(table1.FieldValues['Yxianc']);
edit49.Text:=floattostr(table1.FieldValues['Yxings']);
edit50.Text:=floattostr(table1.FieldValues['Yxingj']);
edit51.Text:=floattostr(table1.FieldValues['Yxingch']);
edit52.Text:=floattostr(table1.FieldValues['Yxingc']);
edit53.Text:=floattostr(table1.FieldValues['Ybans']);
edit54.Text:=floattostr(table1.FieldValues['Ybanj']);
edit55.Text:=floattostr(table1.FieldValues['Ybanch']);
edit56.Text:=floattostr(table1.FieldValues['Ybanc']);
edit57.Text:=floattostr(table1.FieldValues['Yres']);
edit58.Text:=floattostr(table1.FieldValues['Yrej']);
edit59.Text:=floattostr(table1.FieldValues['Yrech']);
edit60.Text:=floattostr(table1.FieldValues['Yrec']);
edit61.Text:=floattostr(table1.FieldValues['Ylengs']);
edit62.Text:=floattostr(table1.FieldValues['Ylengj']);
edit63.Text:=floattostr(table1.FieldValues['Ylengch']);
edit64.Text:=floattostr(table1.FieldValues['Ylengc']);
edit65.Text:=floattostr(table1.FieldValues['Ydus']);
edit66.Text:=floattostr(table1.FieldValues['Yduj']);
edit67.Text:=floattostr(table1.FieldValues['Yduch']);
edit68.Text:=floattostr(table1.FieldValues['Yduc']);
edit69.Text:=floattostr(table1.FieldValues['Ycais']);
edit70.Text:=floattostr(table1.FieldValues['Ycaij']);
edit71.Text:=floattostr(table1.FieldValues['Ycaich']);
edit72.Text:=floattostr(table1.FieldValues['Ycaic']);
edit73.Text:=floattostr(table1.FieldValues['Wluolj']);
edit74.Text:=floattostr(table1.FieldValues['Whlj']);
edit75.Text:=floattostr(table1.FieldValues['Wxianlj']);
edit77.Text:=floattostr(table1.FieldValues['Wbanlj']);
edit76.Text:=floattostr(table1.FieldValues['Wxinglj']);
edit78.Text:=floattostr(table1.FieldValues['Wrelj']);
edit79.Text:=floattostr(table1.FieldValues['Wlenglj']);
edit80.Text:=floattostr(table1.FieldValues['Wdulj']);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -