📄 reovto.pas
字号:
unit reovto;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Mask, DBCtrls, Grids, DBGrids;
type
TFom_revote = class(TForm)
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
GroupBox3: TGroupBox;
DBGrid1: TDBGrid;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
BitBtn1: TBitBtn;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
BitBtn2: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure RadioButton1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Fom_revote: TFom_revote;
implementation
uses data;
{$R *.dfm}
procedure TFom_revote.BitBtn1Click(Sender: TObject);
begin
if RadioButton1.Checked then
begin
if dm.ADQ_login.FieldByName('psw').AsString=edit1.Text then
begin
if edit2.Text=edit3.Text then
begin
dm.ADQ_login.Edit;
dm.ADQ_login.FieldByName('psw').AsString:=edit2.Text;
dm.ADQ_login.Post;
end;
end
end
else
begin
dm.ADQ_login.Edit;
dm.ADQ_login.FieldByName('psw').AsString:=edit1.Text;
dm.ADQ_login.Post;
end;
end;
procedure TFom_revote.RadioButton2Click(Sender: TObject);
begin
dm.ADQ_login.Append;
edit2.Enabled:=false;
edit2.Color:=clgray;
edit3.Enabled:=false;
edit3.Color:=clgray;
end;
procedure TFom_revote.RadioButton1Click(Sender: TObject);
begin
edit2.Enabled:=true;
edit3.Enabled:=true;
edit2.Color:=clwindow;
edit3.Color:=clwindow;
end;
procedure TFom_revote.BitBtn2Click(Sender: TObject);
begin
dm.ADQ_login.Delete;
dm.ADQ_login.Edit;
dm.ADQ_login.Post;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -