p_gly.pas

来自「图书出版行业 对于图书样稿/清样/样书/成书的质检环节控制」· PAS 代码 · 共 82 行

PAS
82
字号
unit p_gly;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, Buttons, ToolWin, ComCtrls, Grids, DBGrids, DB, ADODB;

type
  TF_gly = class(TForm)
    ToolBar1: TToolBar;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    SpeedButton3: TSpeedButton;
    Panel1: TPanel;
    Query_gly: TADOQuery;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    procedure FormShow(Sender: TObject);
    procedure SpeedButton3Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
     change:boolean;
    { Public declarations }
  end;

var
  F_gly: TF_gly;

implementation

uses p_main, p_login, p_addgly;

{$R *.dfm}

procedure TF_gly.FormShow(Sender: TObject);
begin

 with query_gly do
   begin
      close;
      sql.Clear;
      sql.Add('select * from 管理员表 order by id asc');
      open;
   end;

end;

procedure TF_gly.SpeedButton3Click(Sender: TObject);
begin

try
  if Application.MessageBox('是否删除当前记录?','提示',mb_yesno)=id_yes then
      query_gly.Delete;
  except
    Application.MessageBox('不能删除','提示',mb_yesno);
  end;

end;

procedure TF_gly.SpeedButton2Click(Sender: TObject);
begin

change:=true;
application.CreateForm(Tf_addgly,f_addgly);
f_addgly.ShowModal;
f_addgly.Free;

end;

procedure TF_gly.SpeedButton1Click(Sender: TObject);
begin
application.CreateForm(Tf_addgly,f_addgly);
f_addgly.ShowModal;
f_addgly.Free;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?