Delphi+Access学生信息管理系统10Word文档格式.docx

上传人:b****5 文档编号:16139244 上传时间:2022-11-20 格式:DOCX 页数:19 大小:1.76MB
下载 相关 举报
Delphi+Access学生信息管理系统10Word文档格式.docx_第1页
第1页 / 共19页
Delphi+Access学生信息管理系统10Word文档格式.docx_第2页
第2页 / 共19页
Delphi+Access学生信息管理系统10Word文档格式.docx_第3页
第3页 / 共19页
Delphi+Access学生信息管理系统10Word文档格式.docx_第4页
第4页 / 共19页
Delphi+Access学生信息管理系统10Word文档格式.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

Delphi+Access学生信息管理系统10Word文档格式.docx

《Delphi+Access学生信息管理系统10Word文档格式.docx》由会员分享,可在线阅读,更多相关《Delphi+Access学生信息管理系统10Word文档格式.docx(19页珍藏版)》请在冰豆网上搜索。

Delphi+Access学生信息管理系统10Word文档格式.docx

ComboBox1:

TComboBox;

Edit1:

TEdit;

Label1:

TLabel;

Timer1:

TTimer;

lblMsg:

Label2:

shpBall2:

TShape;

shpBall1:

procedureFormShow(Sender:

TObject);

procedureButton1Click(Sender:

procedureButton2Click(Sender:

procedureTimer1Timer(Sender:

private

{Privatedeclarations}

public

{Publicdeclarations}

end;

var

FormLogin:

TFormLogin;

nowUser:

String;

nowPower:

integer;

implementation

{$R*.dfm}

usesUnitDataModule,UnitConsole;

varisStop:

boolean;

procedureTFormLogin.FormShow(Sender:

begin

dataModule1.adoTable1.Open;

whiledataModule1.adoTable1.EOF<

>

truedo

begin

comboBox1.Items.Append(dataModule1.adoTable1.FieldValues['

user'

]);

dataModule1.adotable1.Next;

dataModule1.adoTable1.Close;

isStop:

=false;

lblMsg.Visible:

end;

procedureTFormLogin.Button1Click(Sender:

varuser1,pwd1:

string;

user1:

=comboBox1.Text;

pwd1:

=edit1.Text;

dataModule1.adoTable1.First;

whilenotdataModule1.adoTable1.EOFdo

if(user1=DataModule1.adoTable1.FieldValues['

])and(pwd1=DataModule1.adoTable1.FieldValues['

pwd'

])then

nowUser:

=user1;

dataModule1.ADOQuery1.Close;

dataModule1.ADOQuery1.SQL.Clear;

dataModule1.ADOQuery1.SQL.Add('

selectpowerfromAccountwhereuser='

'

+nowUser+'

);

dataModule1.ADOQuery1.Open;

nowPower:

=dataModule1.ADOQuery1.Fields[0].AsInteger;

formConsole.Show;

Exit;

DataModule1.adoTable1.Next;

ShowMessage('

登录失败,请重试!

edit1.Text:

='

;

comboBox1.SetFocus;

DataModule1.adoTable1.Close;

procedureTFormLogin.Button2Click(Sender:

Application.Terminate;

procedureTFormLogin.Timer1Timer(Sender:

if(notisStop)then

shpBall1.Left:

=shpBall1.Left-10;

shpBall2.Left:

=shpBall2.Left+10;

if(shpBall1.Left<

=100)thenisStop:

=true;

end

elselblMsg.Visible:

end.

预览界面:

UnitConsole.pas

unitUnitConsole;

Dialogs,Menus,Grids,DBGrids,StdCtrls,ExtCtrls,jpeg;

TFormConsole=class(TForm)

MainMenu1:

TMainMenu;

view1:

TMenuItem;

User:

quit1:

DBGrid1:

TDBGrid;

DBGrid2:

Add:

help:

userMang:

time1:

lblSec:

lblNote:

lblMin:

lblHour:

editSec:

editMin:

editHour:

procedureview1Click(Sender:

procedurequit1Click(Sender:

procedureAddUserClick(Sender:

procedureuserMangClick(Sender:

procedureAddClick(Sender:

procedurehelpClick(Sender:

procedureFormCreate(Sender:

proceduretime1Timer(Sender:

FormConsole:

TFormConsole;

usesUnitView,UnitAdd,UnitDataModule,UnitUserMang,UnitLogin;

varhour,min,sec,msec:

word;

procedureTFormConsole.view1Click(Sender:

formView.ShowModal;

procedureTFormConsole.quit1Click(Sender:

procedureTFormConsole.AddUserClick(Sender:

formAdd.ShowModal;

procedureTFormConsole.userMangClick(Sender:

formUserMang.ShowModal;

procedureTFormConsole.AddClick(Sender:

if(nowPower=1)thenformAdd.ShowModal

elseShowMessage('

您没有权限添加新用户,请联系管理员!

procedureTFormConsole.helpClick(Sender:

Delphi学生信息管理系统1.0,纪念于2012.5.20.'

procedureTFormConsole.FormShow(Sender:

withdataModule1.ADOQuery1do

Close;

SQL.Text:

select*fromStudent'

Open;

procedureTFormConsole.FormCreate(Sender:

DecodeTime(Now,hour,min,sec,msec);

editHour.Text:

=IntToStr(hour);

editMin.Text:

=IntToStr(min);

editSec.Text:

=IntToStr(sec);

procedureTFormConsole.time1Timer(Sender:

sec:

=sec+1;

if(sec=60)then

min:

=min+1;

=0;

if(min=60)then

hour:

=hour+1;

if(hour=24)then

=IntToStr(

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 考试认证 > 公务员考试

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1