【delphi开源代码栏目提醒】:本文主要为网学会员提供bjgdyunit.pas,希望对需要bjgdyunit.pas网友有所帮助,学习一下!
unit bjgdyunit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Mask, StdCtrls, ExtCtrls,datadomule;
type
Tbjgtemp = class(TForm)
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Button1: TButton;
MaskEdit1: TMaskEdit;
procedure Edit1Exit(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
bjgtemp: Tbjgtemp;
implementation
uses bjgcjunit;
{$R *.dfm}
procedure Tbjgtemp.Edit1Exit(Sender: TObject);
begin
with datamodule1.qry_bjgdy do
begin
close;
sql.Clear ;
sql.add('select * from kcb0 where kcbh=:id');
parambyname('id').AsString:=edit1.text;
open;
if not findfirst then
begin
application.MessageBox('请输入的课程编号不存在,请核对后再输!','提示',mb_ok+mb_iconinformation);
edit1.Clear ;
edit1.Focused ;
exit;
end;
end;
end;
procedure Tbjgtemp.Button1Click(Sender: TObject);
begin
with datamodule1.qry_bjgdy do
begin
close;
sql.Clear ;
sql.add('select * from cjb0 where kcbh=:id and kkxq=:data and cj00<60');
parambyname('id').AsString:=edit1.text;
parambyname('data').asstring:=maskedit1.text;
open;
if not findfirst then
begin
application.MessageBox('没有发现任何不及格记录!','提示',mb_ok+mb_iconinformation);
exit;
end;
end;
bjgdy:=tbjgdy.create(self);
bjgdy.showmodal;
end;
end.
上一篇:
bjgcjunit.pas
下一篇:
不规则零件优化排样的神经网络混合优化算法