⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit2.pas

📁 本程序提供了考试学生系统的原代码函数,并实现了很多程序难实现的功能
💻 PAS
字号:
unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, jpeg;

type
  Txuqiu = class(TForm)
    Panel1: TPanel;
    Panel3: TPanel;
    xuqiu1: TRadioGroup;
    Panel2: TPanel;
    Image1: TImage;
    Panel4: TPanel;
    procedure xuqiu1Click(Sender: TObject);
//    procedure Image1Click(Sender: TObject);
    procedure Panel4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  xuqiu: Txuqiu;

implementation

uses Unit3, Unit9, Unit11, Unit12, Unit15, Unit14, Unit1;

{$R *.dfm}

procedure Txuqiu.xuqiu1Click(Sender: TObject);
var
no:string;
begin
case xuqiu1.ItemIndex of
 0:begin teacher.show; xuqiu.Close  ; end;
 1:begin student.show;xuqiu.Close;end;
2:begin tianchong.show;xuqiu.Close;end;
 3:begin selchengji.show;xuqiu.Close ;end;
4:begin
//
  selfen1.selfen.Close;
  no:=inputbox('输入试卷号','请输入您要查询的试卷号!','103');
  if no<>'' then
  begin
   xuqiu.Tag:=strtoint(no);
   selfen1.selfen.ParamByName('no').AsString :=no;
   selfen1.selfen.Open;
   showmessage('参加本次考试的学生有'+inttostr(selfen1.selfen.RecordCount )+'人!');
  end;
  if selfen1.selfen.IsEmpty then
   begin
   showmessage('对不起!没有您需要的成绩!');
   end
  else
   begin
    selfen1.Show;
    selfen1.DBGrid1.Columns[0].Width :=120;
    selfen1.DBGrid1.Columns[1].Width :=180;
    selfen1.DBGrid1.Columns[2].Width :=120;
    selfen1.DBGrid1.Columns[3].Width :=120;
    selfen1.DBGrid1.Columns[4].Width :=120;
   end;

//
end;
end;
if (xuqiu1.ItemIndex =4) and (selfen1.selfen.IsEmpty) then
  xuqiu1.ItemIndex :=-1;
end;

procedure Txuqiu.Panel4Click(Sender: TObject);
begin
xuqiu.close;
form1.show;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -