📄 uq_yue.pas
字号:
unit Uq_yue;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, Db, DBTables, ExtCtrls;
type
Tq_yue = class(TForm)
SpeedButton2: TSpeedButton;
Label2: TLabel;
StoredProc1: TStoredProc;
Label1: TLabel;
L_phone: TLabel;
Label7: TLabel;
L_total: TLabel;
Panel1: TPanel;
Label3: TLabel;
Label5: TLabel;
L_yue: TLabel;
L_qian: TLabel;
Label4: TLabel;
L_chang: TLabel;
procedure SpeedButton2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
q_yue: Tq_yue;
implementation
uses Uquery_main;
{$R *.DFM}
procedure Tq_yue.SpeedButton2Click(Sender: TObject);
begin
close;
end;
procedure Tq_yue.FormClose(Sender: TObject; var Action: TCloseAction);
begin
//
with query_main do
begin
E_phone_nbr.Text :='';
e_password.Text :='';
ed_year.text :='';
ed_month.text :='';
E_phone_nbr.SetFocus;
end;
end;
procedure Tq_yue.FormShow(Sender: TObject);
var temp:real;
begin
L_phone.Caption:='';
L_yue.Caption:='';
L_qian.Caption:='';
StoredProc1.ParamByName('ch_phone_nbr').asstring:=query_main.phone_nbr;
StoredProc1.ParamByName('ch_acct_nbr').asstring:=query_main.acct_nbr;
StoredProc1.Prepare;
StoredProc1.ExecProc;
StoredProc1.UnPrepare;
L_phone.Caption:=query_main.phone_nbr;
L_yue.Caption:=StoredProc1.ParamByName('df_depo_balance').asstring;
L_qian.Caption:=StoredProc1.ParamByName('df_amount').asstring;
L_chang.Caption:=StoredProc1.ParamByName('df_cachg').asstring;
temp:=StoredProc1.ParamByName('df_balance').asfloat;
if temp>=0 then Label7.Caption:='当前余额'
ELSE
begin
Label7.Caption:='当前欠费';
temp:=-temp;
end;
L_total.Caption:=floattostr(temp);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -