数据库图书管理信息系统课程设计内容摘要:

end。 end。 确定按钮代码: procedure (Sender: TObject)。 begin if = 39。 39。 then begin ShowMessage(39。 类别编号不能为空。 39。 )。 Exit。 end。 if = 39。 39。 then begin ShowMessage(39。 类别名称不能为空。 39。 )。 Exit。 end。 := 39。 insert into 图书类别 (类别编号 ,图书类别 )39。 + 39。 values(:id,:name)39。 (39。 id39。 ).Value:=Trim(edtTyp)。 (39。 name39。 ).Value:=Trim(edtB)。 {:=39。 update 图书类别 set (类别编号 ,图书类别 )39。 +39。 values(:id,:name)39。 (39。 id39。 ).Value:=trim(edtTypeI)。 (39。 name39。 ).Value:=trim(edtBoo)。 }。 :=39。 select * from 图书类别 39。 end。 删除按钮代码: procedure (Sender: TObject)。 scope fthnirj.(2)uld:m,qay3bkw4x56v1g17 begin if (39。 是否删除记录。 39。 , 39。 确定 39。 , MB_OKCANCEL) = IDOK then。 end。 借阅按钮代码: procedure (Sender: TObject)。 var strBookID: string。 begin if = 39。 39。 then begin ShowMessage(39。 借书证号不能为空。 39。 )。 Exit。 end。 if = 39。 39。 then begin ShowMessage(39。 图书编号不能为空。 39。 )。 Exit。 end。 if getBookCount() 0 then begin ShowMessage(39。 此书已经被借出。 39。 )。 Exit。 end else begin strBookID := Trim()。 := 39。 update 借出信息 set 借出状态 =1 where 图书编号 = 39。 + strBookID。 := 39。 insert into 借出信息 (图书编号 ,借书证号 ,借出日期 ,借出状态 )values(:BookID,39。 + 39。 :readerID,:time,1)39。 (39。 Bookid39。 ).Value:=trim(editBook)。 (39。 readerid39。 ).Value:=trim(editre)。 (39。 time39。 ).Value:=DateTimePicker1.Time。 scope fthnirj.(2)uld:m,qay3bkw4x56v1g18。 //更新图书信息表在库标志。 strSql := 39。 update 图书明细表 set 状态 =39。 39。 借出 39。 39。 where 图书编号 = 39。 + strBookID。 := strSql。 end。 if messagedlg(39。 借阅成功,还有要借的书籍吗。 39。 , mtconfirmation, [mbyes, mbno], 0) = mryes then begin := 39。 39。 := 39。 39。 := 39。 39。 := 39。 39。 := 39。 39。 := 39。 39。 := 39。 39。 := 39。 39。 end。 end。 其他相关实现代码: procedure (Sender: TObject。 var Key: Char)。 begin if Key = 13 then begin if ViewBook() = false then begin ShowMessage(39。 没有此书 , 请重新选择。 39。 )。 Exit。 end。 := false。 := 39。 图书编号 =39。 39。 39。 + + 39。 39。 39。 39。 := true。 end。 end。 function (BookID: string): boolean。 var Query: TADOQuery。 begin scope fthnirj.(2)uld:m,qay3bkw4x56v1g19 Query := (self)。 :=。 (39。 select * from 图书明细表 where 图书编号 =:id39。 )。 (39。 ID39。 ).Value := BookID。 if = 0 then begin Result := false。 Exit。 end else Result := true。 end。 function (user: string): boolean。 var Query1: TADOQuery。 begin Query1 := (self)。 :=。 (39。 select * from 学生信息表 where 借书证号 =:id39。 )。 (39。 ID39。 ).Value := user。 if = 0 then begin Result := false。 Exit。 end else Result := true。 end。 procedure (Sender: TObject。 var Key: Char)。 begin if Key = 13 then begin := IntToStr(getOwnCount())。 if viewUser() = false then begin ShowMessage(39。 没有此用户 , 请重新选择。 39。 )。 Exit。 end。 end。 end。 function (userID: string): integer。 var Query2: TADOQuery。 begin try scope fthnirj.(2)uld:m,qay3bkw4x56v1g20 Query2 := (self)。 :=。 (39。 select count(借书证号 ) from 借出信息 where 借书证号 =:id 39。 )。 (39。 ID39。 ).Value := userID。 Result := [0].Value。 except Result := 0。 end。 end。 function (BookID: string): integer。 var Query2: TADOQuery。 begin try Query2 := (self)。 :=。 (39。 select count(图书编号 ) from 借出信息 where 图书编号 =:id and 借出状态 =139。 )。 (39。 ID39。 ).Value := BookID。 Result := [0].Value。 except Result := 0。 end。 end。 归还按钮代码 : procedure (Sender: TObject)。 var BorrowBookID: string。 BookID: string。 strSql: string。 strBookID: string。 strDate:string。 begin strDate:=trim()。 if = 39。 39。 then begin scope fthnirj.(2)uld:m,qay3bkw4x56v1g21 ShowMessage(39。 借书证号不能为空。 39。 )。 Exit。 end。 if = 39。 39。 then begin ShowMessage(39。 图书编号不能为空。 39。 )。 Exit。 end。 BorrowBookID := Trim()。 BookID := Trim()。 if (BorrowBookID 39。 39。 ) and (BookID 39。 39。 ) then begin。 strSql := 39。 update 借出信息 set 借出状态 =0 ,还书日期 =39。 39。 39。 + strdate + 39。 39。 39。 where 图书 编号 =39。 + BookID + 39。 and 借书证号 =39。 39。 39。 + BorrowBookID + 39。 39。 39。 and 借出状态 =1 39。 (strSql)。 if 0 then begin ShowMessage(39。 还书成功 !39。 )。 //更新图书信息表在库标志 strBookID := Trim()。 strSql := 39。 update 图书明细表 set 状态 =39。 39。 在库 39。 39。 where 图书编号 =39。 + strBookID。 := strSql。 end else ShowMessage(39。 此书已还过 !39。 )。 end。 end。 其它相关实现代码: procedure (Sender: TObject。 var。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。