数据库图书管理信息系统课程设计内容摘要:
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。数据库图书管理信息系统课程设计
相关推荐
Dim myreader As SqlDataReader Dim sql As String = select * from stu_info where snum=39。 amp。 Username amp。 39。 Dim myd As New SqlCommand(sql, myconn) = myd () myreader = () () = (1) If IsDBNull((4))
80039。 ,39。 20039。 ,39。 360039。 ) insert 工资表 values(39。 001139。 ,39。 400039。 ,39。 50039。 ,39。 40039。 ,39。 410039。 ) insert 工资表 values(39。 001239。 ,39。 400039。 ,39。 10039。 ,39。 50039。 ,39。 360039。 )
CRect rect。 GetClientRect(amp。 rect)。 CDC dcMem。 (amp。 dc)。 CBitmap bmpBackground。 (IDB_BITMAP1)。 //IDB_BITMAP1 是对应图的 ID BITMAP bitmap。 (amp。 bitmap)。 CBitmap *pbmpOld=(amp。 bmpBackground)。 (0,0,()
数据流 数据流名 说明 数据来源 数据流去向 班级信息 班级管理的信息 班级信息的录入 信息存储 课程信息 课程管理的信息 课程信息的录入 信息存储 院系信息 院系管理的信息 院 系信息的录入 信息存储 学生信息 学生管理的信息 学生信息的录入 信息存储 专业信息 专业管理的信息 专业信息的录入 信息存储 奖惩信息 奖惩管理的信息 奖惩信息的录入 相对应的各种处理 沈阳工程学院课程设计报告 8
ENDPROC PROCEDURE ENDPROC 六、学生个人信息追加表单 一、功能:向 表中追加记录,界面如下: 二、数据环境 5 个基本表: 、 、 、 、 三、主要对象的属性及事件过程 表单的 Init(创建表单时发生 )事件过程: PROCEDURE Init select xs set order to xh amp。 amp。 设置主索引 *建立临时表 : lsb creat
参考文献 [1] 王珊、萨师煊.数据库系统概论.数据库技术丛书之一.北京:高等教育出版社, 2020. [2] Bain T 等. SQL Server 2020 数据库.北京:中国电力出版社, 2020. 1 原文已完。 下文为附加文档,如不需要,下载后可以编辑删除,谢谢。 施工组织设计 本施工组织设计是本着“一流的质量、一流的工期、科学管理”来进行编制的。 编制时,我公司技术发展部