📄 unit33.~pas
字号:
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and chassis like'+''''+s1+'''');
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='车牌号' then
begin
if flatedit2.text='' then
begin
showmessage('请输入车牌号');
end
else
begin
s1:=flatedit2.text;
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and carno like'+''''+s1+'''');
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='发动机号' then
begin
if flatedit2.text='' then
begin
showmessage('请输入发动机号');
end
else
begin
s1:=flatedit2.text;
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and motor like'+''''+s1+'''');
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='车辆来源' then
begin
if flatcombobox2.text='' then
begin
showmessage('请选择车辆来源');
end
else
begin
s1:=flatcombobox2.text;
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and spring like'+''''+s1+'''');
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='车主姓名' then
begin
if flatedit2.text='' then
begin
showmessage('请输入车主姓名');
end
else
begin
s1:=flatedit2.text;
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and cname like'+''''+s1+'''');
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='联系电话' then
begin
if flatedit2.text='' then
begin
showmessage('请输入联系电话');
end
else
begin
s1:=flatedit2.text;
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and tel like'+''''+s1+'''');
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='车辆序列号' then
begin
if flatedit2.text='' then
begin
showmessage('请输入车辆序列号');
end
else
begin
s1:=flatedit2.text;
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and repertory.number like'+''''+s1+'''');
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='合同序列号' then
begin
if flatedit2.text='' then
begin
showmessage('请输入合同序列号');
end
else
begin
s1:=flatedit2.text;
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and profit.comno like'+''''+s1+'''');
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='到车日期段' then
begin
d1:= datetimepicker1.Date ;
d2:=datetimepicker2.Date;
if d1>d2 then
begin
showmessage('前日期不能大于后日期');
end
else
begin
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and cdate between :adate and :bdate');
parambyname('adate').asdatetime:=d1;
parambyname('bdate').asdatetime:=d2;
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='销售时间段' then
begin
d1:= datetimepicker1.Date ;
d2:=datetimepicker2.Date;
if d1>d2 then
begin
showmessage('前日期不能大于后日期');
end
else
begin
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and sale.saledate between :adate and :bdate' );
parambyname('adate').asdatetime:=d1;
parambyname('bdate').asdatetime:=d2;
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='车主身份证号' then
begin
i1:=length(flatedit2.text);
for i2:=1 to i1 do
begin
if not((flatedit2.text[i2]>='0') and (flatedit2.text[i2]<='9')) then
i3:=1;
end;
if flatedit2.text='' then
begin
showmessage('请输入车主身份证号');
end
else
if i3=1 then
begin
showmessage('身份证输入错误,请检查');
end
else
if not((i1=15)or(i1=18)) then
begin
showmessage('身份证输入的长度错误');
end
else
begin
s1:=flatedit2.text;
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and nameno='+''''+s1+'''');
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='销售总价格段' then
begin
r1:=snccurrencyedit4.value;
r2:=snccurrencyedit5.value;
if r1>r2 then
begin
showmessage('输入销售总价格金额一大于金额二');
end
else
begin
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and salepr between :ar1 and :br2');
parambyname('ar1').value:=r1;
parambyname('br2').value:=r2;
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='入户费用段' then
begin
r1:=snccurrencyedit4.value;
r2:=snccurrencyedit5.value;
if r1>r2 then
begin
showmessage('输入入户费用金额一大于金额二');
end
else
begin
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and putpr between :ar1 and :br2');
parambyname('ar1').value:=r1;
parambyname('br2').value:=r2;
prepare;
open;
end;
groupbox2.hide;
groupbox1.show;
epefbutton1.show ;
epefbutton2.show;
epefbutton3.show;
epefbutton4.show;
epefbutton5.show;
epeftrbtn1.show;
epeftrbtn2.show;
epeftrbtn3.show;
end;
end;
if flatcombobox1.text='车辆装修费用段' then
begin
r1:=snccurrencyedit4.value;
r2:=snccurrencyedit5.value;
if r1>r2 then
begin
showmessage('输入车辆装修费用金额一大于金额二');
end
else
begin
with data.comquery do
begin
close;
sql.clear;
sql.add('select sale.*,repertory.*,profit.* from sale,repertory,repsa,profit');
sql.add('where sale.comno=repsa.comno and repsa.number=repertory.number and sale.comno=profit.comno and loadpr between :ar1 and :br2');
parambyname('ar1').value:=r1;
parambyname('br2').value:=r2;
prepare;
open;
end;
groupbox2.hide;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -