【正文】
img src=login_img/ /管理入口/a/li lia img src=login_img/ /信息門(mén)戶(hù)/a/li lia img src=login_img/ /辦公系統(tǒng)/a/li lia img src=login_img/ /郵箱系統(tǒng)/a/li li style=display:block。float:right。a img src=login_img/ /返回/a/li /ul /div /div div id=tbg/div div id=log div class=headlinebg indexheadlinebg wavesWappersection class=featuresvideo section sectiononbg featureindex canvas id=waves class=waves/canvas div id=loginbox ul li用戶(hù)登錄/li /ul div class=loginiteminput type=text id=txtUserName placeholder=用戶(hù)名//divimg src=login_img/ alt= style=display:block。marginleft:37px。margintop:35px。/ div class=loginiteminput type=password id=txtpwd placeholder=密碼 style=margintop:50px。/img src=login_img/ alt= style=display:block。marginleft:7px。margintop:35px。//div div class=loginrtn style=display:none。 margintop:40px。marginleft:10px。color:white。 input type=radio id=rst name=rb style=marginleft:25px。/ input type=radio id=rtch name=rb / input type=radio id=rad name=rb /管理員 /div div id=lbtn class=loginitema href=javascript:。 onclick=Login()登錄/a/div /div /section /div /div div id=footer/div form id=form1 runat=server div /div /form script src=login_js//script script src=login_js//script/body/html還書(shū)當(dāng)讀者還書(shū)在這進(jìn)行輸入,并自動(dòng)對(duì)數(shù)據(jù)庫(kù)相關(guān)表進(jìn)行修改。procedure (Sender: TObject)。//完成某讀者對(duì)已借閱圖書(shū)的歸還,并且對(duì)數(shù)據(jù)庫(kù)中的借、還書(shū)數(shù)據(jù)表進(jìn)行更新,圖書(shū)狀態(tài)state字段值置為0(表示圖書(shū)已被歸還)var i,flag:integer。 Query:TADOQuery。begin flag:=0。 if trim()=39。39。 then begin ShowMessage(39。沒(méi)有輸入讀者卡號(hào)!39。)。 。 exit。 end。 for i:=0 to do begin if trim([i])39。39。 then flag:=1。 end。 if flag=0 then begin ShowMessage(39。沒(méi)有選擇所要?dú)w還的書(shū)籍!39。)。 exit。 end。 Query:=(self)。 with Query do begin Connection:=。 try for i:=0 to do begin 。 :=39。update Lend_Book set ReturnDate=:ReturnDate,state=0 39。+ 39。where ReaderCardID=:ReaderCardID and BookID=:BookID39。 (39。ReaderCardID39。).Value:=trim()。 (39。BookID39。).Value:=trim([i])。 (39。ReturnDate39。).Value:=now。 ExecSQL。 。 :=39。update Book_stock set BookOutNumber=BookOutNumber1 where 39。+ 39。BookID=:BookID39。 (39。BookID39。).Value:=trim([i])。 ExecSQL。 。 :=39。update Book_stock set BookLast=1 where BookInNumberBookOutNumber39。 ExecSQL。 end。 if MessageDlg(39。還書(shū)成功,是否繼續(xù)還書(shū)?39。,mtConfirmation,[mbYes,mbNo],0)=mrYes then begin :=39。39。 。 。 。 。 。 end else 。 except ShowMessage(39。還書(shū)失敗!39。)。 end。 Close。 Free。end。end。 附 錄2用戶(hù)管理給相應(yīng)用戶(hù)分配的權(quán)限并賦予其登陸口令讀者查詢(xún)?cè)谶@個(gè)模塊里可以根據(jù)讀者的信息如卡號(hào)、姓名、學(xué)歷等進(jìn)行模糊查詢(xún),這樣以便用戶(hù)知道讀者的信息,也可以對(duì)讀者借書(shū)\還書(shū)查詢(xún)。procedure (Sender: TObject)。 //根據(jù)查詢(xún)條件,完成對(duì)讀者的精確和模糊查詢(xún)var Query:TADOQuery。 temp:string。 sql:string。begin if trim()=39。39。 then Begin ShowMessage(39。沒(méi)有輸入查詢(xún)條件39。)。 。 exit。 end。 if then temp:=GetEducationID(trim()) else if then temp:=GetReaderTypeID(trim()) else temp:=trim()。 if then sql:=QueryStr+39。 like 39。+quotedStr(39。%39。+temp+39。%39。) else sql:=QueryStr+39。=39。+quotedstr(temp)。 。 Query:=(self)。 with Query do begin Connection:=。 Close。 。 if then :=39。select * from Reader_info where 39。+QueryStr+39。 like 39。+quotedStr(39。%39。+temp+39。%39。) else :=39。select * from Reader_info where 39。+QueryStr+39。=39。+quotedstr(temp)。 Open。 while not eof do begin with do begin Caption:=FieldByName(39。ReaderCardID39。).Value。 (FieldByName(39。Name39。).Value)。 (FieldByName(39。ID39。).Value)。 (FieldByName(39。Sex39。).Value)。 (GetTypeName(FieldByName(39。ReaderTypeID39。).Value))。 (GetEducationName(FieldByName(39。EducationID39。).Value))。 end。 Next。 end。 Close。 Free。 end。 if =0 then begin (39。沒(méi)有滿(mǎn)足查詢(xún)條件的記錄39。,39。提示39。)。 。 。 end。procedure (Sender: TObject)。//根據(jù)輸入的讀者卡號(hào),查詢(xún)讀者的借書(shū)或者還書(shū)情況var Query:TADOQuery。 flag:integer。begin flag:=1。 if trim()=39。39。 then begin ShowMessage(39。沒(méi)有輸入卡號(hào)!39。)。 。 exit。 end。 Query:=(self)。 :=。 if then flag:=1 else if then flag:=0。 。 with Query do begin Close。 if then begin 。 :=39。select * from Lend_Book where state=:flag and ReaderCardID39。+39。 like 39。+quotedStr(39。%39。+trim()+39。%39。) end else begin 。 :=39。select * from Lend_Book where state=:flag and ReaderCardID39。+39。=39。+quotedStr(trim())。 end。 (39。flag39。).Value:=flag。 Open。 while not eof do begin with do begin Caption:=FieldByName(39。ReaderCardID39。).Value。 (FieldByName(39。BookID39。).Value)。 (GetBookName(FieldByName(39。BookID39。).Value))。 if FieldByName(39。LendDate39。).ValueNull then (FieldByName(39。LendDate39。).Value) else (39。39。)。 if FieldByName(39。ReturnDate39。).ValueNull then (FieldByName(39。ReturnDate39。).Value) else (39。39。)。 if FieldByName(39。state39。).Value=0 then (39。已還39。) else (39。未還39。)。 end。 Next。 end。 end。end。 13