creditreportunit.pas
来自「一个功能完美的学生成绩管理系统 使用ACCESS数据库在DATA文件夹中 」· PAS 代码 · 共 72 行
PAS
72 行
unit creditReportUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, Buttons, Mask;
type
TcreditReportForm = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
GroupBox1: TGroupBox;
DBEdit1: TMaskEdit;
Label2: TLabel;
Label1: TLabel;
procedure BitBtn1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
creditReportForm: TcreditReportForm;
implementation
uses datamoduleUnit;
{$R *.dfm}
procedure TcreditReportForm.BitBtn1Click(Sender: TObject);
begin
if (trim(DBedit1.Text)='') then
begin
messagebox (handle,'条件不能为空,请输入!','警告',mb_ok) ;
exit;
end;
with datamodule1.Querystudent do
begin
close;
SQL.Clear;
sql.Add('select * from student');
sql.Add('where sno like :sno');
Parameters.ParamByName('sno').Value:=trim(dbedit1.Text)+'%';
prepared;
open;
end;
datamodule1.Querycredit.Open;
with datamodule1.RvProjectall do
begin
datamodule1.RvDataSetConnectionall.DataSet:=datamodule1.queryall;
SelectReport('creditreport',false);
Execute;
end;
end;
procedure TcreditReportForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
datamodule1.Querystudent.Close;
datamodule1.queryall.Close;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?