论文无忧网提供:计算机毕业论文范文|计算机毕业设计|计算机毕业论文
栏目导航 ASP Java Web .NET VB6.0 JAVA VC VF DELPHI PB 计算机网络 计算机科学与技术 PHP 安卓APP 其他 C# 代写论文
当前位置: > 计算机 > DELPHI >

A400108煤气站管理系统DPAC

  if messagedlg('确定退出吗?',mtconfirmation,[mbyes,mbno],0)=mryesthen

内容来自www.paper51.com

application.Terminate; 内容来自论文无忧网 www.paper51.com

end;

内容来自论文无忧网 www.paper51.com

procedure Tloginfm.FormCreate(Sender: TObject);

copyright paper51.com

var

内容来自论文无忧网 www.paper51.com

mypath:string; paper51.com

begin copyright paper51.com

j:=0; copyright paper51.com

mypath:=extractfilepath(paramstr(0));

内容来自论文无忧网 www.paper51.com

ADOquery.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;DataSource='+mypath+'data\kcgl.mdb;Persist Security Info=False';

内容来自www.paper51.com

ADOquery.active:=true;

内容来自论文无忧网 www.paper51.com

with adoquery do

copyright paper51.com

begin 内容来自www.paper51.com

close;

内容来自论文无忧网 www.paper51.com

sql.Clear;

copyright paper51.com

sql.Add('select * from czyb'); 内容来自www.paper51.com

open;

paper51.com

if recordcount>0 then

paper51.com

begin copyright paper51.com

first; http://www.paper51.com

while not eof do 内容来自论文无忧网 www.paper51.com

begin

内容来自www.paper51.com

usernamebox.Items.Add(fieldbyname('姓名').AsString); 内容来自论文无忧网 www.paper51.com

next; paper51.com

end; http://www.paper51.com

end

内容来自论文无忧网 www.paper51.com

else

paper51.com

showmessage('当前没有用户');

copyright paper51.com

end;

http://www.paper51.com

end;

paper51.com

procedure Tloginfm.FormActivate(Sender: TObject); paper51.com

var

内容来自论文无忧网 www.paper51.com

mypath:string;

paper51.com

begin

内容来自论文无忧网 www.paper51.com

j:=0;

http://www.paper51.com

mypath:=extractfilepath(paramstr(0));

内容来自论文无忧网 www.paper51.com

ADOquery.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;DataSource='+mypath+'data\kcgl.mdb;Persist Security Info=False';

paper51.com

ADOquery.active:=true; 内容来自www.paper51.com

end;

http://www.paper51.com

procedure Tloginfm.loginbtClick(Sender: TObject);

http://www.paper51.com

begin paper51.com

if trim(usernamebox.text)='' then

http://www.paper51.com

begin copyright paper51.com

showmessage('请选择用户名!'); 内容来自论文无忧网 www.paper51.com

exit; 内容来自论文无忧网 www.paper51.com

end;

copyright paper51.com

with adoquery do

paper51.com

begin

内容来自www.paper51.com

close; 内容来自www.paper51.com

sql.Clear;

http://www.paper51.com

sql.Add('select * from czyb where 姓名=:usernameand 密码=:userpas');

内容来自www.paper51.com

Parameters.ParamByName('username').Value:=trim(usernamebox.text); 内容来自论文无忧网 www.paper51.com

Parameters.ParamByName('userpas').Value:=userpasedit.text; http://www.paper51.com

open; 内容来自www.paper51.com

if recordcount<1 then 内容来自论文无忧网 www.paper51.com

begin

paper51.com

if j=3 then

内容来自论文无忧网 www.paper51.com

application.Terminate; 内容来自论文无忧网 www.paper51.com

messagedlg('密码错误!还有'+inttostr(3-j)+'次机会',mtconfirmation,[mbok],0);

http://www.paper51.com

j:=j+1;

http://www.paper51.com

exit;

paper51.com

end http://www.paper51.com

else 内容来自www.paper51.com

begin copyright paper51.com

if fieldbyname('权限').AsString='计算机管理员' then 内容来自论文无忧网 www.paper51.com

mainfm.id:='计算机管理员' http://www.paper51.com

else

copyright paper51.com

mainfm.id:='操作员'; copyright paper51.com

mainfm.username:=fieldbyname('姓名').AsString;

copyright paper51.com

mainfm.userpas:=fieldbyname('密码').AsString;

copyright paper51.com

mainfm.statusbar.Panels.Items[0].Text:='当前用户:'+mainfm.username; 内容来自论文无忧网 www.paper51.com

loginfm.close; paper51.com

end; http://www.paper51.com

end; paper51.com

if mainfm.id='计算机管理员' then

paper51.com

begin http://www.paper51.com

mainfm.N15.Enabled:=true; copyright paper51.com

mainfm.N17.Enabled:=true;

内容来自论文无忧网 www.paper51.com

mainfm.N19.Enabled:=true;

copyright paper51.com

mainfm.N39.Enabled:=true;

内容来自论文无忧网 www.paper51.com

mainfm.N25.Enabled:=true; http://www.paper51.com

mainfm.N49.Enabled:=true; 内容来自www.paper51.com

mainfm.N50.Enabled:=true;

内容来自论文无忧网 www.paper51.com

mainfm.N31.Enabled:=true; 内容来自论文无忧网 www.paper51.com

end;

http://www.paper51.com

if mainfm.id='操作员' then

copyright paper51.com

begin 内容来自www.paper51.com

mainfm.N15.Enabled:=false; paper51.com

mainfm.N17.Enabled:=false;

内容来自www.paper51.com

mainfm.N19.Enabled:=false; paper51.com

mainfm.N39.Enabled:=false;

内容来自www.paper51.com

mainfm.N25.Enabled:=false; paper51.com

mainfm.N49.Enabled:=false;

http://www.paper51.com

mainfm.N50.Enabled:=false; paper51.com

mainfm.N31.Enabled:=false;

内容来自www.paper51.com

end;

http://www.paper51.com

end; paper51.com

procedure Tloginfm.userpaseditKeyDown(Sender: TObject; var Key: Word;

copyright paper51.com

  Shift: TShiftState);

http://www.paper51.com

begin

内容来自www.paper51.com

if key=13 then http://www.paper51.com

loginbt.Click;

copyright paper51.com

if Shift>=[ssAlt] then

内容来自论文无忧网 www.paper51.com

showmessage('操作非法!')

内容来自论文无忧网 www.paper51.com

end; 内容来自www.paper51.com

procedure Tloginfm.usernameboxKeyDown(Sender: TObject; var Key: Word;

copyright paper51.com

  Shift: TShiftState); copyright paper51.com

begin http://www.paper51.com

if Shift>=[ssAlt] then

内容来自www.paper51.com

showmessage('操作非法!') 内容来自论文无忧网 www.paper51.com

end; http://www.paper51.com

end. copyright paper51.com

------分隔线----------------------------
联系方式