?? unit7.pas
字號:
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls, DB, ADODB, Grids, DBGrids;
type
Tmoddel = class(TForm)
Button1: TButton;
Button2: TButton;
Button3: TButton;
DBGrid1: TDBGrid;
DataSource1: TDataSource;
ADOTable1: TADOTable;
Label3: TLabel;
Label7: TLabel;
Edit1: TEdit;
ComboBox2: TComboBox;
Button4: TButton;
Button5: TButton;
procedure Button3Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
moddel: Tmoddel;
implementation
uses unit3, Unit2,unit1;
{$R *.dfm}
procedure Tmoddel.Button3Click(Sender: TObject);
begin
moddel.Close ;
main.ADOquery1.SQL.Clear;
main.ADOQuery1.SQL.Add('select * from 報刊信息');
main.ADOQuery1.Open;
end;
procedure Tmoddel.Button2Click(Sender: TObject);
begin
if application.MessageBox('確定刪除嗎?','操作提示',1)=1 then
main.ADOQuery1.Delete;
end;
procedure Tmoddel.Button1Click(Sender: TObject);
begin
if application.MessageBox('確定修改嗎?','操作提示',1)=1 then
begin
main.ADOQuery1.Edit;
main.ADOQuery1.Post;
end;
end;
procedure Tmoddel.Button4Click(Sender: TObject);
begin
with main.adoquery1 do
begin
sql.Clear;
sql.Add('select * from 報刊信息');
sql.Add(format(' where (%s',[trim(combobox2.Text)]));
sql.Add(format(' = ''%s'')',[trim(edit1.Text)]));
open;
end;
if main.ADOQuery1.RecordCount<1 then
showmessage('無此報刊!請確認是否輸入正確!');
end;
procedure Tmoddel.Button5Click(Sender: TObject);
begin
with main.adoquery1 do
begin
sql.Clear;
sql.Add('select * from 報刊信息');
open;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -