rt_mg.~pas

来自「很不错很实用的学生联机考试系统」· ~PAS 代码 · 共 58 行

~PAS
58
字号
unit rt_mg;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Grids, DBGrids, DB, DBTables, ExtCtrls, StdCtrls, Mask, DBCtrls;

type
  TRtMg = class(TForm)
    Database1: TDatabase;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    DBEdit3: TDBEdit;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Query1: TQuery;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  RtMg: TRtMg;

implementation

{$R *.dfm}

procedure TRtMg.Button1Click(Sender: TObject);
begin
Query1.Append;
end;

procedure TRtMg.Button2Click(Sender: TObject);
begin
Query1.Delete;
Query1.ApplyUpdates;
end;

procedure TRtMg.Button3Click(Sender: TObject);
begin
Query1.ApplyUpdates;
end;

end.

⌨️ 快捷键说明

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