?? gzdall.pas
字號(hào):
unit gzdall;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, Grids, DBGrids, Buttons, StdCtrls, ExtCtrls;
type
Tgzdallfrm = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
ComboBox1: TComboBox;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
DBGrid1: TDBGrid;
DataSource1: TDataSource;
procedure FormShow(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
gzdallfrm: Tgzdallfrm;
implementation
uses dbdata, main, gzdasz;
{$R *.dfm}
procedure Tgzdallfrm.FormShow(Sender: TObject);
begin
combobox1.Clear;
with data.ADOpublic do
begin
close;
sql.Clear;
sql.Add('select distinct 工資月份 from 工資表');
open;
end;
while not data.ADOpublic.Eof do
begin
combobox1.Items.Add(data.ADOpublic.FieldByName('工資月份').Value);
data.ADOpublic.Next;
end;
with data.gzt do
begin
close;
sql.Clear;
sql.Add('select * from 工資表');
open;
end;
data.gzt.Active:=true;
end;
procedure Tgzdallfrm.ComboBox1Change(Sender: TObject);
begin
with data.gzt do
begin
close;
sql.Clear;
sql.Add('select * from 工資表 where 工資月份=:a');
parameters.ParamByName('a').Value:=combobox1.Text;
open;
end;
end;
procedure Tgzdallfrm.SpeedButton2Click(Sender: TObject);
begin
close;
end;
procedure Tgzdallfrm.SpeedButton1Click(Sender: TObject);
begin
application.CreateForm(Tgzdaszfrm,gzdaszfrm);
gzdaszfrm.ShowModal;
gzdaszfrm.Free;
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -