📄 f_depart_id.pas
字号:
unit f_depart_id;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Buttons, DB, ADODB;
type
Tw_depart_id = class(TForm)
data_depart_id: TDataSource;
ado_depart_id: TADOQuery;
ado_depart_iddepart_id: TStringField;
ado_depart_iddepart_name: TStringField;
Panel1: TPanel;
Label1: TLabel;
ComboBox1: TComboBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
w_depart_id: Tw_depart_id;
implementation
{$R *.dfm}
procedure Tw_depart_id.FormCreate(Sender: TObject);
begin
ado_depart_id.Close;
ado_depart_id.SQL.Clear;
ado_depart_id.SQL.Add('select* from depart');
ado_depart_id.Open;
ado_depart_id.First;
while not ado_depart_id.eof do
begin
combobox1.items.add(trim(ado_depart_id.fieldbyname('depart_id').asString)+' --- '+trim(ado_depart_id.fieldbyname('depart_name').asString));
ado_depart_id.next;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -