【delphi开源代码栏目提醒】:本文主要为网学会员提供cjxytempunit.pas,希望对需要cjxytempunit.pas网友有所帮助,学习一下!
unit cjxytempunit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, DB, DBTables;
type
Tcjxytemp = class(TForm)
ddd: TPanel;
Button1: TButton;
Label1: TLabel;
Label2: TLabel;
ComboBox2: TComboBox;
ComboBox1: TComboBox;
Label3: TLabel;
ComboBox3: TComboBox;
procedure FormCreate(Sender: TObject);
procedure ComboBox1Exit(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
cjxytemp: Tcjxytemp;
implementation
uses cjxyunit, datadomule;
{$R *.dfm}
procedure Tcjxytemp.FormCreate(Sender: TObject);
begin
combobox1.Items.clear;
with datamodule1.qry_cjxy 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;
combobox3.Items.clear;
with datamodule1.qry_cjxy do
begin
close;
sql.clear;
sql.add('select * from kcb0') ;
open;
first;
if recordcount>0 then
combobox3.text:=Fields[1].asstring;
repeat
combobox3.items.add(fields[1].asstring);
until findnext=false;
end;
end;
procedure Tcjxytemp.ComboBox1Exit(Sender: TObject);
begin
combobox2.Items.Clear;
with datamodule1.qry_cjxy 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 Tcjxytemp.Button1Click(Sender: TObject);
begin
cjxyfrm:=tcjxyfrm.create(self);
cjxyfrm.showmodal;
end;
end.
上一篇:
cjxgunit.pas
下一篇:
手机媒体营销分析