📄 cjxgtempunit.pas
字号:
unit cjxgtempunit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
Tcjxgtemp = class(TForm)
Panel1: TPanel;
Edit1: TEdit;
Label1: TLabel;
Edit2: TEdit;
Label2: TLabel;
Button1: TButton;
ComboBox1: TComboBox;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
cjxgtemp: Tcjxgtemp;
implementation
uses datadomule, cjxgunit;
{$R *.dfm}
procedure Tcjxgtemp.Button1Click(Sender: TObject);
begin
if combobox1.text='普通考试' then
begin
with datamodule1.qry_cjxg do
begin
close;
sql.clear;
sql.add('select * from cjb0 where xsxh_id=:id and kcbh=:bh');
parambyname('id').asstring:=edit1.text;
parambyname('bh').asstring:=edit2.text;
open;
if recordcount=0 then
begin
application.MessageBox('没有该学生的信息,请检查输入是否正确!','提示',mb_ok+mb_iconinformation);
exit;
end;
end;
end;
if combobox1.text='补考' then
begin
with datamodule1.qry_cjxg do
begin
close;
sql.clear;
sql.add('select * from bkcj where xsxh_id=:id and kcbh=:bh');
parambyname('id').asstring:=edit1.text;
parambyname('bh').asstring:=edit2.text;
open;
if recordcount=0 then
begin
application.MessageBox('没有该学生的信息,请检查输入是否正确!','提示',mb_ok+mb_iconinformation);
exit;
end;
end;
end;
if combobox1.text='重修考试' then
begin
with datamodule1.qry_cjxg do
begin
close;
sql.clear;
sql.add('select * from cxcj where xsxh_id=:id and kcbh=:bh');
parambyname('id').asstring:=edit1.text;
parambyname('bh').asstring:=edit2.text;
open;
if recordcount=0 then
begin
application.MessageBox('没有该学生的信息,请检查输入是否正确!','提示',mb_ok+mb_iconinformation);
exit;
end;
end;
end;
cjxg:=tcjxg.create(self);
cjxg.showmodal;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -