?? f_product_id.pas
字號:
unit f_product_id;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ExtCtrls, DB, ADODB;
type
Tw_product_id = class(TForm)
Panel1: TPanel;
ComboBox1: TComboBox;
Label1: TLabel;
BitBtn2: TBitBtn;
BitBtn1: TBitBtn;
ado_product: TADOQuery;
ado_productproduct_id: TStringField;
ado_productproduct_name: TStringField;
ado_productproduct_amount: TIntegerField;
ado_productproduct_price: TFloatField;
procedure FormCreate(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
w_product_id: Tw_product_id;
implementation
{$R *.dfm}
procedure Tw_product_id.FormCreate(Sender: TObject);
begin
ado_product.Close;
ado_product.SQL.Clear;
ado_product.SQL.Add('select* from product');
ado_product.Open;
ado_product.First;
while not ado_product.eof do
begin
combobox1.items.add(trim(ado_product.fieldbyname('product_id').asString)+' --- '+trim(ado_product.fieldbyname('product_name').asString));
ado_product.next;
end;
end;
procedure Tw_product_id.BitBtn2Click(Sender: TObject);
begin
close;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -