管理信息系统课程方案设计书87469_第1页
管理信息系统课程方案设计书87469_第2页
管理信息系统课程方案设计书87469_第3页
管理信息系统课程方案设计书87469_第4页
管理信息系统课程方案设计书87469_第5页
已阅读5页,还剩12页未读 继续免费阅读

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、管理信息系统课程设计一、实验目标1. 通过学习管理信息系统,熟练掌握C+ Builder开发环境与SQLServer连接应用来实现对信息的管理。2. 进一步加深了对数据库理解以及C+的应用,我们对信息管理 系统这门课有了更深的理解。二、实验内容使用C+ Builder和SQL的连接来实现考勤管理,考勤管理包括以 下功能:考勤记录、假期申请、出差申请、加班中请、调休申请、 考勤查询。三、实验步骤1. 建立数据库2. 设置主窗体和登录窗体3. 设置录入窗体和查询窗体四、程序清单系统代码/#include #pragma hdrstop/-USEFORM(HMain.cppM,MainForm)oU

2、SEFORM(”login.cpp”,Fmogin)oUSEFORM(Hattendence.cpp, record )oUSEFORM(nvacation.cppH, vacation)oUSEFORM(Hevectio.cpp, evection)。USEFORM(HJiaBan.cppH, work).USEFORM(HKQ_ChaXun.cppM, search)oUSEFORM(Htak.cpp take)./WINAPI WinMain(HINSTANCE. HINSTANCE. LPSTR. int)tryApplication-lnitialize()oApplication-

3、CreateForm(_classid(TMainForm), &MainForm)Application-CreateForm(_classid(TFmJogin), &FmJogin) oApplication-CreateForm(_classid(Trecord), & record)。AppIication-CreateForm(_classid(Tvacation), &vacation) Application-CreateForm(_classid(Tevection), &evection)oApplication-CreateForm(_classid(Twork), &w

4、ork)。Application-CreateForm(_classid(Tsearch), & search) 0Application-CreateForm(_classid(Ttake), &take)o Application-Run()ocatch (Exception &exception)AppIication-ShowException( &exception)ocatch (.)trythrow Exception)。catch (Exception &exception)Application-ShowException(&cxccption)。return 0。/主窗体的

5、代码include #pragma hdrstopinclude umain.hM#includc Togin.iT#includc nattendence.hn#includc ,fvacation.hH/#pragnia package(smart_init)#pragma resourceTMainForni *MainFormo/fastcall TMainForm:TMainForm(TCoinponent* Owner):TForm(Owner)/-void fastcall TMainForni:FormShow(TObject *Sender)loginok=falseoFmJ

6、ogin-ShowModal() /调用登录窗体if(!loginok)CIose()o/void _fastcall TMainForni:N7Click(T0bject *Sender)Close()o/void _fastcall TMainForm:NlClick(TObject *Sender)record-Show()0/#ifndef mainH#dcfine mainH/include include #include #include include #includc #includc /class TMainForm : public TFormpublished:/ ID

7、E-managed ComponentsTMainMenu *MainMenul TMenuItem *N 1。TMenuItem *N2。TMenuItem *N3。TMenuItem *N4。TMenuItem *N5。TMenuItem *N6TADOConnection *ADOConnectionl。TMenuItem *N7。void _fastcall FormShow(TObject *Sender)ovoid _fastcall N7Click(TObject *Sendcr)ovoid _fastcall NlCIick(TObject *Scndcr)。private:

8、/ User declarationspublic:/ User declarations_fastcall TMainForm(TComponent* Owner)obool loginokuAnsiString username oo/-extern PACKAGE TMainForm *MainFornio/-#endif登录代码#includc vvclh#pragnia hdrstop#includc Hlogin.hH#includc uMain.hHinclude HKQ_ChaXun.hH/#pragina package(smart_init)#pragma resource

9、 n*.dfmMTFm_login *FmJoginc/-fastcall TFm_login:TFm_login(TComponent* Owner):TForm(Owner)/void _fastcall TFm_login:BitBtnlClick(TObject *Sender)static int countAnsiString ScS=Mselect * from 管理员 where 用户=,M+Editl-Text+H, and 密码=,H+Edit2-Text+. pwdQuerr-Close() pwdQuerr-SQL-Clear()。 pwdQuery-SQL-Add(S

10、)o pwdQueryr-Open()。if(pwdQuery-Eof)count+oif(count=3)pwdQucry-Close()Fm_login-Close()oMainForm-Close()oApplication-McssagcBox(”用户名或密码错误,请重新输入错误-MB_ICONERROR+MB_OK)oEdit2-Text=M,oEdit2-SetFocus()oelseMainForm-loginok=tnie oEditl-Text=M,oEdit2-Text=M,opwdQuerr-CIose()。FmJogin-Close()o/-void fastcall

11、TFmJogin:BitBtn2CIick(TObject Sender)Close()oMainForm-Close()o)/void _fastcall TFmJogin:Edit 1 KeyPress(TObject Sender, char &Key) if(Key=char(13) SelectNext(TWinControl*)(Sender)Jrue,true)c/#ifndef loginH#define loginH/include include #include #include include #includc #includc #include /class TFmJ

12、ogin : public TFormpublished:/ IDE-managed ComponentsTLabel *LabelloTLabel *Label2oTLabel *Labcl3oTEdit *EditUTEdit *Edit2cTBitBtn *BitBtnUTBitBtn *BitBtn2oTADOQuery *pwdQucry。void _fastcall BitBtn 1 CIick(TObject *Sender)ovoid _fastcall BitBtn2Click(TObject *Sender)ovoid _fastcall Edit 1 KeyPress(T

13、Object Sender, char &Key)。 private: / User declarations public:/ User declarations_fastcall TFmJogin(TComponent* Owner)0bool loginokuAnsiString usernameo/extern PACKAGE TFmJogin *Fm_logim/-#endif假期代码/#include #pragma hdrstopinclude uvacation.hHinclude uMain.hMinclude Hattendence.hM/-#pragma package(

14、smart_init)#pragma link HRzDBEditH#pragma link MRzEditH#pragma resourceTvacation * vacation o/fastcall Tvacation:Tvacation(TComponent* Owner):TForm(Owner)/-# ifndef vacationH#dcfine vacationH/#include #include include #includc #includc #includc #includc #include #includc include ,RzDBEdit.hppNinclud

15、e nRzEdit.hppH#include /class Tvacation : public TFormpublished:/ IDE-managed ComponentsTLabel *Labcll TLabel *Label2oTLabel *Labcl3。TLabel *Labcl4oTLabel *Labcl5oTLabel *Labcl6oTLabel *Labcl8oTLabel *Labcl9oTDBComboBox *DBComboBox2aTBitBtn *BitBtnl.TBitBtn *BitBtn2oTBitBtn *BitBtn3oTBitBtn *BitBtn4

16、oTBitBtn *BitBtn50TBitBtn *BitBtn6oTDBGrid *DBGridUTRzDBDateTimeEdit *RzDBDateTimeEditl oTRzDBDateTimeEdit *RzDBDateTimeEdit2oTDBEdit *DBEditloTDBEdit *DBEdit2oTDBEdit *DBEdit3oprivate: / User declarationspublic:/ User declarations_fastcall Tvacation(TComponent* Owner) a)o/extern PACKAGE Tvacation V

17、acation。/#endif出差代码/#ifndef evectioH#dcfine evectioH #include include include #include #include include include #includc #includc /class levection : public TFormpublished:/ IDE-managed ComponentsTLabcl *LabclloTDBGrid *DBGridloTLabel *Label2oTLabel *Label3oTLabel *Label4oTLabel *Label5oTLabel *Labcl

18、6。TLabel *Label7oTLabel *Label8oTBitBtn *BitBtnloTBitBtn *BitBtn2oTBitBtn *BitBtn3oTBitBtn *BitBtn4oTBitBtn *BitBtn5oTBitBtn *BitBtn6aTBitBtn *BitBtn7oTDBComboBox *DBComboBoxl aTDBComboBox *DBComboBox2aTDBComboBox *DBComboBox3aTDBEdit *DBEditloTDBEdit *DBEdit2oTDBEdit *DBEdit3oTDBEdit *DBEdit4opriva

19、te: / User declarationspublic:/ User declarations_fastcall Tevection(TComponent* Owner)o/extern PACKAGE Tevection *evectiono/-#endif加班代码/-include #pragma hdrstop#includc HJiaBan.hH/#pragnia package(smart_init)#pragma resourceTwork *worko/fastcall Twork: Twork( T Component * Owner):TForm(Owner)/-/#if

20、ndef JiaBanH#define JiaBanH/#includc #include #include #includc #includc #include include include /-class Twork : public TForm_published:/ IDE-managed ComponentsTLabel *Labell oTDBGrid *DBGridloTLabel *Labcl2oTLabel *Labcl3oTLabel *Labcl4。TLabel *Labcl5oTLabel *Labcl6。TDateTimcPicker *DateTimePicker

21、l TDateTimePicker *DateTimePicker2。TEdit *EditUTEdit *Edit2eTBitBtn *BitBtnloTBitBtn *BitBtn20TBitBtn *BitBtn3oTBitBtn *BitBtn4oTBitBtn *BitBtn5oTBitBtn *BitBtn6aprivate: / User declarationspublic:/ User declarations_fastcall Twork(TComponent* Owner)oo/extern PACKAGE Twork *worko/-#endif调休代码/#includ

22、c #pragma hdrstop #include utak.hM/-#pragma package(smartjnit)#pragma resourceTtake *takeo/fastcall Ttake:Ttake(TComponent* Owner):TForm(Owner)/#ifndef takH#dcfine takH/-#include include include #include #includc include include #includc /class Ttake : public TFormpublished:/ IDE-managed ComponentsT

23、Label *Labcll。TDBGrid *DBGridloTLabel *Labcl2oTLabel *Label3oTLabel *Label4oTLabel *Label5oTLabel *Label6oTLabel *Labcl7。TLabel *Label8oTLabel *Label9oTDBComboBox *DBComboBoxl aTDBComboBox *DBComboBox2aTDBComboBox *DBComboBox3TEdit *EditUTEdit *Edit2cTEdit *Edit3cTBitBtn *BitBtnl.TBitBtn *BitBtn2oTB

24、itBtn *BitBtn3.TBitBtn *BitBtn4oTBitBtn *BitBtn5oTBitBtn *BitBtn6oTBitBtn *BitBtn7oTLabel *LabeI10oTDBComboBox *DBComboBox4aprivate: / User declarationspublic:/ User declarations_fastcall Ttake(TComponent* Owner) 0o/extern PACKAGE Ttake *take/-#endif查询代码/-include #pragma hdrstopinclude HKQ_ChaXun.hH/#pragnia package(smart_init)#pragma resourceTsearch *searcho/fastcall Tsearch:Tsearch(TComponent* Owner) :TForm(Owner)/-/ #ifndef KQ_ChaXunH#dcfine KQ_ChaXunH/#include #includc #includc #include include include #include /-class Tsearch : public TForm_published:/ IDE-managed Componen

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论