?? xmgl_pas.pas
字號:
unit xmgl_pas;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Mask, DBCtrls, ExtCtrls, Grids, DBGrids,datamd_pas,
DB;
type
Txmgl_form = class(TForm)
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
Label1: TLabel;
Label2: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
BitBtn1: TBitBtn;
DataSource1: TDataSource;
BitBtn2: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
xmgl_form: Txmgl_form;
implementation
{$R *.dfm}
procedure Txmgl_form.BitBtn1Click(Sender: TObject);
begin
datamodule1.ADOTable_xm.Active:=false;
close();
end;
procedure Txmgl_form.BitBtn2Click(Sender: TObject);
var xmid:string;
begin
if Application.messagebox('是否清空當前項目以及相關信息','確認',mb_yesno)=IDYES then
begin
xmid:=datasource1.DataSet.fieldbyname('項目_id').Value;
datamodule1.ADOCommand1.CommandText:='delete from xmck where 項目_id='''+xmid+'''';
datamodule1.ADOCommand1.Execute;
datamodule1.ADOCommand1.CommandText:='delete from kc where 項目_id='''+xmid+'''';
datamodule1.ADOCommand1.Execute;
datamodule1.ADOCommand1.CommandText:='delete from kccx where 項目_id='''+xmid+'''';
datamodule1.ADOCommand1.Execute;
datamodule1.ADOCommand1.CommandText:='delete from xm where 項目_id='''+xmid+'''';
datamodule1.ADOCommand1.Execute;
datamodule1.ADOTable_xm.Active:=false;
datamodule1.ADOTable_xm.Active:=true;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -