📄 u_bb_xtzjhz.~pas
字号:
unit U_Bb_Xtzjhz;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, Buttons, ActnList,
XPStyleActnCtrls, ActnMan,strutils;
type
TFrm_Bb_Xtzjhz = class(TForm)
Panel1: TPanel;
Label1: TLabel;
RadioGroup1: TRadioGroup;
GroupBox1: TGroupBox;
RadioGroup2: TRadioGroup;
RadioGroup3: TRadioGroup;
RadioGroup4: TRadioGroup;
RadioGroup5: TRadioGroup;
RadioGroup6: TRadioGroup;
RadioGroup7: TRadioGroup;
RadioGroup8: TRadioGroup;
Dtp1: TDateTimePicker;
Dtp2: TDateTimePicker;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
RadioGroup9: TRadioGroup;
Label10: TLabel;
Panel2: TPanel;
Lbl0: TLabel;
Panel3: TPanel;
Lbl1: TLabel;
Panel4: TPanel;
Lbl2: TLabel;
Panel5: TPanel;
Lbl3: TLabel;
Panel6: TPanel;
Lbl4: TLabel;
Panel7: TPanel;
Lbl5: TLabel;
Panel8: TPanel;
Lbl6: TLabel;
Panel9: TPanel;
Lbl7: TLabel;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
ActionManager1: TActionManager;
Action1: TAction;
Action2: TAction;
procedure Action2Execute(Sender: TObject);
procedure Action1Execute(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frm_Bb_Xtzjhz: TFrm_Bb_Xtzjhz;
implementation
uses U_Data;
{$R *.dfm}
procedure TFrm_Bb_Xtzjhz.Action2Execute(Sender: TObject);
begin
close;
end;
procedure TFrm_Bb_Xtzjhz.Action1Execute(Sender: TObject);
var
i:integer;
pp:string;
sum:real;
bb:string;
begin
data.g_con.open();
//增款
i := 0;
sum := 0;
bb:='增款';
Pp := 'select * from mr_zjb where sj between '+quotedstr(Formatdatetime('yyyy年mm月dd日',DTP1.date)) +' and '+ quotedstr(Formatdatetime('yyyy年mm月dd日',DTP2.date))+' and zjzl='+quotedstr(bb);
data.G_Rst7.SQL.Clear;
data.G_Rst7.SQL.Add(pp);
data.G_Rst7.ExecSQL;
data.G_Rst7.Open;
While Not data.G_Rst7.EOF do
begin
i := i + 1;
sum := sum + strtofloat(data.g_rst7.FieldValues['zjje']);
data.G_Rst7.Next;
end;
Lbl0.Caption := inttostr(i);
Lbl4.Caption := '¥' + floattostr(sum);
//减款
i := 0;
sum := 0;
bb:='减款';
Pp := 'select * from mr_zjb where sj between '+quotedstr(Formatdatetime('yyyy年mm月dd日',DTP1.date)) +' and '+ quotedstr(Formatdatetime('yyyy年mm月dd日',DTP2.date))+' and zjzl='+quotedstr(bb);
data.G_Rst7.SQL.Clear;
data.G_Rst7.SQL.Add(pp);
data.G_Rst7.ExecSQL;
data.G_Rst7.Open;
While Not data.G_Rst7.EOF do
begin
i := i + 1;
sum := sum + strtofloat(data.g_rst7.FieldValues['zjje']);
data.G_Rst7.Next;
end;
Lbl1.Caption := inttostr(i);
Lbl5.Caption := '¥' + floattostr(sum);
//消费
i := 0;
sum := 0;
// Pp = "select * from mr_xfb where xfrq between '" & Format(DTP(0).Value, "yyyy年mm月dd日") & "' and '" & Format(DTP(1).Value, "yyyy年mm月dd日") & "'"
Pp := 'select * from mr_xfb where xfrq between '+quotedstr(Formatdatetime('yyyy年mm月dd日',DTP1.date)) +' and '+ quotedstr(Formatdatetime('yyyy年mm月dd日',DTP2.date));
data.G_Rst7.SQL.Clear;
data.G_Rst7.SQL.Add(pp);
data.G_Rst7.ExecSQL;
data.G_Rst7.Open;
While Not data.G_Rst7.EOF do
begin
i := i + 1;
sum := sum + strtofloat(data.g_rst7.FieldValues['xfje']);
data.G_Rst7.Next;
end;
Lbl2.Caption := inttostr(i);
Lbl6.Caption := '¥' + floattostr(sum);
//余额
i := 0;
sum := 0;
Pp := 'select * from mr_people';
data.G_Rst7.SQL.Clear;
data.G_Rst7.SQL.Add(pp);
data.G_Rst7.ExecSQL;
data.G_Rst7.Open;
While Not data.G_Rst7.EOF do
begin
i := i + 1;
sum := sum + strtofloat(data.g_rst7.FieldValues['ycje']);
data.G_Rst7.Next;
end;
Lbl3.Caption := inttostr(i);
Lbl7.Caption := '¥' + floattostr(sum);
end;
procedure TFrm_Bb_Xtzjhz.FormShow(Sender: TObject);
begin
dtp1.DateTime:=now;
dtp2.DateTime:=now;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -