byxyunit.pas

来自「高校学生学籍管理系统源码」· PAS 代码 · 共 80 行

PAS
80
字号
unit byxyunit;

interface

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

type
  Tbyxytemp = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    Button1: TButton;
    procedure ComboBox1Exit(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  byxytemp: Tbyxytemp;

implementation

uses datadomule, byxyfunit;

{$R *.dfm}

procedure Tbyxytemp.ComboBox1Exit(Sender: TObject);
begin
combobox2.Items.Clear;
with datamodule1.qry_byxy do
begin
close;
sql.Clear;
sql.add('select * from bjb0 where zymc=:name');
parambyname('name').asstring:=combobox1.text;
open;
if recordcount>0 then
 combobox2.text:=Fields[0].asstring;
repeat
 combobox2.items.add(fields[0].asstring);
 until findnext=false;
end;
end;

procedure Tbyxytemp.FormCreate(Sender: TObject);
begin
combobox1.Items.clear;
with datamodule1.qry_byxy do
begin
 close;
 sql.clear;
 sql.add('select * from zyb0') ;
 open;
 first;

if recordcount>0 then
// combobox1.text:=Fields[1].asstring;
repeat
 combobox1.items.add(fields[1].asstring);
 until findnext=false;
end;
end;

procedure Tbyxytemp.Button1Click(Sender: TObject);
begin

byxy:=tbyxy.create(self);
byxy.showmodal;
end;

end.

⌨️ 快捷键说明

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