⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jycdwh.pas

📁 Delphi开发的人事管理系统
💻 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 + -