【delphi开源代码栏目提醒】:网学会员--在 delphi开源代码编辑为广大网友搜集整理了: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.