管理信息系統課程方案設計書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

提交評論