【delphi开源代码栏目提醒】:网学会员delphi开源代码为您提供bddytempunit.pas参考,解决您在bddytempunit.pas学习中工作中的难题,参考学习。
unit bddytempunit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls,datadomule;
type
Tbddytemp = class(TForm)
Panel1: TPanel;
GroupBox1: TGroupBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
ComboBox1: TComboBox;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
bddytemp: Tbddytemp;
implementation
uses bddyunit;
{$R *.dfm}
procedure Tbddytemp.RadioButton1Click(Sender: TObject);
begin
label1.Visible:=true;
label2.Visible:=false;
combobox1.Visible:=true;
edit1.Visible:=false;
end;
procedure Tbddytemp.RadioButton2Click(Sender: TObject);
begin
label1.Visible:=false;
label2.Visible:=true;
combobox1.Visible:=false;
edit1.Visible:=true;
end;
procedure Tbddytemp.Button1Click(Sender: TObject);
begin
if radiobutton1.Checked then
begin
with datamodule1.qry_bddy do
begin
close;
sql.Clear ;
sql.Add('select * from xsbd where xsxh_id not in (select xsxh_id from byqk) and bdyy=:id');
parambyname('id').asstring:=combobox1.text;
open;
end;
end;
if radiobutton2.Checked then
begin
with datamodule1.qry_bddy do
begin
close;
sql.Clear ;
sql.Add('select * from xsbd where xsxh_id=:id');
parambyname('id').asstring:=edit1.text;
open;
end;
end;
bddy:=tbddy.create(self);
bddy.showmodal;
end;
end.