?? jycdwh.pas
字號:
unit Jycdwh;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, DBGrids, DB, RSGLCommon, ActnList, StdCtrls, ExtCtrls, dmRsgl;
type
TJycdwhForm = class(TForm)
dsJycdwh: TDataSource;
dbJycdwh: TDBGrid;
alJycdwh: TActionList;
acDel: TAction;
pnlToolBar: TPanel;
btDel: TButton;
btExit: TButton;
acExit: TAction;
procedure acDelExecute(Sender: TObject);
procedure acExitExecute(Sender: TObject);
procedure alJycdwhUpdate(Action: TBasicAction; var Handled: Boolean);
private
{ Private declarations }
FdmRsgl: TdmRsgl;
public
{ Public declarations }
constructor Create(AOwner: TComponent; AdmRsgl: TdmRsgl); reintroduce;
end;
implementation
{$R *.dfm}
procedure TJycdwhForm.acDelExecute(Sender: TObject);
begin
if Application.MessageBox('是否刪除?', '確認', 1) = 1 then
dsJycdwh.DataSet.Delete;
end;
procedure TJycdwhForm.acExitExecute(Sender: TObject);
begin
Close;
end;
constructor TJycdwhForm.Create(AOwner: TComponent; AdmRsgl: TdmRsgl);
begin
inherited Create(AOwner);
FdmRsgl := admRsgl;
with dsJycdwh do
begin
DataSet := FdmRsgl.adotJycd;
DataSet.Open;
DataSet.Refresh;
end;
end;
procedure TJycdwhForm.alJycdwhUpdate(Action: TBasicAction;
var Handled: Boolean);
begin
acDel.Enabled := not (dsJycdwh.DataSet.Bof and dsJycdwh.DataSet.Eof);
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -