procedure TshowRishouRumingxi_w.FormShow(Sender: TObject);
var
qs,zz:string;
begin
qs:=copy(datetimetostr(dateattribute_w.DateTimePicker2.Date),1,10);
zz:=copy(datetimetostr(dateattribute_w.DateTimePicker3.Date),1,10);
Adoquery1.Close;
Adoquery1.SQL.clear;
Adoquery1.sql.Add('select bianhao as 档案编号,zibianhao as 自编号,xingming as 姓名,yingshou as 收入,shoufeidate as 收费日期 from huohuaku where shoufeidate>='''+qs+''' and shoufeidate<='''+zz+''' order by shoufeidate');
Adoquery1.Open;
Dbgrid1.Columns[0].Width:=54;
Dbgrid1.Columns[1].Width:=40;
Dbgrid1.Columns[2].Width:=52;
Dbgrid1.Columns[3].Width:=57;
Dbgrid1.Columns[4].Width:=64;
if not Adoquery1.Eof then
begin
share_w.sql('select sum(yingshou) from huohuaku where shoufeidate>='''+qs+''' and shoufeidate<='''+zz+'''');
label1.Caption :='记录:'+inttostr(Adoquery1.Recordcount)+' 合计:'+inttostr(share_w.Adoquery1.fields[0].value);
end else
label1.Caption :='记录:0 合计:0';
end;
procedure TshowRishouRumingxi_w.Button1Click(Sender: TObject);
var
qs,zz:string;
begin
qs:=copy(datetimetostr(dateattribute_w.DateTimePicker2.Date),1,10);
zz:=copy(datetimetostr(dateattribute_w.DateTimePicker3.Date),1,10);
share_w.SQL('delete binzangshourumingxibiao');
share_w.SQL('insert into binzangshourumingxibiao select * from huohuaku where shoufeidate>='''+qs+''' and shoufeidate<='''+zz+'''');
share_w.SQL('insert into binzangshourumingxibiao(xingming,shoufeidate,jicun,yinshou) select xingming,shoufeidate,jine,jine from guhuijfjlku where shoufeidate>='''+qs+''' and shoufeidate<='''+zz+'''');
{yewushoufeibiao1_w.Adoquery1.Close;
yewushoufeibiao1_w.Adoquery1.SQL.clear;
yewushoufeibiao1_w.Adoquery1.SQL.Add('select * from binzangshourumingxibiao order by zibianhao');
yewushoufeibiao1_w.Adoquery1.Open;
yewushoufeibiao1_w.QuickRep1.Preview; }
end;