?? cghzedit.pas
字號:
unit cghzedit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, ExtCtrls, ComCtrls;
type
TcghzeditForm = class(TForm)
Bevel1: TBevel;
Label1: TLabel;
BitBtn2: TBitBtn;
BitBtn1: TBitBtn;
Label2: TLabel;
qtEdit: TEdit;
Label3: TLabel;
bzEdit: TEdit;
StatusBar1: TStatusBar;
procedure BitBtn2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
sqbidstr:string;
cpbhstr:string;
{ Public declarations }
end;
var
cghzeditForm: TcghzeditForm;
implementation
uses Datamodule;
{$R *.DFM}
procedure TcghzeditForm.BitBtn2Click(Sender: TObject);
begin
if (qtedit.text='') or (bzEdit.Text='')then
begin
messageDlg('請您輸入數據內容!',mtInformation,[mbOK],0);
exit;
end;
with datamodule1.PublicQuery1 do
begin
requestLive:=True;
sql.Clear;
sql.Add('select * From dbo.a_cghzglb');
sql.Add('where sqbid='+''''+sqbidstr+''''+' and cpbh='+''''+cpbhstr+'''');
prepare;
open;
edit;
FieldByName('qt').asstring:=qtEdit.Text;
FieldByname('bz').asstring:=bzEdit.Text;
post;
end;
messageDlg('記錄已經成功寫入數據庫!',mtInformation,[mbOK],0);
close;
end;
procedure TcghzeditForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
datamodule1.PublicQuery1.RequestLive:=false;
datamodule1.PublicQuery1.Close;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -