G
gghhjj
Unregistered / Unconfirmed
GUEST, unregistred user!
表1
id name password
表2
id actioncap actionen actionvi
n 为id,drf返回值
procedure Tmain.FormCreate(Sender: TObject);
var i:integer;
begin
for i:=0 to actionlist1.ActionCount-1 do
begin
with main.ADOQuery1 do
begin
close;
sql.clear;
sql.add('select * from rig where id='+''''+n+'''');
sql.add('and actioncap='+''''+taction(actionlist1.Actions).caption+'''');
open;
if adoquery1.RecordCount=1 then taction(actionlist1.Actions).enabled:=adoquery1.fieldbyname('actionen').asboolean;
end;
end;
end;
用f7调试,通过但不能控制菜单
begin
Application.Initialize;
Application.CreateForm(Tdrf, drf);//登入
Application.CreateForm(Tmain, main);//主窗口
Application.Run;
end.
id name password
表2
id actioncap actionen actionvi
n 为id,drf返回值
procedure Tmain.FormCreate(Sender: TObject);
var i:integer;
begin
for i:=0 to actionlist1.ActionCount-1 do
begin
with main.ADOQuery1 do
begin
close;
sql.clear;
sql.add('select * from rig where id='+''''+n+'''');
sql.add('and actioncap='+''''+taction(actionlist1.Actions).caption+'''');
open;
if adoquery1.RecordCount=1 then taction(actionlist1.Actions).enabled:=adoquery1.fieldbyname('actionen').asboolean;
end;
end;
end;
用f7调试,通过但不能控制菜单
begin
Application.Initialize;
Application.CreateForm(Tdrf, drf);//登入
Application.CreateForm(Tmain, main);//主窗口
Application.Run;
end.