版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、??粕厴I(yè)論文(設(shè)計)題 目: 圖書綜合管理系統(tǒng) 學(xué)生姓名: 尹 良 英 學(xué) 號: 200316200126 指導(dǎo)教師: 黃 鐵 專業(yè)班級: 計算機信息管理03202班 完成時間: 2006年6月 摘 要3關(guān)鍵詞3第一章 系統(tǒng)需求分析41.1圖書管理系統(tǒng)的功能要求41.2 圖書管理系統(tǒng)的性能需求41.3圖書管理系統(tǒng)的數(shù)據(jù)需求51.4 圖書管理系統(tǒng)的功能分析模塊:5第二章 系統(tǒng)詳細(xì)設(shè)計72.1主窗體設(shè)計72.1.1 程序相關(guān)代碼72.2菜單設(shè)計72.2.1設(shè)計步驟72.3數(shù)據(jù)模塊設(shè)計82.4主要功能模塊設(shè)計112.4.1 系統(tǒng)登錄模塊設(shè)計112.4.2 程序相關(guān)代碼:122.5圖書信息管理模塊設(shè)
2、計142.5.1程序相關(guān)代碼152.6圖書借閱與歸還模塊設(shè)計342.7操作員管理模塊設(shè)計34第三章 數(shù)據(jù)庫設(shè)計363.1 創(chuàng)建數(shù)據(jù)庫363.2 創(chuàng)建數(shù)據(jù)表373.3 創(chuàng)建觸發(fā)器38第四章 office web component的應(yīng)用404.1 office web component使用40第五章 系統(tǒng)總結(jié)415.1圖書種類的樹型結(jié)構(gòu)415.2 窗體最大最小尺寸限制415.3 Ttree view組件的應(yīng)用41第六章 結(jié)束語43致謝44參考文獻(xiàn):45圖書綜合管理系統(tǒng)摘 要: 本系統(tǒng)采用c/s結(jié)構(gòu),是根據(jù)國內(nèi)圖書批發(fā),銷售領(lǐng)域的業(yè)務(wù)流程和特點,在綜合了很多書店管理系統(tǒng)的基礎(chǔ)上開發(fā)的業(yè)務(wù)管理軟件
3、。其內(nèi)容涵概了圖書流通領(lǐng)域的各個環(huán)節(jié),實用于各類中小型書店、圖書賣場及圖書批發(fā)企業(yè)。圖書信息管理系統(tǒng)設(shè)計采用了信息管理系統(tǒng)完整實用的開發(fā)方法,系統(tǒng)的最大特點是突出了實用和實效性,緊密結(jié)合用戶的使用要求,設(shè)計界面新穎,操作方便。 關(guān)鍵詞: c/s結(jié)構(gòu) office web component組件English summary:This system adoption c/s structure, wholesale according to the local book, sale realm of business process and characteristics, develop in
4、 synthesizing a lot of bookstore a management system of foundation of business management software.Its contents 涵 all the book circulate realm of each link, practical wholesale a business enterprise in the small scaled bookstore, book selling exhibition and the book in every variety.The management s
5、ystem design of the book information adopted an information a management the system complete practical development method, the biggest characteristics of system was outstanding practical with real results, close combine the usage request of customer, design interface novel, operate convenience.Keywo
6、rd: C/s structure office web component module第一章 系統(tǒng)需求分析1.1圖書管理系統(tǒng)的功能要求管理系統(tǒng)的總目標(biāo)是:在計算機網(wǎng)絡(luò),數(shù)據(jù)庫和先進(jìn)的開發(fā)平臺上,利用現(xiàn)有的軟件,配置一定的硬件,開發(fā)一個具有開放體系結(jié)構(gòu)的、易擴充的、易維護的、具有良好人機交互界面的管理系統(tǒng),實現(xiàn)自動化的計算機管理系統(tǒng), 1.2 圖書管理系統(tǒng)的性能需求為了保證系統(tǒng)能夠長期、安全、穩(wěn)定、可靠、高效的運行,檔案管理系統(tǒng)應(yīng)該滿足以下的性能需求:1 系統(tǒng)處理的準(zhǔn)確性和及時性系統(tǒng)處理的準(zhǔn)確性和及時性是系統(tǒng)的必要性能。在系統(tǒng)設(shè)計和開發(fā)過程中,要充分考慮系統(tǒng)當(dāng)前和將來可能承受的工作量,使系統(tǒng)
7、的處理能力和響應(yīng)時間能夠滿足對信息處理的需求。2 系統(tǒng)的開放性和系統(tǒng)的可擴充性管理系統(tǒng)在開發(fā)過程中,應(yīng)該充分考慮以后的可擴充性。例如用戶查詢的需求也會不斷的更新和完善。所有這些,都要求系統(tǒng)提供足夠的手段進(jìn)行功能的調(diào)整和擴充。而要實現(xiàn)這一點,應(yīng)通過系統(tǒng)的開放性來完成,既系統(tǒng)應(yīng)是一個開放系統(tǒng),只要符合一定的規(guī)范,可以簡單的加入和減少系統(tǒng)的模塊,配置系統(tǒng)的硬件。通過軟件的修補、替換完成系統(tǒng)的升級和更新?lián)Q代。3 系統(tǒng)的易用性和易維護性管理系統(tǒng)是直接面對使用人員的,而使用人員往往對計算機并不時非常熟悉。這就要求系統(tǒng)能夠提供良好的用戶接口,易用的人機交互界面。要實現(xiàn)這一點,就要求系統(tǒng)應(yīng)該盡量使用用戶熟悉的
8、術(shù)語和中文信息的界面;針對用戶可能出現(xiàn)的使用問題,要提供足夠的在線幫助,縮短用戶對系統(tǒng)熟悉的過程。管理系統(tǒng)中涉及到的數(shù)據(jù)是相當(dāng)重要的信息,系統(tǒng)要提供方便的手段供系統(tǒng)維護人員進(jìn)行數(shù)據(jù)的備份,日常的安全管理,系統(tǒng)意外崩潰時數(shù)據(jù)的恢復(fù)等工作。4 系統(tǒng)的標(biāo)準(zhǔn)性系統(tǒng)在設(shè)計開發(fā)使用過程中都要涉及到很多計算機硬件、軟件。所有這些都要符合主流國際、國家和行業(yè)標(biāo)準(zhǔn)。例如在開發(fā)中使用的操作系統(tǒng)、網(wǎng)絡(luò)系統(tǒng)、開發(fā)工具都必須符合通用標(biāo)準(zhǔn)。如規(guī)范的數(shù)據(jù)庫操縱界面、作為業(yè)界標(biāo)準(zhǔn)的TCP/IP網(wǎng)絡(luò)協(xié)議及ISO9002標(biāo)準(zhǔn)所要求的質(zhì)量規(guī)范等;同時,在自主開發(fā)本系統(tǒng)時,要進(jìn)行良好的設(shè)計工作,制訂行之有效的軟件工程規(guī)范,保證代碼的
9、易讀性、可操作性和可移植性。5系統(tǒng)的響應(yīng)速度 管理系統(tǒng)系統(tǒng)在日常處理中的響應(yīng)速度為秒級,達(dá)到實時要求,以及時 反饋信息。在進(jìn)行統(tǒng)計分析時,根據(jù)所需數(shù)據(jù)量的不同而從秒級到分鐘級, 原則是保證操作人員不會因為速度問題而影響工作效率。1.3圖書管理系統(tǒng)的數(shù)據(jù)需求管理系統(tǒng)的數(shù)據(jù)需求包括如下幾點:1 數(shù)據(jù)錄入和處理的準(zhǔn)確性和實時性數(shù)據(jù)的輸入是否準(zhǔn)確是數(shù)據(jù)處理的前提,錯誤的輸入會導(dǎo)致系統(tǒng)輸出的不正確和不可用,從而使系統(tǒng)的工作失去意義。數(shù)據(jù)的輸入來源是手工輸入。手工輸入要通過系統(tǒng)界面上的安排系統(tǒng)具有容錯性,并且對操作人員要進(jìn)行系統(tǒng)的培訓(xùn)。在系統(tǒng)中,數(shù)據(jù)的輸入往往是大量的,因此系統(tǒng)要有一定的處理能力,以保證迅
10、速的處理數(shù)據(jù)。2 數(shù)據(jù)的一致性與完整性由于系統(tǒng)的數(shù)據(jù)是共享的,在不同的客戶端中,檔案文件是共享數(shù)據(jù),所以如何保證這些數(shù)據(jù)的一致性,是系統(tǒng)必須解決的問題。要解決這一問題,要有一定的人員維護數(shù)據(jù)的一致性,在數(shù)據(jù)錄入處控制數(shù)據(jù)的去向,并且要求對數(shù)據(jù)庫的數(shù)據(jù)完整性進(jìn)行嚴(yán)格的約束。對于輸入的數(shù)據(jù),要為其定義完整性規(guī)則,如果不能符合完整性約束,系統(tǒng)應(yīng)該拒絕該數(shù)據(jù)。1.4 圖書管理系統(tǒng)的功能分析模塊:圖書綜合管理系統(tǒng)退出幫 助分析總結(jié)借閱管理進(jìn)銷存管理基礎(chǔ)信息退 出 系 統(tǒng)重 新 登 錄關(guān) 于銷 售 分 析借 閱 分 析庫 存 分 析查 詢 歸 還借 閱查 詢?nèi)?庫書證管理圖書信息管理圖書種類管理 第二章
11、系統(tǒng)詳細(xì)設(shè)計2.1主窗體設(shè)計(1) 新建一個工程,工程名稱為“bookmanager”,工程會自動創(chuàng)建一個窗口,默認(rèn)主窗口,將該窗口命名為“main”。(2) 設(shè)置main窗口的caption屬性為“圖書綜合管理系統(tǒng)”。(3) 設(shè)置main窗口的position屬性為“poscreencenter”。(4) 窗體外觀需要用代碼控制。2.1.1 程序相關(guān)代碼 因為本系統(tǒng)的主窗體將要采用與以往windows不同的風(fēng)格,所以窗體界面需要使用代碼來繪制。當(dāng)窗體需要重繪時,windows會向窗體發(fā)送wm_ncpaint消息,利用該消息對非客戶進(jìn)行重繪,消息攔截的方法如下:procedure WMNCPA
12、INT(var msg:TWNCPAINT);messageWM_NCPAINT;這樣就攔截了wm_ncpaint消息只要窗口接受到wm_ncpaint消息,就會執(zhí)行wm_ncpaint過程。2.2菜單設(shè)計 菜單是windows用戶界面的重要組成部分,用戶通過鼠標(biāo)選擇菜單中的選項便可輕松操控系統(tǒng)各個模塊功能,delphi提供了一個tmainmenu組件,該組件封裝了windows的下拉菜單,開發(fā)人員利用該組件可以輕松地設(shè)計出所需的普通主菜單,也在本系統(tǒng)中,普通菜單外觀與主界面不是很協(xié)調(diào),所以在這里設(shè)計一個與以往風(fēng)格不一樣的主菜單。2.2.1設(shè)計步驟(1) 向main中添加一個tmainmenu
13、組件,命名為“mainmenu1”.(2) 在設(shè)計界面中雙擊mainmenu組件,彈出菜單設(shè)計器窗口(3) 在設(shè)計器中單擊一個空白菜單選項,在object inspector窗口中修改該菜單項屬性,當(dāng)成功設(shè)置了一個菜單項后,菜單設(shè)計器會自動添加一個空白菜單項(4) 在設(shè)計器中設(shè)計主菜單,按照系統(tǒng)功能添加所有菜單項(5) 關(guān)閉菜單設(shè)計器,這時菜單已經(jīng)顯示在main窗體的最上方,這里設(shè)置main窗體的menu屬性為空,這樣菜單就不會顯示在main 窗體中了(6) 在main中添加TTOOLBAR組件,命名為“toolbar1”(7) 設(shè)置toolbar1組件的menu屬性為“mainmenu1”;
14、設(shè)置Flat屬性為”true”,這樣主菜單就顯示到了toolbar1組件中(8) 在菜單編輯器中雙擊菜單欄的菜單項,delphi會自動為菜單建立單擊事件代碼,如果要為其他事件編寫代碼,可單擊菜單欄中的菜單項,然后在object inspector窗口中的event頁中雙擊onadvanced drawitemg事件右邊的組合框添加事件處理過程(9) 程序相關(guān)代碼: procedure ToolBar1AdvancedCustomDraw(Sender: TToolBar;const ARect: TRect; Stage: TCustomDrawStage; var DefaultDraw:
15、Boolean);beginStretchBlt(TToolbar(sender).Canvas.Handle,arect.Left,arect.Top,arect.Right,arect.Bottom,toolbarbmp.Canvas.Handle,0,0,toolbarbmp.Width,toolbarbmp.Height,srccopy);end;這樣toolbar1組件就可以通過代碼自我重繪了2.3數(shù)據(jù)模塊設(shè)計 數(shù)據(jù)模塊是一個數(shù)據(jù)處理中心,本系統(tǒng)使用數(shù)據(jù)模塊對數(shù)據(jù)組件進(jìn)行統(tǒng)一管理,首先在工程中新建一個數(shù)據(jù)模塊,命名為data,然后向數(shù)據(jù)模塊中添加操作數(shù)據(jù)庫的組件。 模塊概述 本系統(tǒng)使
16、用ado組件對數(shù)據(jù)庫進(jìn)行操作,首先在數(shù)據(jù)模塊中添加tado connection組件,命名為“adoconnection1”,該組件用于建立數(shù)據(jù)庫的連接,然后想數(shù)據(jù)模塊中添加用來對數(shù)據(jù)庫操作的組件,如tadoquery,tadocommand,tadostoredproc組件,設(shè)置這些ado組件的connection屬性為“adoconnection1”,最后添加數(shù)據(jù)源等組件,數(shù)據(jù)模塊如圖:程序相關(guān)代碼如下:procedure TData.DataModuleCreate(Sender: TObject);var ZAppName: array0.127 of char; Hold: Stri
17、ng; setstring:string; Found: HWND;begin hold:=application.Title; Application.Title := 'OnlyOne'+ IntToStr(HInstance); strPcopy(ZAppName,Hold); Found:=Findwindow(nil, ZAppName); Application.Title := Hold; if Found <> 0 then begin ShowWindow(Found, SW_RESTORE); BringWindowToTop(Found); A
18、pplication.Terminate; end; getdir(0,dir); try setini:=Tinifile.Create(dir+'system.ini'); servername:=setini.ReadString('server','string','Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Initial Catalog=BookManager'); except showmessage('配置文件不存在!'); e
19、nd; try ADOConnection1.ConnectionString:=servername; adoconnection1.Open; except application.MessageBox('因服務(wù)器關(guān)閉或其他原因,無法連接到數(shù)據(jù)庫!請從新設(shè)置連接','提示',64); setstring:=promptdatasource(application.Handle,''); if trim(setstring)<>'' then setini.WriteString('server',&
20、#39;string',setstring); /setini.WriteString('server','string',promptdatasource(application.Handle,''); Application.Terminate; end;end;procedure TData.Timer1Timer(Sender: TObject);begin if adoconnection1.Connected then begin proc.Close; proc.ProcedureName:='stopdatepas
21、s;1' proc.ExecProc; proc.Close; proc.ProcedureName:='passdate;1' proc.ExecProc; end;end;end.2.4主要功能模塊設(shè)計 2.4.1 系統(tǒng)登錄模塊設(shè)計 系統(tǒng)啟動后,會彈出登錄窗口來驗證操作員權(quán)限,操作員通過驗證后才能進(jìn)入系統(tǒng)(1) 系統(tǒng)為登錄模塊對worker表查詢,并且列出所有操作員的用戶名(2) 等待操作員選擇用戶,輸入密碼。(3) 驗證用戶名,密碼是否正確,如果正確則進(jìn)入系統(tǒng)主窗體 系統(tǒng)登錄模塊運行結(jié)果如圖: 設(shè)計步驟:(1) 在工程中新建一個窗體,該窗體命名為“l(fā)oginfor
22、m”,設(shè)置窗體borderstyle屬性為”bsnone”.(2) 在loginform窗體中添加label組件,用于顯示標(biāo)題(3) 添加tcombobox組件,該組件用于列出所有用戶名,添加Teedit組件,用于密碼輸入,設(shè)置該組件passwordchar屬性為“*“(4) 添加兩個Tspeedbutton組件作為按鈕,設(shè)置caption屬性為”登錄”和”退出”2.4.2 程序相關(guān)代碼: procedure TLoginForm.FormShow(Sender: TObject);begin combobox1.Clear; with data.PublicQuery do begin cl
23、ose; sql.Clear; sql.Add('select * from Worker'); open; if recordcount<1 then begin showmessage('目前沒有任何用戶!請建立一個管理員用戶。' ); UserManagershow; close; sql.Clear; sql.Add('select * from Worker'); open; while not Eof do begin combobox1.Items.Add(fieldbyname('Username').AsS
24、tring); next; end; end else begin while not Eof do begin combobox1.Items.Add(fieldbyname('Username').AsString); next; end; end; end;end;procedure TLoginForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);begin if main.userPurview.username<>'' then begin with data.Public
25、Query do begin close; sql.Clear; sql.Add('select * from Worker where username=:username'); parameters.ParamByName('username').Value:=main.userPurview.username; open; if recordcount < 1 then begin myshowmessage(#13+'對不起!請重新登錄!'); canclose:=false; end; end; end;end;2.5圖書信息管理
26、模塊設(shè)計 圖書信息系統(tǒng)管理模塊提供對圖書信息系統(tǒng)的管理的功能,該模塊能夠?qū)齑嬷械乃袌D書的信息進(jìn)行操作,其中包括出版日期,出版社,作者等信息,在該模塊中,圖書封面圖象使用了數(shù)據(jù)庫圖形存取技術(shù),在數(shù)據(jù)庫中存放圖象數(shù)據(jù)的字段類型為image,該字段類型是采用了二進(jìn)制數(shù)據(jù)存取的方式,圖象數(shù)據(jù)可以直接保存在該字段中,但是將圖象數(shù)據(jù)存儲到數(shù)據(jù)庫中的不能用普通字段的修改或添加方法,圖書信息管理模塊的運行結(jié)果如圖: 設(shè)計步驟:(1) 新建一個窗體,命名為“bookinfoform“,設(shè)置窗體的caption屬性為”圖書信息管理”設(shè)置borderstyle屬性為”bssingle”.(2) 向“bookin
27、foform“中添加TPANEL組件,命名為”panel1”,設(shè)置該組件的align屬性為altop,并適當(dāng)調(diào)整其高度。(3) 在”panel1” 組件中添加用于數(shù)據(jù)編輯和瀏覽的Tedit,tcombox,timage組件,這些組件用于顯示和編輯圖書信息。(4) 在”panel1” 組件中添加tmaskedit組件,用于出版年月的格式化輸入,并分別命名為maskedit1 maskedit2,設(shè)置maskedit1組件的屬性為”!0000;1;0”, ,設(shè)置maskedit2組件的屬性為”!90;1;0”(5) 在TPANEL組件下方添加4個TSPEEDBUTTON組件,設(shè)置其caption屬
28、性為”&E修改”、 ”&S 確定”、 ”&X 關(guān)閉”。2.5.1程序相關(guān)代碼 在模塊中使用了數(shù)據(jù)庫圖象存取技術(shù),添加或修改數(shù)據(jù)庫中的圖象需要用二進(jìn)制的存取方法,進(jìn)入入庫操作時,用條形掃描儀或鍵盤在“圖形條碼,如果圖書在庫存中有記錄,則在入庫詳單中將添加一條入庫信息;如果在庫存中沒有該圖書的記錄則提示輸入圖書詳細(xì)信息。整個模塊代碼如下:unit BookInfo;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls
29、, ComCtrls, ToolWin,ExtCtrls,buttons, ADODB, ImgList, ExtDlgs, MyComboBox, Mask;type TbookInfoForm = class(TForm) SpeedButton1: TSpeedButton; SpeedButton2: TSpeedButton; SpeedButton3: TSpeedButton; SpeedButton4: TSpeedButton; Panel1: TPanel; Label1: TLabel; Label2: TLabel; ComboBox1: TComboBox; Labe
30、l4: TLabel; Label5: TLabel; Edit2: TEdit; Label6: TLabel; Edit3: TEdit; Label7: TLabel; Edit4: TEdit; Label8: TLabel; Label9: TLabel; Edit6: TEdit; Label10: TLabel; Edit7: TEdit; Label11: TLabel; Edit8: TEdit; Label12: TLabel; Edit9: TEdit; Memo1: TMemo; Label13: TLabel; GroupBox1: TGroupBox; Image1
31、: TImage; OPDialog1: TOpenPictureDialog; Label3: TLabel; ComboBox4: TComboBox; ComboBox3: TMyComboBox; ComboBox2: TMyComboBox; MaskEdit1: TMaskEdit; MaskEdit2: TMaskEdit; Label14: TLabel; Label15: TLabel; procedure CreateParams(var Params: TCreateParams); override; procedure FormCreate(Sender: TObje
32、ct); procedure SpeedButton1Click(Sender: TObject); procedure SpeedButton3Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure showfield; procedure SpeedButton2Click(Sender: TObject); procedure setedit(value:Boolean); procedure ComboBox1KeyPress(Sender: TObject; var Key: Char); proc
33、edure Customshowfield(const field,str:string); procedure ComboBox1Select(Sender: TObject); procedure ComboBox21KeyPress(Sender: TObject; var Key: Char); procedure ComboBox31KeyPress(Sender: TObject; var Key: Char); procedure ComboBox31Select(Sender: TObject); procedure ComboBox21Select(Sender: TObje
34、ct); procedure writefield(test:boolean;fieldname:string;value:variant); procedure imagetotable; procedure Image1Click(Sender: TObject); procedure SpeedButton4Click(Sender: TObject); procedure Edit3KeyPress(Sender: TObject; var Key: Char); procedure Edit2KeyPress(Sender: TObject; var Key: Char); proc
35、edure Edit5KeyPress(Sender: TObject; var Key: Char); procedure Edit4KeyPress(Sender: TObject; var Key: Char); procedure Edit8KeyPress(Sender: TObject; var Key: Char); procedure Edit6KeyPress(Sender: TObject; var Key: Char); procedure Edit7KeyPress(Sender: TObject; var Key: Char); procedure Edit9KeyP
36、ress(Sender: TObject; var Key: Char); procedure ComboBox4KeyPress(Sender: TObject; var Key: Char); procedure MaskEdit1KeyPress(Sender: TObject; var Key: Char); procedure MaskEdit2KeyPress(Sender: TObject; var Key: Char); private procedure WMPAINT1(var msg:TMESSAGE);message WM_PAINT; procedure WMNCPA
37、INT1(var msg:TWMNCPAINT);message WM_NCPAINT; procedure Active1(var msg:Tmessage);message WM_ACTIVATE; procedure WMNCLBUTTONDBLCLK1(var msg:Tmessage);message WM_NCLBUTTONDBLCLK; Private declarations public cbdrawdown:boolean; titleBmp:Tbitmap; / procedure FormCreate(Sender: TObject); Public declarati
38、ons end;var recordMemory:string; imagechanged:boolean;implementationuses MainForm,DataModule;$R *.dfmfunction MyShowmessage(text:Pchar):boolean; external 'resource.dll'procedure TbookInfoForm.WMNCLBUTTONDBLCLK1(var msg:Tmessage);begin /end;procedure TbookInfoForm.Active1(var msg:Tmessage);be
39、gin self.WMPAINT1(msg);end;procedure TbookInfoForm.CreateParams(var Params: TCreateParams);begin inherited; params.Style:=params.Style-WS_SYSMENU;end;procedure TbookInfoForm.WMPAINT1(var msg:TMESSAGE);begin sendmessage(self.Handle,WM_NCPAINT,0,0); inherited;end;procedure TbookInfoForm.WMNCPAINT1(var
40、 msg:TWMNCPAINT);var dc1:HDC; y,frame:integer; oldbrush:HBrush; oldpen,pen:HPEN; canvas:Tcanvas;begin canvas:=Tcanvas.Create; dc1:=getwindowdc(Handle); y:=GetSystemMetrics(SM_CYSIZE); frame:=GetSystemMetrics(SM_CYSIZEFRAME); oldbrush:=selectobject(dc1,getstockobject(null_brush); pen:=createpen(PS_SO
41、LID,1,rgb(155,155,155); oldpen:=selectobject(dc1,pen); RoundRect(dc1,0,0,Width,Height,12,12); pen:=createpen(PS_SOLID,frame*2-5,rgb(255,255,255); selectobject(dc1,pen); RoundRect(dc1,2,2,Width-2,Height-2,8,10); StretchBlt(dc1,frame,frame,Width-2*frame,y+frame div 2,titlebmp.Canvas.Handle,0,0,titlebm
42、p.Width,titlebmp.Height,srccopy); canvas.Handle:=dc1; canvas.Brush.Style:=bsclear; canvas.TextOut(frame*3,(y-frame)div 2,self.Caption); selectobject(dc1,oldbrush); selectobject(dc1,oldpen); deleteObject(pen); canvas.Handle:=0; canvas.Free; releasedc(Handle,dc1);end;procedure TbookInfoForm.FormCreate
43、(Sender: TObject);begin titlebmp:=Tbitmap.Create; titlebmp.LoadFromResourceName(main.resource,'TItle');end;procedure TbookInfoForm.SpeedButton1Click(Sender: TObject);begin setedit(true); speedbutton1.Enabled:=false; recordmemory:=combobox1.Text; combobox1.Enabled:=false;end;procedure TbookIn
44、foForm.SpeedButton3Click(Sender: TObject);begin data.PublicQuery.Close; close;end;procedure Tbookinfoform.setedit(value:Boolean);var i:integer;begin for i:=0 to self.panel1.ControlCount-1 do begin if self.panel1.Controlsi is Tedit then begin (self.panel1.Controlsi as Tedit).Enabled:=value; continue;
45、 end; end; maskedit1.Enabled:=value; maskedit2.Enabled:=value; combobox4.Enabled:=value; memo1.Enabled:=value;end;procedure TbookInfoForm.FormShow(Sender: TObject);begin combobox1.Items.Clear; combobox2.Items.Clear; combobox3.Items.Clear; combobox4.Items.Clear; with data.PublicQuery do begin close;
46、sql.Clear; sql.Add('select * from BookKind'); open; while not eof do begin combobox4.Items.Add(fieldbyname('KindName').AsString); next; end; close; sql.Clear; sql.Add('select * from bookinfo'); open; while not eof do begin combobox1.Items.Add(fieldbyname('bookID').AsS
47、tring); combobox2.Items.Add(fieldbyname('barcode').AsString); combobox3.items.Add(fieldbyname('bookname').AsString); next; end; first; end; showfield; recordmemory:=combobox1.text; setedit(false);end;procedure TbookInfoForm.showfield;begin if data.PublicQuery.Active then with data.Pu
48、blicQuery do begin combobox1.Text:=fieldbyname('bookid').AsString; combobox2.Text:=fieldbyname('barcode').AsString; combobox3.Text:=fieldbyname('bookname').AsString; edit3.Text:=fieldbyname('AuthorNation').AsString; maskedit1.Text:=copy(fieldbyname('PrintDate'
49、).AsString,0,4); maskedit2.Text:=copy(fieldbyname('PrintDate').AsString,6,8); /edit5.Text:=fieldbyname('PrintDate').AsString; edit8.Text:=fieldbyname('CDCount').AsString; edit7.Text:=fieldbyname('PageCount').AsString; edit2.Text:=fieldbyname('AuthorName').AsSt
50、ring; edit4.Text:=fieldbyname('Compny').AsString; edit6.Text:=fieldbyname('Version').AsString; edit9.Text:=fieldbyname('Place').AsString; Combobox4.Text:=fieldbyname('kindname').AsString; memo1.Text:=fieldbyname('Memo').AsString; if fieldbyname('picture
51、9;).IsNull then image1.Picture.Assign(nil); image1.Picture.Assign(fieldbyname('picture'); end;end;procedure TbookInfoForm.SpeedButton2Click(Sender: TObject);begin if not speedbutton1.Enabled then begin / change speedbutton1.Enabled:=true; if edit2.Modified then writefield(false,'AuthorNa
52、me',edit2.Text); if edit3.Modified then writefield(false,'AuthorNation',edit3.Text); try if maskedit1.Modified or maskedit2.Modified then writefield(false,'PrintDate',maskedit1.EditText+'-'+maskedit2.EditText); except end; if edit5.Modified then writefield(false,'Prin
53、tDate',edit5.Text); if edit4.Modified then writefield(false,'Compny',edit4.Text); if edit6.Modified then writefield(false,'Version',edit6.Text); if edit7.Modified then writefield(false,'PageCount',strtoint(edit7.Text); if edit8.Modified then writefield(false,'CDCount',strtoint(edit8.Text); if edit9.Modified then writefield(false,'Place',edit9.Text); if memo1.Modified then writefield(false,'Memo',memo1.Text); writefield(true,'barcode',combobox2.Text); writefield(true,'bookname',combobox3.Text); writefield(false,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度金融科技企業(yè)股權(quán)合作框架協(xié)議3篇
- 綠色農(nóng)業(yè)的科技創(chuàng)新與實踐
- 二零二五年度水資源保護堰塘承包管理合同3篇
- 二零二五年度高速鐵路軌道施工合同3篇
- 2025年度文化藝術(shù)館軟裝承接合同樣本4篇
- 二零二五年度車庫停車場智能停車引導(dǎo)系統(tǒng)采購合同4篇
- 二零二五年度成都高空廣告安裝公司高空作業(yè)防護用品供應(yīng)合同2篇
- 校企合作在寵物人才培養(yǎng)中的實踐與探索
- 學(xué)?;顒映晒?zhí)行的全方位策略
- 2025年統(tǒng)編版2024選修化學(xué)下冊階段測試試卷含答案
- 2024年中國華能集團燃料有限公司招聘筆試參考題庫含答案解析
- 《紅樓夢》中的男性形象解讀
- 安全生產(chǎn)技術(shù)規(guī)范 第49部分:加油站 DB50-T 867.49-2023
- 《三國演義》中的語言藝術(shù):詩詞歌賦的應(yīng)用
- 腸外營養(yǎng)液的合理配制
- 消防安全教育培訓(xùn)記錄表
- 2023年河南省新鄉(xiāng)市鳳泉區(qū)事業(yè)單位招聘53人高頻考點題庫(共500題含答案解析)模擬練習(xí)試卷
- 2023年小升初簡歷下載
- 廣府文化的奇葩
- 公路工程標(biāo)準(zhǔn)施工招標(biāo)文件(2018年版)解析
- 七年級地理下冊期末試卷(人教版)
評論
0/150
提交評論