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

📄 fpdyunit.pas

📁 高校学生学籍管理系统源码
💻 PAS
字号:
unit fpdyunit;

interface

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

type
  Tfpdytemp = class(TForm)
    Panel1: TPanel;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    ComboBox1: TComboBox;
    ComboBox2: TComboBox;
    Edit1: TEdit;
    Button1: TButton;
    procedure RadioButton1Click(Sender: TObject);
    procedure RadioButton2Click(Sender: TObject);
    procedure ComboBox1Exit(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fpdytemp: Tfpdytemp;

implementation

uses bydyunit;



{$R *.dfm}

procedure Tfpdytemp.RadioButton1Click(Sender: TObject);
begin
label1.Visible:=true;
label2.Visible:=true;
label3.Visible:=false;
combobox1.Visible:=true;
combobox2.Visible:=true;
edit1.Visible:=false;
end;

procedure Tfpdytemp.RadioButton2Click(Sender: TObject);
begin
label1.Visible:=false;
label2.Visible:=false;
label3.Visible:=true;
combobox1.Visible:=false;
combobox2.Visible:=false;
edit1.Visible:=true;
end;

procedure Tfpdytemp.ComboBox1Exit(Sender: TObject);
begin
combobox2.Items.Clear;
with datamodule1.qry_bycp 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 Tfpdytemp.FormCreate(Sender: TObject);
begin
combobox1.Items.clear;
with datamodule1.qry_bycp 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 Tfpdytemp.Button1Click(Sender: TObject);
begin
if radiobutton1.Checked=true then
begin
with datamodule1.qry_fpdy do
begin
close;
sql.Clear ;
sql.add('select * from byqk where bjh0=:id');
parambyname('id').asstring:=combobox2.text;
open
end;
end;

if radiobutton2.Checked=true then
begin
with datamodule1.qry_fpdy do
begin
close;
sql.Clear ;
sql.add('select * from byqk where xsxh_id=:id');
parambyname('id').asstring:=edit1.text;
open
end;
end;
bydy:=tbydy.create(self);
bydy.showmodal;


end;

end.

⌨️ 快捷键说明

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