小型图书管理系统毕业设计

上传人:1666****666 文档编号:39432997 上传时间:2021-11-10 格式:DOC 页数:46 大小:848.53KB
返回 下载 相关 举报
小型图书管理系统毕业设计_第1页
第1页 / 共46页
小型图书管理系统毕业设计_第2页
第2页 / 共46页
小型图书管理系统毕业设计_第3页
第3页 / 共46页
点击查看更多>>
资源描述
前言为了提高图书管理的工作效率,及时有效地了解各种信息,特开发此“小型图书管理系统”。该系统本着简单、实用、方便的宗旨,为管理人员、读者提供快捷有效的软件平台,从而,提高图书管理工作效率,节省大量人力和时间,提高了图书馆的信息化程度。本系统具有易学、易用的特点,用户可以很快掌握其操作方法,方便、快捷完成各项工作,正确无误地进行各种信息的处理工作。本系统是由本人在杨成、郗亚辉老师的指导下开发完成的。为了这次毕业设计本人做了大量的准备和努力,但由于本人知识和能力有限,系统难免存在许多不完善的地方甚至漏洞,敬请各位老师不吝提出宝贵建议,本人将不胜感激! 一、系统分析1.1系统功能分析 系统开发的总体任务是实现各种信息的系统化、归范化。图书管理是图书馆管理工作的重要组成部分,为了提高图书管理工作的效率,利用计算机和数据库技术设计开发了图书管理系统是图书管理工作的迫切需要。本系统的主要功能如下:l 有关读者基本信息的输入,包括读者编号、读者类别、读者姓名、读者性别、工作单位、家庭住址、电话号码、电子邮件、办证日期、备注等。l 读者基本信息的查询、修改,包括读者编号、读者姓名、读者类别、读者性别、工作单位、家庭住址、电话号码、电子邮件、办证日期、备注等。l 图书信息的输入,包括书籍编号、书籍名称、书籍类别、作者姓名、出版社、出日期、书籍价格、书籍类别、登记日期、备注信息等。l 图书信息的查询、修改,包括书籍编号、书籍名称、书籍类别、作者姓名、出版社名称、出版日期、书籍价格、书籍类别、登记日期、备注信息等。l 借书信息的输入,包括借书信息编号、读者编号、读者姓名、书籍编号、书籍名称、借书日期、备注等。l 借书信息的查询、修改,包括借书信息编号、读者编号、读者姓名、书籍编号、书籍名称、借书日期、备注等。l 还书信息的输入、查询和修改,包括还书信息编号、读者编号、读者姓名、书籍编号、书籍名称等。l 还书信息的查询和修改,包括还书信息编号、读者编号、读者姓名、书籍编号、书籍名称等。二、系统设计2.1总体设计结构结构设计主要包括运行模式选择、操作系统选择、数据库管理系统选择、系统功能结构设计。选用单机模式,有一台奔腾以上的微型计算机,操作系统选择windows 98/2000,开发工具选择powerbuilder8.0,数据库管理系统(DBMS)选择powerbuilder8.0自带Sybase SQL anywhere 7.0。2.2详细设计详细设计主要包括用户界面设计和数据库设计。² 用户界面设计用户运行该系统时,首先出现一个登录窗口,提示输入用户名或编号、密码,输入正确进入系统主窗口,如图:(2-1) 图2-1主窗口的上部是菜单和工具栏,系统中的受所有功能通过选择菜单项或单击工具栏中的图标即可。通过选择各个菜单项或工具栏图标,分别进入各个具体界面,实现不同的操作功能。² 数据库设计l 数据库需求分析 系统的数据流程图如下:读者数据基本信息录入读者信息登记 借阅信息借阅 书籍数据基本信息录入书籍信息登记 针对上述图书管理工作过程的内容和数据流程图分析,设计如下所述的数据项和数据结构。l 读者信息,包括的数据项有:读者编号、读者类别、读者姓名、读者性别、工作单位、家庭住址、电话号码、电子邮件、办证日期、备注等。l 图书信息,包括数据项有:书籍编号、书籍名称、书籍类别、作者姓名、出版社、出版日期、书籍价格、书籍类别、登记日期、备注信息等。l 借书信息,包括数据项有:借书信息编号、读者编号、读者姓名、书籍编号、书籍名称、借书日期、备注等。l 用户表信息,包括的数据项有:读者编号、读者姓名、权限。l 图书类别信息,包括的数据项有:类别编号、图书类别。l 数据库概念设计根据上面设计,规划出的实体有:读者信息实体、书籍信息实体、借阅信息实体、用户实体、读者信息实体。E-R图如图所示:读者信息实体读者信息登记读者信息登记读者姓名读者编号读者地址 。书籍信息实体书籍名称书籍编号出版社。借阅信息实体书籍名称借阅编号借阅日期。读者信息管理书籍信息管理借阅书籍借阅信息管理m(1) ( E-R图)l 数据库逻辑结构设计图书管理系统各个表设计如下:(图书信息表)(书籍类别表)(借阅信息表)(读者信息表)(用户表)(各个表的主键)三、系统实施在系统中主要实现对图书信息、读者信息、借阅信息以及用户表中数据的增、删、改、查询等功能。.建立应用对象设置SQLCA的属性以及数据库的连接参数应用对象OPEN事件脚本如下:/ Profile guoshushengSQLCA.DBMS = "ODBC"SQLCA.AutoCommit = FalseSQLCA.DBParm = "ConnectString='DSN=guoshusheng;UID=dba;PWD=sql'"CONNECT;/错误处理if sqlca.sqlcode <> 0 then MessageBox ("Cannot Connect to Database", sqlca.sqlerrtext) returnend if/打开启动窗口open(w_start)idle(10)在事件中加入如下脚本:disconnect using sqlca;.2登录界面窗口对于该信统用户分为三类:系统管理员、数据管理员、普通用户。登录窗口w_login的主要是验证用身份并确定权限,如图所示:其登录按钮代码如下:if sle_1.text = "" then/pop a message boxmessagebox("PayAttention!","The user name cant be null")/sle_1 get the focussle_1.setfocus()elseif sle_2.text = "" then/pop a message boxmessagebox("PayAttention!","The password cant be null")/sle_2 get the focussle_2.setfocus()elseG_INPUT_TIME =G_INPUT_TIME+1G_USER = sle_1.textG_PWD =sle_2.text/取出数据库用户口令表格中对应用户的口令SELECT user_PWD ,purview INTO :CORRECT_PSWD,:G_right FROM USER_info WHERE user_id=:G_USER or username=:G_USER;/将数据库中保存的口令和用户输入的口令作比较IF G_PWD=CORRECT_PSWD THEN/输入正确,打开主窗口OPEN(W_MAIN)CLOSE(W_LOGIN)ELSE/不正确,在3次以内可重新输入,超过3次结束程序IF G_INPUT_TIME >3 THENMESSAGEBOX("警告","输入用户口令的次数太多!")CLOSE(W_LOGIN)ELSEMESSAGEBOX("警告","输入的用户口令有误,请重新输入")END IFEND IFend ifclose(w_start) (W_login)3.3启动界面设计OPEN事件代码如下:prog+hpb_1.position=progst_2.text=string(prog)+"%"if prog=100 thentimer(0)w_start.visible=falseopen(w_login)end ifw_start.屏幕保护界面 (w_screen)3.4 菜单设计菜单项代码如下:opensheet (w_login_re,w_main,6,layered!)opensheet (w_change_password,w_main,6,layered!)opensheet (w_user,w_main,6,layered!)close(w_main) opensheet (w_readers,w_main,6,layered!)opensheet (w_readers_grid,w_main,6,layered!)opensheet (w_readers_find,w_main,6,layered!)opensheet (w_books,w_main,6,layered!)opensheet (w_books_grid,w_main,6,layered!)opensheet (w_books_find,w_main,6,layered!)opensheet (w_borrow,w_main,6,layered!) opensheet (w_return,w_main,6,layered!)opensheet (w_borrow_find,w_main,6,layered!)opensheet (w_store,w_main,6,layered!)opensheet (w_kucun,w_main,6,layered!)W_MAIN.ArrangeSheets(CASCADE!)W_MAIN.ArrangeSheets(LAYER!)close(w_about)close(w_books)close(w_books_find)close(w_books_grid)close(w_borrow)close(w_borrow_find)close(w_change_password)close(w_kucun)close(w_login)close(w_login_re)close(w_readers)close(w_readers_find)close(w_readers_grid)close(w_return)close(w_user)opensheet (w_about,w_main,6,original!)重新登录界面如下:确定按钮代码如下:string correct_pswdif sle_1.text = "" then/pop a message boxmessagebox("PayAttention!","The user name cant be null")/sle_1 get the focussle_1.setfocus()elseif sle_2.text = "" then/pop a message boxmessagebox("PayAttention!","The password cant be null")/sle_2 get the focussle_2.setfocus()elseG_INPUT_TIME =G_INPUT_TIME+1G_USER = sle_1.textG_PWD =sle_2.text/取出数据库用户口令表格中对应用户的口令SELECT user_PWD ,purview INTO :CORRECT_PSWD,:G_right FROM USER_info WHERE user_id=:G_USER or username=:G_USER;/将数据库中保存的口令和用户输入的口令作比较IF G_PWD=CORRECT_PSWD THEN/输入正确,打开主窗口OPEN(W_MAIN)/setredraw(false) CLOSE(W_LOGIN_re)ELSE/不正确,在3次以内可重新输入,超过3次结束程序IF G_INPUT_TIME >3 THENMESSAGEBOX("警告","输入用户口令的次数太多!")CLOSE(W_LOGIN_re)ELSEMESSAGEBOX("警告","输入的用户口令有误,请重新输入")END IFEND IFend ifif G_right<>1 then m_main.m_1.m_13.enabled=falseend if修改用户信息界面如下:确定按钮代码如下:/输入次数加1G_INPUT_TIME =G_INPUT_TIME+1/判断两次输入的新口令是否一致IF SLE_2.TEXT <>SLE_3.TEXT THENIF G_INPUT_TIME >3 THENMESSAGEBOX("警告","输入的次数太多!")CLOSE(W_CHANGE_PASSWORD)ELSEMESSAGEBOX("警告","两次输入的口令不一致,请重新输入")END IFELSE/判断输入的原口令是否正确IF SLE_1.TEXT <>G_PWD THENIF G_INPUT_TIME >3 THENMESSAGEBOX("警告","输入的次数太多!")CLOSE(W_CHANGE_PASSWORD)ELSEMESSAGEBOX("警告","输入的原口令不正确,请重新输入")END IFELSE/修改数据库中的该用户的口令UPDATE user_infoSET user_pwd=:sle_2.text WHERE user_id=:G_USER or username=:G_USER;MESSAGEBOX("注意","你的口令已经修改,请牢记")/提交修改,关闭口令修改窗口 COMMIT;CLOSE(W_CHANGE_PASSWORD)END IFEND IFOPEN事件代码如下:/将全局变量-输入用户名和口令的次数赋初值0G_INPUT_TIME=0/定义变量Environment l_envint l_ScrWidth,l_ScrHeight/关闭窗口刷新setRedraw(false)/取得屏幕的高度和宽度GetEnvironment(l_env)l_ScrWidth=PixelsToUnits(l_env.ScreenWidth,XpixelsToUnits!)l_ScrHeight=PixelsToUnits(l_env.ScreenHeight,YpixelsToUnits!)/移动窗口到屏幕中间Move(l_scrwidth - this.width)/2,(l_scrheight - this.height)/2)/打开窗口刷新setredraw(true)用户管理界面如下:添加按钮代码如下:/insert a row in the end of dw_1g_RowNumber=dw_1.InsertRow(0)/dw_1 get the focusdw_1.SetFocus()/到当前行dw_1.ScrollToRow(G_RowNumber) /the first column get the focusdw_1.SetColumn(1)删除按钮代码如下:/得到当前记录 G_RowNumber=dw_1.getrow()/将当前记录中的员工号取出赋值给全局变量emp_nodeleterow(dw_1,g_rownumber)int a a=MessageBox("提示","确实要删除吗?",Question!, YesNoCancel!, 3)if a=1 then cb_3.triggerevent( Clicked!)else dw_1.retrieve()end if保存按钮代码如下:if update(dw_1,true,false)=1 then/保存修改成功,提交修改dw_1.resetupdate()commit;messagebox("提示!","数据更新成功!")else/保存修改失败,取消所作的修改rollback;/弹出一个对话框警告messagebox("错误!","数据更新失败!")end ifcolsequery事件如下:integer li_rc/ Accept the last data entered into the datawindowdw_1.AcceptText()/Check to see if any data has changed IF dw_1.ModifiedCount() > 0 THENli_rc = MessageBox("提示", &"是否保存所做的修改?", Question!, &YesNoCancel!, 3)/User chose to updata and close windowIF li_rc = 1 THEN cb_3.triggerevent( Clicked!)RETURN 0/User chose to close window without updatingELSEIF li_rc = 2 THENRETURN 0/User canceledELSERETURN 1 END IFELSE/ No changes to the data, window will just closeRETURN 0 END IF添加读者信息界面如下:前一条:/定义参数当前行行数integer row_current /数据窗口向前滚动一条记录row_current=dw_1.ScrollPriorRow()/如果已经到达第一条记录,则弹出一个对话框警告if row_current=1 thenMessageBox("警告","已经是最前一条记录")end if后一条:/定义参数 表的总行数integer row_count /定义参数 当前行integer row_current /数据窗口向后滚动一条纪录row_current=dw_1.ScrollNextRow()/得到表的总行数row_count=dw_1.RowCount()/判断是否是最后一条记录if row_current= row_count thenMessageBox("警告","已经是最后一条记录")end if保存:/if update(dw_1,true,false)=1 then/保存修改成功,提交修改/dw_1.resetupdate()/commit;/messagebox("提示!","数据更新成功!")/else/保存修改失败,取消所作的修改/rollback;/弹出一个对话框警告/messagebox("错误!","数据更新失败!")/end ifif update(dw_1,true,false)=1 then/保存修改成功,提交修改dw_1.resetupdate()commit;messagebox("提示!","数据更新成功!")end if if update(dw_1,true,false)=2 then/保存修改失败,取消所作的修改rollback;/弹出一个对话框警告messagebox("错误!","数据更新失败!")end if添加:/insert a row in the end of dw_1g_RowNumber=dw_1.InsertRow(0)/dw_1 get the focusdw_1.SetFocus()/到当前行dw_1.ScrollToRow(G_RowNumber) /the first column get the focusdw_1.SetColumn(1)删除:/得到当前记录 G_RowNumber=dw_1.getrow()/将当前记录中的员工号取出赋值给全局变量emp_nodeleterow(dw_1,g_rownumber)int a a=MessageBox("提示","确实要删除吗?",Question!, YesNoCancel!, 3)if a=1 then cb_3.triggerevent( Clicked!)else dw_1.retrieve()end ifclosequery事件:integer li_rc/ Accept the last data entered into the datawindowdw_1.AcceptText()/Check to see if any data has changed IF dw_1.ModifiedCount() > 0 THENli_rc = MessageBox("提示", &"是否保存所做的修改?", Question!, &YesNoCancel!, 3)/User chose to updata and close windowIF li_rc = 1 THEN cb_3.triggerevent( Clicked!)RETURN 0/User chose to close window without updatingELSEIF li_rc = 2 THENRETURN 0/User canceledELSERETURN 1 END IFELSE/ No changes to the data, window will just closeRETURN 0 END IF退出:integer li_rc/ Accept the last data entered into the datawindowdw_1.AcceptText()/Check to see if any data has changed IF dw_1.ModifiedCount() > 0 THENli_rc = MessageBox("提示", &"是否保存所做的修改?", Question!, &YesNoCancel!, 3)/User chose to updata and close windowIF li_rc = 1 THEN cb_3.triggerevent( Clicked!)RETURN 0/User chose to close window without updatingELSEIF li_rc = 2 THENRETURN 0/User canceledELSERETURN 1 END IFELSE/ No changes to the data, window will just closeRETURN 0 END IF修改读者信息界面如下:添加:/insert a row in the end of dw_1g_RowNumber=dw_1.InsertRow(0)/dw_1 get the focusdw_1.SetFocus()/到当前行dw_1.ScrollToRow(G_RowNumber) /the first column get the focusdw_1.SetColumn(1)删除:/得到当前记录 G_RowNumber=dw_1.getrow()/将当前记录中的员工号取出赋值给全局变量emp_nodeleterow(dw_1,g_rownumber)int a a=MessageBox("提示","确实要删除吗?",Question!, YesNoCancel!, 3)if a=1 then cb_3.triggerevent( Clicked!)else dw_1.retrieve()end if保存:if update(dw_1,true,false)=1 then/保存修改成功,提交修改dw_1.resetupdate()commit;messagebox("提示!","数据更新成功!")else/保存修改失败,取消所作的修改rollback;/弹出一个对话框警告messagebox("错误!","数据更新失败!")end ifclosequery事件如前。退出:close(parent)修改读者信息界面:添加:/insert a row in the end of dw_1g_RowNumber=dw_1.InsertRow(0)/dw_1 get the focusdw_1.SetFocus()/到当前行dw_1.ScrollToRow(G_RowNumber) /the first column get the focusdw_1.SetColumn(1)删除:/得到当前记录 G_RowNumber=dw_1.getrow()/将当前记录中的员工号取出赋值给全局变量emp_nodeleterow(dw_1,g_rownumber)int a a=MessageBox("提示","确实要删除吗?",Question!, YesNoCancel!, 3)if a=1 then cb_3.triggerevent( Clicked!)else dw_1.retrieve()end if保存:if update(dw_1,true,false)=1 then/保存修改成功,提交修改dw_1.resetupdate()commit;messagebox("提示!","数据更新成功!")else/保存修改失败,取消所作的修改rollback;/弹出一个对话框警告messagebox("错误!","数据更新失败!")end if退出:close(parent)添加读者信息界面:前一条:/定义参数当前行行数integer row_current /数据窗口向前滚动一条记录row_current=dw_1.ScrollPriorRow()/如果已经到达第一条记录,则弹出一个对话框警告if row_current=1 thenMessageBox("警告","已经是最前一条记录")end if后一条:/定义参数 表的总行数integer row_count /定义参数 当前行integer row_current /数据窗口向后滚动一条纪录row_current=dw_1.ScrollNextRow()/得到表的总行数row_count=dw_1.RowCount()/判断是否是最后一条记录if row_current= row_count thenMessageBox("警告","已经是最后一条记录")end if保存:if update(dw_1,true,false)=1 then/保存修改成功,提交修改dw_1.resetupdate()commit;messagebox("提示!","数据更新成功!")else/保存修改失败,取消所作的修改rollback;/弹出一个对话框警告messagebox("错误!","数据更新失败!")end if添加:/insert a row in the end of dw_1g_RowNumber=dw_1.InsertRow(0)/dw_1 get the focusdw_1.SetFocus()/到当前行dw_1.ScrollToRow(G_RowNumber) /the first column get the focusdw_1.SetColumn(1)删除:/得到当前记录 G_RowNumber=dw_1.getrow()/将当前记录中的员工号取出赋值给全局变量emp_nodeleterow(dw_1,g_rownumber)int a a=MessageBox("提示","确实要删除吗?",Question!, YesNoCancel!, 3)if a=1 then cb_3.triggerevent( Clicked!)else dw_1.retrieve()end if退出:/定义两个变量int MCount /修改后没有保存的行数int UpdateOrNot /是否修改/得到修改后没有保存的行数MCount=w_books.dw_1.ModifiedCount()if MCount=0 then/没有未保存的修改close(w_books)elseif Mcount>0 then/询问是否保存所做的修改UpdateOrNot=MessageBox("保存修改","您修改了数据窗口中的数据,现在是否保存?",Question!,YesNoCancel!)if UpdateOrNot=1 then/保存if update(w_books.dw_1,true,false)=1 then/保存修改成功,提交修改w_books.dw_1.resetupdate()commit;else/保存修改失败,取消所作的修改rollback;/弹出一个对话框警告messagebox("错误!","数据保存失败")end ifclose(w_books)elseif UpdateOrNot=2 then/不保存rollback;close(w_books)end ifendif 修改书籍界面如下:添加:/insert a row in the end of dw_1g_RowNumber=dw_1.InsertRow(0)/dw_1 get the focusdw_1.SetFocus()/到当前行dw_1.ScrollToRow(G_RowNumber) /the first column get the focusdw_1.SetColumn(1)删除:/得到当前记录 G_RowNumber=dw_1.getrow()/将当前记录中的员工号取出赋值给全局变量emp_nodeleterow(dw_1,g_rownumber)int a a=MessageBox("提示","确实要删除吗?",Question!, YesNoCancel!, 3)if a=1 then cb_3.triggerevent( Clicked!)else dw_1.retrieve()end if保存:if update(dw_1,true,false)=1 then/保存修改成功,提交修改dw_1.resetupdate()commit;messagebox("提示!","数据更新成功!")else/保存修改失败,取消所作的修改rollback;/弹出一个对话框警告messagebox("错误!","数据更新失败!")end if退出:close(parent)书籍查询界面如下:查询:/定义参数:查询条件综合结果string LookforCondition1string LookforCondition/定义参数:要查询的列string lookforItem1/定义参数:查询的符号string lookforHow1/定义参数:要查询的内容string lookforWhat1/定义参数:当前的行号int current_row1/定义参数:总的行数int total_row1/定义参数:满足条件的行号int find_row1/date lookforWhat1/查询符号的选择lookforHow1=ddlb_2.text/查询子段和查询内容的选择if ddlb_1.text="书号" thenlookforItem1 ="bookid"lookforwhat1="'"+trim(sle_1.text)+"'"elseif ddlb_1.text="书名" thenlookforItem1="bookname"lookforwhat1="'"+trim(sle_1.text)+"'"elseif ddlb_1.text="种类" thenlookforItem1="booktype"lookforwhat1="'"+trim(sle_1.text)+"'"elseif ddlb_1.text="出版社" thenlookforItem1="bookpub"lookforwhat1="'"+trim(sle_1.text)+"'"elseif ddlb_1.text="作者" thenlookforItem1="bookauthor"lookforwhat1="'"+trim(sle_1.text)+"'"elseif ddlb_1.text="是否借出" thenlookforItem1="putup"lookforwhat1="'"+trim(sle_1.text)+"'"elseif ddlb_1.text="类型" thenlookforItem1="booktype"lookforwhat1="'"+trim(sle_1.text)+"'"lookforCondition1=lookforItem1+lookforHow1+lookforwhat1elseif ddlb_1.text="登记日期" thenlookforItem1="bookindate"lookforwhat1=sle_1.textelseif ddlb_1.text="出版日期" thenlookforItem1="bookpubdate"lookforwhat1=sle_1.textelseif ddlb_1.text="价格" thenlookforItem1="price"lookforwhat1=sle_1.textend iflookforCondition1=lookforItem1+lookforHow1+lookforwhat1/定义参数:查询条件综合结果string LookforCondition2/定义参数:要查询的列string lookforItem2/定义参数:查询的符号string lookforHow2/定义参数:要查询的内容string lookforWhat2string operator1,operator2,operator3/查询符号的选择lookforHow2=ddlb_5.text/查询子段和查询内容的选择if ddlb_4.text="书号" thenlookforItem2 ="bookid"lookforwhat2="'"+trim(sle_2.text)+"'"elseif ddlb_4.text="书名" thenlookforItem2="bookname"lookforwhat2="'"+trim(sle_2.text)+"'"elseif ddlb_4.text="种类" thenlookforItem2="booktype"lookforwhat2="'"+trim(sle_2.text)+"'"elseif ddlb_4.text="出版社" thenlookforItem2="bookpub"lookforwhat2="'"+trim(sle_2.text)+"'"elseif ddlb_4.text="作者" thenlookforItem2="bookauthor"lookforwhat2="'"+trim(sle_2.text)+"'"elseif ddlb_4.text="是否借出" thenlookforItem2="putup"lookforwhat2="'"+trim(sle_2.text)+"'"elseif ddlb_4.text="类型" thenlookforItem2="booktype"lookforwhat2="'"+trim(sle_2.text)+"'" lookforCondition2=lookforItem2+lookforHow2+lookforwhat2elseif ddlb_4.text="登记日期" thenlookforItem2="bookindate"lookforwhat2=sle_2.textelseif ddlb_4.text="出版日期" thenlookforItem2="bookpubdate"lookforwhat2=sle_2.textelseif ddlb_4.text="价格" thenlookforItem2="price"lookforwhat2=sle_2.textend iflookforCondition2=lookforItem2+lookforHow2+lookforwhat2/定义参数:查询条件综合结果string LookforCondition3/定义参数:要查询的列string lookforItem3/定义参数:查询的符号string lookforHow3/定义参数:要查询的内容string lookforWhat3/查询符号的选择lookforHow3=ddlb_8.text/查询子段和查询内容的选择if ddlb_7.text="书号" thenlookforItem3 ="bookid"lookforwhat3="'"+trim(sle_3.text)+"'"elseif ddlb_7.text="书名" thenlookforItem3="bookname"lookforwhat3="'"+trim(sle_3.text)+"'"elseif ddlb_7.text="种类" thenlookforItem3="booktype"lookforwhat3="'"+trim(sle_3.text)+"'"elseif ddlb_7.text="出版社" thenlookforItem3="bookpub"lookforwhat3="'"+trim(sle_3.text)+"'"elseif ddlb_7.text="作者" thenlookforItem3="bookauthor"lookforwhat3="'"+trim(sle_3.text)+"'"elseif ddlb_7.text="是否借出" thenlookforItem3="putup"lookforwhat3="'"+trim(sle_2.text)+"'"elseif ddlb_7.text="类型" thenlookforItem3="booktype"lookforwhat3="'"+trim(sle_3.text)+"'" lookforCondition3=lookforItem3+lookforHow3+lookforwhat3elseif ddlb_7.text="登记日期" thenlookforItem3="bookindate"lookforwhat3=sle_3.textelseif ddlb_7.text="出版日期" thenlookforItem3="bookpubdate"lookforwhat3=sle_3.textelseif ddlb_7.text="价格" thenlookforItem3="price"lookforwhat3=sle_3.textend if/查询条件的综合lookforCondition2=lookforItem2+lookforHow2+lookforwhat2if ddlb_3.text="与" thenoperator1="and"elseif ddlb_3.text="或" thenoperator1="or"/elseif ddlb_3.text="非" then /operator1="not"end ifif ddlb_6.text="与" thenoperator2="and"elseif ddlb_6.text="或" thenoperator2="or"/elseif ddlb_6.text="非" then /operator2="not"end ifif ddlb_3.text="" thenlookforCondition=lookforCondition1elseif ddlb_6.text="" thenlookforCondition=lookforCondition1+" "+operator1+" "+lookforCondition2else lookforCondition=lookforCondition1+" "+operator1+" "+lookforCondition2+" "+operator2+" "+lookforCondition3end ifdw_1.setfilter(lookforcondition)dw_1.filter()dw_1.retrieve()刷新:dw_1.reset()打印:/打印数据窗口中内容dw_1.print()退出:close(parent)图书借阅界面如下:关闭:dw_2.visible=false查询:/定义参数:查询条件综合结果string LookforCondition/定义参数:要查询的列string lookforItem1/定义参数:查询的符号string lookforHow1/定义参数:要查询的内容string lookforWhat1/定义参数:当前的行号int current_row/定义参数:总的行数int total_row/定义参数:满足条件的行号int find_row/查询符号的选择
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸下载 > CAD图纸下载


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!