与还原窗体
图7.21
选择数据备份可以将系统数据库备份到自己选择的路径中。
(16)点"修改密码",显示修改密码窗体
图7.22
输入自己的用户名与旧密码,若就密码不正确提示密码错误,再输入新密码(二次),若密码一致提示"修改成功",否则提示"修改失败"。
八.程序代码
(一)供应商信息管理
procedureTsupplyFrm.ToolButton1Click(Sender:TObject);
begin
try
ifedit1.Text=''then
showmessage('Dataisnotenough!')
else
begin
withdatamodule2.ADSsupplymsdo
begin
insert;
FieldByName('供应商编号').AsString:=edit1.Text;
FieldByName('联系人姓名').AsString:=edit2.Text;
FieldByName('电话号码').AsString:=edit3.Text;
FieldByName('邮政编码').AsString:=edit4.Text;
FieldByName('传真号码').AsString:=edit5.Text;
FieldByName('公司名称').AsString:=edit6.Text;
FieldByName('公司地址').AsString:=edit7.Text;
FieldByName('公司主页').AsString:=edit8.Text;
FieldByName('所在城市').AsString:=edit9.Text;
FieldByName('所在地区').AsString:=edit10.Text;
FieldByName备注信息').AsString:=memo1.Lines.Text;
post;
refresh;
end;
end;
except
begin
showmessage('关键字已存在,添加失败!');
datamodule2.ADSsupplyms.Cancel;
end;
end;
(二)顾客信息管理
procedureTcustomerfrm.ToolButton1Click(Sender:TObject);
begin
try
if(edit1.Text='')or(edit2.Text='')or(edit3.Text='')or(edit4.Text='')or(edit5.Text='')or(edit6.Text='')then
showmessage('Dataisnotenough!')
else
begin
withdatamodule2.ADScustomermsdo
begin
Insert;
FieldByName(顾客编号').AsString:=edit1.Text;
FieldByNam(联系人名').AsString:=edit2.Text;
FieldByName(电话号码').AsString:=edit3.Text;
FieldByName(邮政编码').AsString:=edit4.Text;
FieldByName(传真号码').AsString:=edit5.Text;
FieldByName(公司名称').AsString:=edit6.Text;
FieldByName(公司地址').AsString:=edit7.Text;
FieldByName(公司主页').AsString:=edit8.Text;
FieldByName(所在城市').AsString:=edit9.Text;
FieldByName(所在地区').AsString:=edit10.Text;
FieldByName('备注信息').AsString:=memo1.Lines.Text;
post;
refresh;
end;
end;
except
begin
showmessage('关键字已存在,添加失败!');
end;
(三)商品信息管理
procedureTgoodsfrm.ToolButton1Click(Sender:TObject);
begin
try
if(edit1.Text='')or(edit2.Text='')or(edit3.Text='')or(edit4.Text='')then
showmessage('Nodataputin!')
else
begin
withdatamodule2.ADSgoodsdo
begin
Insert;
FieldByName('商品编号').AsString:=edit1.Text;
FieldByName('商品名称').AsString:=edit2.Text;
FieldByName('商品规格').AsString:=edit3.Text;
FieldByName('计量单位').AsString:=edit4.Text;
FieldByName('备注信息').AsString:=memo1.Lines.Text;
post;
refresh;
end;
end;
except
begin
showmessage('关键字已存在,添加失败!');
datamodule2.ADSgoods.Cancel;
end;
(四)进货信息管理
procedureTstockmana.ToolButton1Click(Sender:TObject);
begin
try
withdatamodule1.ADOQryjhgldo
begin
close;
sql.Clear;
sql.Add('insertinto进货信息(进货信息编号,供应商编号,公司名称,商品编号,商品名称,商品规格,计量单位,商品数量,商品单价,商品总价,进货日期,备注信息)');
sql.Add('values(:a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9,:a10,:a11,:a12)');
parameters.ParamByName('a1').Value:=edit4.Text;
parameters.ParamByName('a2').Value:=combobox1.Text;
parameters.ParamByName('a3').Value:=combobox2.Text;
parameters.ParamByName('a4').Value:=combobox3.Text;
parameters.ParamByName('a5').Value:=combobox4.Text;
parameters.ParamByName('a6').Value:=combobox5.Text;
parameters.ParamByName('a7').Value:=combobox6.Text;
parameters.ParamByName('a8').Value:=strtoint(edit1.Text)parameters.ParamByName('a9').Value:=strtofloat(edit2.Text);parameters.ParamByName('a10').Value:=strtofloat(edit3.Text);
parameters.ParamByName('a11').Value:=strtodate(edit5.Text);
parameters.ParamByName('a12').Value:=Memo1.Text;
execsql;
close;
sql.Clear;
sql.Add('select*from进货信息');
open;
end;
except
showmessage('关键字重复,添加失败!');
end;
(五)销售信息管理
procedureTsalefindfrm.ToolButton1Click(Sender:TObject);
begin
ifcheckbox2.Checked=truethen
withdatamodule1.ADOQryxsdo
begin
ifcheckbox1.Checked=truethen
begin
close;
sql.Clear;
sql.Add('selectsum(商品数量*商品单价)as总价格from销售信息where');
sql.Add(combobox1.Items[combobox1.itemindex]);
sql.Add('like'+'''%'+edit1.Text+'%''');
sql.Add('and');
sql.Add('销售日期>=:Aand进货日期<=:B');parameters.ParamByName('A').Value:=datetostr(DateTimePicker1.Date)parameters.ParamByName('B').Value:=datetostr(DateTimePicker2.Date);
open;
edit3.Text:=fieldbyname('总价格').AsString;
close;
sql.Clear;
sql.Add('select*from销售信息where');
sql.Add(combobox1.Items[combobox1.itemindex]);
sql.Add('like'+'''%'+edit1.Text+'%''');sql.Add('and');
sql.Add('销售日期>=:Aand进货日期<=:B');
parameters.ParamByName('A').Value:=datetostr(DateTimePicker1.Date);parameters.ParamByName('B').Value:=datetostr(DateTimePicker2.Date);
open;
edit2.Text:=inttostr(datamodule1.ADOQryxs.RecordCount);
end
else
begin
close;
sql.Clear;
sql.Add('selectsum(商品数量*商品单价)as总价格from销售信息where');
sql.Add(combobox1.Items[combobox1.itemindex]);
sql.Add('like'+'''%'+edit1.Text+'%''');
open;
edit3.Text:=fieldbyname('总价格').AsString;
close;
sql.Clear;
sql.Add('select*from销售信息where');
sql.Add(combobox1.Items[combobox1.itemindex]);
sql.Add('like'+'''%'+edit1.Text+'%''');
open;edit2.Text:=inttostr(datamodule1.ADOQryxs.RecordCount);
end;
end
else
withdatamodule1.ADOQryxsdo
begin
ifcheckbox1.Checked=truethen
begin
close;
sql.Clear;
sql.Add('selectsum(商品数量*商品单价)as总价格from销售信息where');
sql.Add(combobox1.Items[combobox1.itemindex]);
sql.Add('like'+'''%'+edit1.Text+'%''');
sql.Add('and');
sql.Add('销售日期>=:Aand进货日期<=:B');parameters.ParamByName('A').Value:=datetostr(DateTimePicker1.Date)parameters.ParamByName('B').Value:=datetostr(DateTimePicker2.Date);
open;
edit3.Text:=fieldbyname('总价格').AsString;
close;
sql.Clear;
sql.Add('select*from销售信息where');
sql.Add(combobox1.Items[combobox1.itemindex]);
sql.Add('='+''''+edit1.Text+'''');
sql.Add('and');
sql.Add('销售日期>=:Aand进货日期<=:B');parameters.ParamByName('A').Value:=datetostr(DateTimePicker1.Date);parameters.ParamByName('B').Value:=datetostr(DateTimePicker2.Date);
open;
edit2.Text:=inttostr(datamodule1.ADOQryxs.RecordCount);
end
else
begin
close;
sql.Clear;
sql.Add('selectsum(商品数量*商品单价)as总价格from销售信息where');
sql.Add(combobox1.Items[combobox1.itemindex]);
sql.Add('like'+'''%'+edit1.Text+'%''');
open;
edit3.Text:=fieldbyname('总价格').AsString;
close;
sql.Clear;
sql.Add('select*from销售信息where');
sql.Add(combobox1.Items[combobox1.itemindex]);
sql.Add('='+''''+edit1.Text+'''');
open;
edit2.Text:=inttostr(datamodule1.ADOQryxs.RecordCount);
end;
九、参考资料
[1]刘瑞新、汪远征、李凤华编著《DELPHI程序设计教程》
机械工业出版社2005年1月第一版
[2]侯太平、童爱红编著,张琦主审《DELPHI数据库编程》
清华大学出版社北京交通大学出版社2005年10月第二次
[3]文斌刘长青田原编著《软件工程与软件文挡写作》
清华大学出版社北京交通大学出版社2005年8月第一次
[4]叶鑫主编刘仁云曹芳副主编《Delphi2005课程设计案例精编》
中国水利水电出版社2006年1月第一次
十、结束语
经过几个月的设计和开发,贸易公司信息管理系统基本开发完毕。其功能基本符合用户需求,能够完成贸易流通过程中所涉及到的基本信息的、输入、修改,查询等动能。并提供部分系统维护功能,使用户方便进行用户名称和密码的更改,提高了软件的安全性和健壮性。此外,本软件对于数据的一致性的问题也通过程序进行了有效的解决。
但现实中的贸易交易形式是多种多样的,是由于毕业设计时间较短,需求分析做得不够完善,个人能力以及精力等因素的限制,本管理系统存在着很多不足。尽管本系统存在不足,但易于日后程序更新、数据库管理容易、操作方便、效率高、安全性好等优点是本管理系统所必需的。本系统还有许多不尽如人意的地方。比如功能不是很完善、用户界面不够美观,出错处理不够等多方面问题。这些都有待进一步改善。
十一.致谢
在本次毕业设计中,我从指导老师苗颖老师身上学到了很多东西。苗颖老师认真负责的工作态度,严谨的治学精神和深厚的理论水平都使我收益匪浅。她无论在理论上还是在实践中,都给与我很大的帮助,使我得到不少的提高这对于我以后的工作和学习都有一种巨大的帮助,感谢她耐心的辅导。另外,系统能及时开发完成也得益于同组同学之间的密切协作,这里一并表示感谢!
本系统是基于Delphi7.0的基础上,运用后台数据库的大量存储,实现对窗体及模块的功能实现,本系统操作简单,是各贸易公司的认可,在以前那些管理不当的情况之时,使用本系统可是贸易公司,大中型企业的管理达到方便快捷的目的。在信息社会,网络管理是一种先进的管理方法,所以本系统的开发可以直接继承了以往那些管理方法的优点,最主要的是它使用网络化管理。贸易公司信息管理系统是基于SQLServer数据库和Delphi7.0来实现其功能的,在本系统制作中,各模块之间的连接都需要注意,因为它们之间的关系和容易弄混,一旦连接错误,将会导致整个系统的功能实现不了其功能。另外还添加了帮助的信息,这为使用时出现的不明白的地方可以方便查阅。本系统的开发,希望能给各企业的管理方面提供方便快捷的需要。在当今社会中,许多企业因为管理方面的不妥善,导致经济质量抓不上去,这就需要一个功能全面、简单易懂的管理系统来管理企业的职工人事。本系统使用数据库和Delphi7.0共同来完成其功能的。同时各窗体和模块之间的连接一定要正确,否则将会无法实现其功能。最主要的是数据库的连接,这也是本系统的重点,强大的数据库在后台的存储,给系统提供了大量的数据,功能强大。
systemisbasedonDelphi7.0thefoundationof0on,withbackstagesupporterdatabasestockinlargequantities,realizationrealizesforthefunctionofwindowbodyandmodular,itissimplethatthissystemoperate,isschoolhigheachapprove,inbeforethoseconditionsofunsuitablemanagementwhen,usesystemhowever,thepersonnelmanagementofschool,companyandlargeandmedium-sizedenterprisereachesthepurposewithshortcutconvenience.Ininformationsociety,networkmanagementisakindofadvancedmanagementmethod,so,thedevelopmentofthissystemcanbedirecttohaveinheritedtheadvantageofthoseformermanagementmethods,ismostmajortobeittousenetworkmanagement.StudentinformationmanagementsystemisbasedonSQLServerdatabaseandDelphi7.0cometorealizeitsfunction,inthissystemmakes,theconnectionbetweeneachmodularneedtobenoticed,becausethembetweenrelationandeasylanemix,oncejoiningmistake,willcausethefunctionofentiresystemtocannotrealizeitsfunction.Additionally,theplaceofnotunderstandofhavingstilladdedhelpthatinformationandthisariseforusecanbeconvenienttolookup.Hopeandthedevelopmentofthissystemcanofferconvenienceshortcutneedsintheaspectoftheschoolmanagementofeachcollege.Itdoesnotbegoneupthatinpresentsociety,alotofcollegesgrabbecauseofmanagingthenotproper,teachingqualityofaspectthatcausesschool,thisneedafunctiontheoverall,simplemanagementsystemthatiseasytounderstandthemanagementteachingofschool.ThesystematicstorehouseofservicedataiswithDelphi7.0cometogetherconsummatelyitsfunction.Atthesametime,theconnectionbetweeneachwindowbodyandmodularmustbecorrect,otherwisewillcannotrealizeitsfunction.Whatismostmajoristhattheconnectionofdatabase,thisisalsosystematicandkey,powerfuldatabaseinbackstagesupporterstock,haveofferedplentyofdatastosystem,Thefunctionisformidable
??
??
??
??
吉林师范大学应用工程学院毕业论文
第81页共82页
上一篇:
(VB)人力资源系统源码+源码+论文+开题+论文答辩稿(论文和程序)
下一篇:
多年来只想说一句,我不怪你