unit12.pas

来自「简单的选课系统 采用delphi书写 包含简单的管理功能以及学生 教师 」· PAS 代码 · 共 72 行

PAS
72
字号
unit Unit12;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, StdCtrls;

type
  TForm12 = class(TForm)
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Edit1: TEdit;
    Button1: TButton;
    DBGrid1: TDBGrid;
    Button2: TButton;
    Label2: TLabel;
    Edit2: TEdit;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form12: TForm12;

implementation
uses unit6;
{$R *.dfm}

procedure TForm12.Button1Click(Sender: TObject);
begin
    with data.ADOQuery1 do
    begin
      close;
      sql.Clear;
      sql.Add('select * from 课程列表');
      sql.Add('where 课程号='''+Edit1.Text+'''');
      open;
    end
end;

procedure TForm12.Button2Click(Sender: TObject);
begin
    with data.ADOQuery1 do
    begin
      close;
      sql.Clear;
      sql.Add('select * from 课程列表');
      sql.Add('where 开课教师='''+Edit2.Text+'''');
      open;
    end
end;

procedure TForm12.Button3Click(Sender: TObject);
begin
    with data.ADOQuery1 do
    begin
        close;
        sql.Clear;
        sql.Add('select * from 课程列表');
        open;
    end
end;

end.

⌨️ 快捷键说明

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