图书馆管理系统设计(附带源代码)
- 格式:doc
- 大小:634.50 KB
- 文档页数:47
以我给的标题写原创文档,最低1200字,要求以Markdown文本格式输出,不要带图片和AI、人工智能、Markdown、GPT等关键词,标题为:图书馆管理系统源代码# 图书馆管理系统源代码## 一、引言图书馆作为一个重要的知识资源和学术场所,对于学生和研究人员具有重要意义。
为了更好地管理图书馆资源和提供服务,图书馆管理系统应运而生。
本文将介绍图书馆管理系统的源代码设计和实现。
## 二、系统功能需求### 1. 登录功能- 提供管理员和用户登录功能- 管理员可进行图书管理、借阅管理等操作- 用户可查询图书信息、借阅情况等### 2. 图书管理- 添加新书籍信息- 修改或删除现有书籍信息- 查询图书信息,包括书名、作者、出版社等### 3. 借阅管理- 用户借阅图书- 用户归还图书- 管理员监管借阅情况### 4. 查询功能- 用户可以根据条件查询图书信息- 管理员可以查询借阅情况、用户信息等## 三、系统设计### 1. 数据库设计- 数据库包括图书信息表、用户信息表、借阅记录表等- 表之间建立关联,保证数据一致性和完整性### 2. 源代码结构```- books- README.md- book.js- bookRouter.js- users- README.md- user.js- userRouter.js- borrows- README.md- borrow.js- borrowRouter.js- index.js```### 3. 源代码逻辑- 使用Node.js构建后端服务- 使用Express框架处理路由和请求- 使用MongoDB作为数据库存储## 四、系统实现### 1. 登录功能```javascript// 用户登录router.post('/login', (req, res) => {// 处理登录逻辑});// 管理员登录router.post('/admin/login', (req, res) => { // 处理管理员登录逻辑});```### 2. 图书管理```javascript// 添加新书籍router.post('/addBook', (req, res) => {// 处理添加书籍逻辑});// 修改书籍信息router.put('/updateBook/:id', (req, res) => {// 处理修改书籍信息逻辑});// 删除书籍router.delete('/deleteBook/:id', (req, res) => {// 处理删除书籍逻辑});```### 3. 借阅管理```javascript// 用户借阅图书router.post('/borrowBook', (req, res) => {// 处理借阅图书逻辑});// 用户归还图书router.put('/returnBook/:id', (req, res) => {// 处理归还图书逻辑});```## 五、总结通过本文介绍,读者可以了解图书馆管理系统源代码的设计和实现逻辑。
#include〈stdio.h〉#include<windows.h〉#include〈string。
h〉#include<conio。
h>#define M 100struct books{char tsmc[12];inttsbh;float dj;char zz[12];char czzt[12];char xm[12];char xb[12];intxh; }s[M];int N;bool flag;intmain (){intsele;flag=0;sele=1;void sr();void cx();void sc();void js();void hs();void tc();void jsh();//system ("tsgl”);printf("\n\n");printf(" ************************\n"); printf(" 1:输入2:查询3:删除\n");printf(”4:借书5:还书0:退出\n");printf(” ************************\n"); while(1){printf(”\n\n请输入功能序号:");scanf (”%d",&sele);if(sele>=0 && sele<=5){switch(sele){case 1:sr();break;case 2:cx();break;case 3:sc();break;case 4:js();break;case 5:hs();break;case 0:jsh();break;}if(flag)break;printf(”\n\n");printf(” ************************\n”); printf(" 1:输入2:查询3:删除\n");printf(”4:借书5:还书0:退出\n”);printf(” ************************\n”);}else{printf(”输入错误请再次输入|\n\n");printf("\n\n");printf(” ************************\n”);printf(" 1:输入2:查询3:删除\n”);printf(”4:借书5:还书0:退出\n");printf(" ************************\n");}printf("\n\n让任意键继续\n”);} //wr_file();}/******主函数***//*********输入*********/void sr(){intn,i;N=0;printf("可输入的书本数:");scanf("%d",&n);N=n+N;printf("请输入相关信息:\n");for(i=1;i<=n;i++){printf(”图书名称:”);scanf(”%s",s[N-n-1+i]。
图书管理系统源代码(一)程序代码1。
主窗口界面import java.awt。
*;import java.awt。
event.*;import javax。
swing.*;import javax.swing.border.TitledBorder;import java.awt。
Font;import javax.swing。
JMenu;public class MainWindow extends JFrame implements ActionListener { private static final long serialVersionUID = 1L;static String loginName;static String loginNo;JLabel mlabel;JPanel jp=new JPanel();//建立菜单栏JMenu a=new JMenu();JMenu b=new JMenu();JMenu c=new JMenu();//建立系统管理菜单组JMenuItem aa=new JMenuItem();JMenuItem ab=new JMenuItem();JMenuItem ac=new JMenuItem();//建立读者管理菜单组JMenuItem bb=new JMenuItem();//建立书籍管理菜单组JMenuItem ca=new JMenuItem();JMenuItem cb=new JMenuItem();JMenuItem cc=new JMenuItem();JMenuItem cd=new JMenuItem();public MainWindow(){super(”图书管理系统");addWindowListener(new WindowAdapter(){System.exit(0);}});Container d=getContentPane();this。
原创C语言图书馆管理系统源代码介绍图书馆作为一个重要的知识储备和学习场所,必须进行有效的管理和组织。
使用C语言编写的图书馆管理系统可以帮助图书馆实现自动化的借阅、归还和管理功能。
本文将介绍一个原创的C语言图书馆管理系统的源代码。
功能概述这个图书馆管理系统具有以下核心功能: - 图书管理:包括添加图书、删除图书、查询图书等操作。
- 借阅管理:可以进行借阅操作,记录借阅者和借阅时间。
- 归还管理:可以进行归还操作,并更新图书的可借状态。
- 用户管理:管理借阅者的信息,包括添加用户、删除用户、查询用户等操作。
数据结构设计该图书馆管理系统使用了以下几种数据结构: 1. 图书(Book)结构体:包含图书的ID、书名、作者、可借状态等字段。
2. 用户(User)结构体:包含用户的ID、姓名、地址等字段。
3. 借阅记录(BorrowRecord)结构体:包含借阅者ID、图书ID、借阅时间等字段。
系统流程整个系统的流程可以分为以下几个步骤: 1. 用户打开系统,进入主菜单。
2. 用户选择不同的功能选项(如图书管理、借阅管理、用户管理等)。
3. 根据用户选择的功能,进入相应的功能界面。
4. 用户可以根据提示,输入相应的信息进行图书管理、借阅管理或用户管理操作。
5. 用户完成操作后,可以选择返回主菜单或退出系统。
代码实现以下是一个简化版的C语言图书馆管理系统的源代码:```c #include <stdio.h>// 定义结构体 struct Book { int id; char name[50]; char author[50]; int isAvailable; };struct User { int id; char name[50]; char address[100]; };struct BorrowRecord { int userId; int bookId; char borrowDate[20]; };// 函数声明 void addBook(); void deleteBook(); void searchBook(); void borrowBook(); void returnBook(); void addUser(); void deleteUser(); void searchUser();int main() { int choice;do {// 显示主菜单printf(\。
#include <iostream>#include <iomanip>#include <string>#include<stdlib.h>#include<stdio.h>#include<conio.h>#include <fstream>//输入/输出文件流类using namespace std;const int Maxr=100;//最多的读者const int Maxb=100;//最多的图书const int Maxbor=5;//每位读者最多借五本书//读者类,实现对读者的信息的描述class Reader{private:int tag; //删除标记1:已删0:未删int no; //读者编号char name[10]; //读者姓名int borbook[Maxbor];//所借图书public:Reader() {}char *getname() {return name;} //获取姓名int gettag() {return tag;} //获取删除标记int getno() {return no;} //获取读者编号void setname(char na[]) //设置姓名{strcpy(name,na);}void delbook(){ tag=1; }//设置删除标记1:已删0:未删void addreader(int n,char *na)//增加读者{tag=0;no=n;strcpy(name,na);for(int i=0;i<Maxbor;i++)borbook[i]=0;}void borrowbook(int bookid)//借书操作{for(int i=0;i<Maxbor;i++){if (borbook[i]==0){borbook[i]=bookid;return;}}}int retbook(int bookid)//还书操作{for(int i=0;i<Maxbor;i++){if(borbook[i]==bookid){borbook[i]=0;return 1;}}return 0;}void disp()//读出读者信息{cout << setw(5) << no <<setw(10) << name<<"借书编号:[";for(int i=0;i<Maxbor;i++)if(borbook[i]!=0)cout << borbook[i] << "|";cout << "]"<<endl;}int Reader::jieshu(int i){return borbook[i];}};//读者类库,实现建立读者的个人资料class RDatabase{private:int top; //读者记录指针Reader read[Maxr];//读者记录public:RDatabase() //构造函数,将reader.txt读到read[]中{Reader s;top=-1;fstream file("reader.txt",ios::in);//打开一个输入文件while (1){file.read((char *)&s,sizeof(s));if (!file)break;top++;read[top]=s;}file.close(); //关闭reader.txt}void clear()//删除所有读者信息{top=-1;}int addreader(int n,char *na)//添加读者时先查找是否存在{Reader *p=query(n);if (p==NULL){top++;read[top].addreader(n,na);return 1;}return 0;}Reader *query(int readerid)//按编号查找{for (int i=0;i<=top;i++)if (read[i].getno()==readerid &&read[i].gettag()==0){return &read[i];}return NULL;}void disp() //输出所有读者信息{for (int i=0;i<=top;i++)read[i].disp();}void readerdata();//读者库维护~RDatabase() //析构函数,将read[]写到reader.txt文件中{fstream file("reader.txt",ios::out);for (int i=0;i<=top;i++)if (read[i].gettag()==0)file.write((char *)&read[i],sizeof(read[i]));file.close();}};void RDatabase::readerdata(){char choice;char rname[20];int readerid;Reader *r;while (choice!='0'){cout <<"\n\n\t\t\t读者维护\n\n\n\t\t 1 新增\n\n\t\t 2 更改\n\n\t\t 3 删除\n\n\t\t 4 查找\n\n\t\t 5 显示\n\n\t\t 6 全删\n\n\t\t 0 退出"<<endl;cin >> choice;switch (choice){case '1':cout << "输入读者编号:";cin >> readerid;cout << "输入读者姓名:";cin >> rname;addreader (readerid,rname);break;case '2':cout << "输入读者编号:";cin >> readerid;r=query(readerid);if (r==NULL){cout << " 该读者不存在"<<endl;break;}cout << "输入新的姓名:";cin >> rname;r->setname(rname);break;case '3':cout << " 输入读者编号:";cin >> readerid;r=query(readerid);if (r==NULL){cout <<" 该读者不存在" << endl;break;}r->delbook();break;case '4':cout << "读入读者编号:";cin >> readerid;r=query(readerid);if (r==NULL){cout <<"该读者不存在"<< endl;break;}r->disp();break;case '5':disp();break;case '6':clear();break;default:cout<<"输入错误,请从新输入:";break;}}}//图书类,实现对图书的描述,图书的编号,书名,借出,还入等class Book{private:int tag;//删除标记1:已删0:未删int no;//图书编号char name[20];//书名int onshelf;//是否再架1:再架2:已借public:Book(){}char *getname() { return name; }//获取姓名int getno(){ return no; }//获取图书编号int gettag(){ return tag; }//获取删除标记void setname(char na[])//设置书名{strcpy(name,na);}void delbook(){ tag=1;}//删除图书void addbook(int n,char *na)//增加图书{tag=0;no=n;strcpy(name,na);onshelf=1;}int borrowbook()//借书操作{if (onshelf==1){onshelf=0;return 1;}return 0;}void retbook()//还书操作{onshelf=1;}void disp()//输出图书{cout << setw(6) << no << setw(18) << name << setw(10) <<(onshelf==1? "在架":"已借") <<endl;}};//图书库类,实现对图书的维护,查找,删除等class BDatabase{private:int top; //图书记录指针Book book[Maxb]; //图书记录public:BDatabase()//构造函数,将book.txt读到book[]中{Book b;top=-1;fstream file("book.txt",ios::in);while (1){file.read((char *)&b,sizeof(b));if (!file) break;top++;book[top]=b;}file.close();}void clear()//全删{top=-1;}int addbook(int n,char *na)//增加图书{Book *p=query(n);if (NULL==p){top++;book[top].addbook(n,na);return 1;}return 0;}Book *query(int bookid)//查找图书{for (int i=0;i<=top;i++)if (book[i].getno()==bookid &&book[i].gettag()==0){return &book[i];}return NULL;}void bookdata();//图书库维护void disp(){for (int i=0;i<=top;i++)if (book[i].gettag()==0)book[i].disp();}~BDatabase()//析构函数,将book[]写到book.txt文件中{fstream file("book.txt",ios::out);for (int i=0;i<=top;i++)if (book[i].gettag()==0)file.write((char *)&book[i],sizeof(book[i]));file.close();}};void BDatabase::bookdata(){char choice;char bname[40];int bookid;Book *b;while (choice!='0'){cout <<"\n\n\n\t\t\t图书维护"<<endl<<endl;cout<<"\t\t1 新增\n \t\t2 更改\n\t\t3 删除\n\t\t4 查找\n\t\t5 显示\n\t\t6 全删\n\t\t0 退出"<<endl;cin >> choice;switch (choice){case '0': break;case '1':cout << "输入图书编号:"<<endl;cin >> bookid;cout << "输入图书书名:"<<endl;cin >> bname;addbook(bookid,bname);break;case '2':cout << "输入图书编号:"<<endl;cin >> bookid;b=query(bookid);if (b==NULL){cout << " 该图书不存在"<<endl;break;}cout << "输入新的书名:"<<endl;cin >> bname;b->setname(bname);break;case '3':cout <<" 读入图书编号:"<<endl;cin >> bookid;b=query(bookid);if (b==NULL){cout <<" 该图书不存在" << endl;break;}b->delbook();break;case '4':cout << " 读入图书编号:"<<endl;cin >> bookid;b=query(bookid);if (b==NULL){cout <<" 该图书不存在"<< endl;break;}b->disp();break;case '5':disp();break;case '6':clear();break;default:cout<<"输入错误,请从新输入:";}}}//main() 函数的实现,程序的主界面的引导int main(){char a[]="111111",m[10],c;int n=0,k,asd=0,i;char choice;int bookid,readerid;RDatabase ReaderDB;Reader *r;BDatabase BookDB;Book *b;while(1){cout<<" 图书管图书管理系统\n";cout<<" 菜单\n";cout<<" 1 图书管理员\n";cout<<" 2 读者\n";cout<<" 0 退出\n";cout<<"请输入您的选择(0--2)\n";cin>>choice;switch (choice){case'0':return 0;case'1':cout<<"\n请输入密码,你将拥有3次机会:\n";while(1){n++;k=0;if(n>3){cout<<"你已经超过输入次数,系统将退出\n";cout<<"\n\t\t----------------操作完成!-----------------"<<endl;getch();break;}cout<<"输入密码:";while(1){c=getch();if(c==13)break;m[k]=c;k++;cout<<"*";}m[k]='\0';cout<<"\n\t\t----------------操作完成!-----------------"<<endl;cout<<"\n";if(strcmp(a,m)==0){cout <<"1 图书维护\n2 读者维护\n0 离开"<<endl;cin >> choice;switch (choice){case '1':BookDB.bookdata();break;case '2':ReaderDB.readerdata();break;case '0':break;default:cout<<"输入错误,请重新输入:";}}else{cout<<"密码错误,请重新输入\n";continue;cout<<"\n";cout<<"\n\t\t----------------操作完成!-----------------"<<endl;break;}break;case '2':cout <<"1 借书\n2 还书\n0 离开"<<endl;cin>>choice;switch (choice){case '1':cout <<" 借书读者编号:";cin >>readerid;cout <<" 图书编号:";cin >>bookid;r=ReaderDB.query(readerid);//按编号查找if (NULL==r){cout <<" 不存在该读者,不能借书"<< endl;break;}b=BookDB.query(bookid);if (b==NULL){cout <<" 不存在该图书,不能借书"<< endl;break;}if (b->borrowbook()==0){cout << " 该图书已借出,不能借书"<< endl;break;}r->borrowbook(b->getno());break;case '2':cout<<"还书\n 读者编号:";cin >>readerid;cout << " 图书编号:";cin >>bookid;r=ReaderDB.query(readerid);if (r==NULL){cout <<" 不存在该读者,不能还书" << endl;break;b=BookDB.query(bookid);if (b==NULL){cout <<" 不存在该图书,不能还书" <<endl;break;}asd=0;for(i=0;i<5;i++)if(r->jieshu(i)==bookid)asd=1;if(asd==0){cout<<" 你没有借书,不能还书"<<endl;break;}b->retbook();r->retbook(b->getno());break;case '0':cout<<"欢迎再次使用\n";break;default:cout<<"输入错误,请从新输入:";}cout<<"\n\t\t----------------操作完成!-----------------"<<endl;break;}}return 0;}。
图书管理系统毕业设计源代码1. 简介图书管理系统是一个用于管理图书馆藏书及借阅情况的软件系统。
本文档将详细介绍图书管理系统的毕业设计源代码。
2. 源代码结构图书管理系统的源代码采用模块化的设计,分为以下几个模块: - 用户管理模块:负责管理员和读者的管理,包括用户注册、登录、修改密码等功能。
- 图书管理模块:负责图书的录入、删除、查找等功能。
- 借阅管理模块:负责借阅记录的管理,包括借书、还书、查看借阅历史等功能。
- 统计分析模块:负责统计图书馆的借阅情况、读者喜好等信息。
- 权限管理模块:负责管理不同角色的权限,例如管理员有更高的权限。
3. 技术选型•后端开发语言:采用Java语言进行开发,利用Java的面向对象和多线程的特性来实现系统的各个功能模块。
•前端开发:采用HTML、CSS和JavaScript进行前端开发,使用Bootstrap框架来实现页面的美化和响应式布局。
•数据库:采用MySQL关系数据库管理系统,存储图书馆的图书信息、用户信息及借阅记录等数据。
4. 代码实现细节4.1 用户管理模块用户管理模块的主要功能包括用户注册、登录、修改密码等。
- 用户注册:用户可以填写注册表单,并将信息提交到服务器进行注册。
服务器会将用户的信息存储到数据库中,并为用户分配一个唯一的ID。
- 用户登录:用户在登录页面输入用户名和密码,服务器会校验用户的登录信息,并根据用户的角色跳转到相应的首页。
- 修改密码:用户可以在个人信息页面修改密码,需要输入原密码和新密码。
4.2 图书管理模块图书管理模块的主要功能包括图书的录入、删除、查找等。
- 图书录入:管理员可以在后台管理页面输入图书的信息,包括书名、作者、出版社、ISBN等,并提交保存到数据库中。
- 图书删除:管理员可以根据图书的ID或其他关键字进行图书的删除操作,同时删除数据库中的对应记录。
- 图书查找:管理员和读者可以根据图书的关键字进行查找,系统会显示匹配的图书列表。
西安郵電學院软件设计课程设计报告题目:图书馆信息管理系统系部名称:电信系专业名称:电子科学与技术班级:科技0701学号:05072002学生姓名:XXX指导教师:黄茹时间:2008年6月9日至2008年6月20日一、设计目的通过本课程设计,强化上机动手能力,使我们在理论和实践的基础上进一步巩固《C语言程序设计》课程学习的内容,掌握工程软件设计的基本方法学会将知识应用于实际的方法,提高分析和解决问题的能力,增加综合能力。
为后续各门计算机课程的学习打下坚实基础。
为毕业设计和以后工作打下必要基础。
二、课程设计内容本设计是一个能够实现基本功能(借阅图书登记等)的图书馆管理系统,由于所学知识有限,自然不能与真正的现代图书馆管理系统相比,但也是尽所之能了。
三、需求分析对所开发系统功能、性能的描述,想要实现的目标。
系统功能: 1.现有图书按时间和类型查询2.新书按时间和类型查询3.借阅管理(普通用户查看自己的借书历史记录,管理员可实现借书、还书登记等)4.图书管理(管理员可添加新书、删除丢失图书信息,将图书加入丢失图书)5.统计图书信息6.系统维护(新建用户、密码修改、更换用户)等六大功能。
性能的描述:本系统总体分普通用户和管理员用户,其中管理员可实现添加新书、用户,登记借书、还书、统计等全部功能,普通用户只能实现图书查询、修改自身密码、查看自身借阅历史情况。
在查询方面分时间和类型两种(由于时间、技术等方面限制,将时间功能由原来的int型结构体改为char型,因此也没用到《C算法》中的各种较为高级的排列,实为遗憾,这也导致程序无法自己算出还书日期),界面比较简单,操纵容易。
想实现目标:本程序的基础结构图借鉴于《Visual Basic设计信息管理系统实例》中的例子,以现代图书馆管理系统为蓝本,结合本校图书馆的规定,可惜的是目标虽远大,技术不过关,导致与原计划有较大偏差,将好些复杂的地方简单化,减少了计划中的好些功能。
图书管理系统源代码1. 简介图书管理系统是一种用于管理图书馆或书店中图书信息的软件系统。
它主要提供了图书的添加、编辑、删除、查询等功能,便于管理人员对图书信息进行集中管理,同时也能方便读者进行图书的查询和借阅操作。
本文档将介绍一个基于Python的简单图书管理系统的源代码,以及其使用说明和功能演示。
2. 系统设计2.1 使用的库该图书管理系统使用了以下Python库来实现不同功能:•Tkinter:用于GUI界面的设计和实现。
•SQLite3:用于图书信息的持久化存储。
2.2 数据库设计在该图书管理系统中,我们使用了一个简单的图书信息表来存储图书的相关信息。
该表包含以下字段:•book_id:图书ID,唯一标识一个图书。
•book_title:图书标题,描述图书的名称。
•book_author:图书作者,描述图书的作者信息。
•book_publisher:图书出版商,描述图书的出版商信息。
2.3 功能设计该图书管理系统实现了以下功能:•添加图书:管理员可以添加一本新的图书到系统中。
•编辑图书:管理员可以编辑已存在的图书信息。
•删除图书:管理员可以从系统中删除指定的图书。
•查询图书:管理员和读者都可以根据图书的标题、作者或出版商来查询图书信息。
3. 源代码以下是该图书管理系统的源代码(使用Python编写):```python import tkinter as tk import sqlite3连接到数据库conn = sqlite3.connect(’library.db’) c = conn.cursor()创建图书信息表c.execute(’’’ CREATE TABLE IF NOT EXISTS books ( book_id INTEGER PRIMARY KEY AUTOINCREMENT, book_title TEXT, book_author TEXT, book_publisher TEXT ) ’’’)窗口初始化window = () window.title(。
毕业设计_图书管理系统一、数据库设计数据库设CREATE DATABASE TSGLGOUSE TSGLGOCREATE TABLE Bmanage(bId varchar(10) PRIMARY KEY,bName v archar(50), --添加图书--图书编号--书名bNumber varchar(10), --书数目)GObSore varchar(50) --分类CREATE TABLE Madmin(mNamevarchar(10)PRIMARY KEY, mPwd v archar(25),mAge varchar(8),mSex varchar(4),mNumber varchar(15),mrole varchar(8))GO--图书员管理--图书管理员姓名--图书管理员密码--图书管理员年龄--图书管理员性别--图书管理员--图书管理员角色CREATE TABLE Reader(rSno varchar(10) PRIMARY KEY,rName varchar(10),rPwd varchar(25),rAge varchar(8),rSex varchar(4),rState varchar(8),rNumber varchar(15),rEmail varchar(25),--读者信息表reader--读者号--姓名--密码--年龄--性别--状态----电子rAdress varChar(50), --地址) GO rGrade varChar(15),rClass varchar(15),rRole varchar(8)--年级--班级--角色CREATE TABLE Rrecord (rSno varchar(10) PRIMARY KEY,rName varChar(10),bId varchar(10),bName v arChar(50),bTime varchar(10),bBackTime varchar(10))GOCREATE TABLE SysSet(rRole varchar(8)PRIMARY KEY,rState varchar(8),Fine float(25),rDay varchar(8)--读者编号学号--读者姓名--图书编号--图书名称--借书时间--还书时间--读者角色--读者可借书数--过期罚款设置--可借书天数)二、界面截图及说明1) 登录窗口(实现管理员和馆长的登陆)2) 管理员窗口3) 馆长窗口4) 关于窗口5) 新增图书窗口6) 新增管理员、查找及修改窗口8) 图书的查找及修改窗口9) 借阅窗口10)系统设置窗口三、主要代码主要代1) 登录窗口(实现管理员和馆长的登陆)登陆检查:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using prjTSGL.ClassLib.DBAccess;namespace prjTSGL.ClassLib.Logic{class clsLoginCheck{public static DataTable CheckLogin(string UserId, string PWD){{string SQLstmt = "select mName,mPwd,mRole from Madmin where mName= '" + UserId + "'and mPwd= '" + PWD + "'";DataTable dt = clsGlobalVar.GetDataTable(SQLstmt);return dt;}}}}登陆:using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using prjTSGL.ClassLib.Logic;namespace prjTSGL.TSGL_UI{public partial class frmLogin : Form{public frmLogin(){InitializeComponent();}private void btnLogin_Click(object sender, EventArgs e){string strUserID = loginid.Text.Trim();string strPWD = loginpwd.Text.Trim();string type = "";try{DataTable dt = clsLoginCheck.CheckLogin(strUserID, strPWD);if (dt.Rows.Count == 0){MessageBox.Show("登陆失败,请重新输入!");loginpwd.Focus();return;}else{type = dt.Rows[0]["mRole"].ToString().Trim();if (cboLT.Text.Trim()=="馆长" ){if (type == "馆长"){this.Hide();frmManager objManager = new frmManager();objManager.Show();}else{MessageBox.Show("您没有权限!");loginpwd.Focus();return;}}else{if (type =="管理员"){this.Hide();frmAdmin objAdmin = new frmAdmin();objAdmin.Show();}else{MessageBox.Show("您没有权限!");loginpwd.Focus();return;}}}}catch (Exception ex){throw ex;}}private void btnExit_Click(object sender, EventArgs e){this.Close();}}}2) 管理员窗口using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace prjTSGL.TSGL_UI{public partial class frmAdmin : Form{public frmAdmin(){InitializeComponent();}private void ShowForm(Form frmToShow){this.Cursor = Cursors.WaitCursor;foreach (Form frmChild in this.MdiChildren){if (frmChild.GetType() == frmToShow.GetType()){frmToShow.Dispose();frmChild.Activate();this.Cursor = Cursors.Default;return;}}frmToShow.MdiParent = this;frmToShow.Show();this.Cursor = Cursors.Default;}private void读者信息修改ToolStripMenuItem_Click(object sender, EventArgs e){ShowForm(new frmUpdateReader());}private void新增图书ToolStripMenuItem_Click(object sender, EventArgs e){ShowForm(new frmAddNewBook());}private void图书的查找和修改ToolStripMenuItem_Click(object sender, EventArgs e) {ShowForm(new frmUpdateBook());}private void流通管理ToolStripMenuItem_Click(object sender, EventArgs e){ShowForm(new frmBorrow());}private void帮助ToolStripMenuItem_Click(object sender, EventArgs e){ShowForm(new frmAbout());}private void退出ToolStripMenuItem_Click(object sender, EventArgs e){Application.Exit();}}}3) 馆长窗口using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace prjTSGL.TSGL_UI{public partial class frmManager : Form{public frmManager(){InitializeComponent();}private void ShowForm(Form frmToShow){this.Cursor = Cursors.WaitCursor;foreach (Form frmChild in this.MdiChildren){if (frmChild.GetType() == frmToShow.GetType()){frmToShow.Dispose();frmChild.Activate();this.Cursor = Cursors.Default;return;}}frmToShow.MdiParent = this;frmToShow.Show();this.Cursor = Cursors.Default;}private void frmManager_FormClosed(object sender, FormClosedEventArgs e){Application.Exit();}private void管理员信息管理ToolStripMenuItem_Click_1(object sender, EventArgs e) {ShowForm(new frmSelectAdmin());}private void系统设置ToolStripMenuItem_Click_1(object sender, EventArgs e) {ShowForm(new frmSys());}private void关于ToolStripMenuItem_Click(object sender, EventArgs e){ShowForm(new frmAbout());}private void退出ToolStripMenuItem_Click_1(object sender, EventArgs e){Application.Exit();}}}4) 关于窗口using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace prjTSGL.TSGL_UI{public partial class frmAbout : Form{public frmAbout(){InitializeComponent();}private void button1_Click(object sender, EventArgs e){this.Close();}}}5) 新增图书窗口using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using prjTSGL.ClassLib.DBAccess;namespace prjTSGL.TSGL_UI{public partial class frmAddNewBook : Form{public frmAddNewBook(){InitializeComponent();}private bool ValidatInput(){if (textBox1.Text == ""){MessageBox.Show("请输入图书编号!", "输入提示", MessageBoxButtons.OK, rmation);textBox1.Focus();return false;}if (textBox2.Text == ""){MessageBox.Show("请输入图书名称!", "输入提示", MessageBoxButtons.OK, rmation);textBox2.Focus();return false;}if (textBox3.Text == ""){MessageBox.Show("请输入图书数目!", "输入提示", MessageBoxButtons.OK,rmation);textBox3.Focus();return false;}if (comboBox1.Text == ""){MessageBox.Show("请选择图书类别!", "输入提示", MessageBoxButtons.OK, rmation);textBox3.Focus();return false;}return true;}private void btnOK_Click_1(object sender, EventArgs e){if (ValidatInput()){//string id = textBox1.Text;//string name = textBox2.Text;//string Number = textBox3.Text;//string sore = comboBox1.Text;string sql = "SELECT *FROM Bmanage WHERE bId='" + textBox1.Text.Trim() + " '";DataTable dt = clsGlobalVar.GetDataTable(sql);if (dt.Rows.Count == 0){string SQL = "insert into Bmanage(bId,bName,bNumber,bSore)values('" + textBox1.Text.Trim() + " ','" + textBox2.Text.Trim() + " ','" + textBox3.Text.Trim() + " ','"+ comboBox1.Text.Trim() + " ')";try{bool result = clsGlobalVar.ExecSQL(SQL);if (result){MessageBox.Show("添加成功!", "操作提示", MessageBoxButtons.OK, rmation);textBox1.Text = "";textBox2.Text = "";textBox3.Text = "";comboBox1.Text = "";textBox1.Focus();}else{MessageBox.Show("添加失败!", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Error);}}catch (Exception ex){MessageBox.Show("操作数据库出错!", "操作演示", MessageBoxButtons.OK, MessageBoxIcon.Error);Console.WriteLine(ex.Message);}}else{MessageBox.Show("图书编号已存在!", "操作提示", MessageBoxButtons.OK, rmation);textBox1.Focus();}}}private void btnCancel_Click(object sender, EventArgs e){this.Close();}}}6) 新增管理员、查找及修改窗口using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using prjTSGL.ClassLib.DBAccess;namespace prjTSGL.TSGL_UI{public partial class frmSelectAdmin : Form{public frmSelectAdmin(){InitializeComponent();}string name = "";string SQL = "";string PWD = "";string Age = "";string Sex = "";string Tel = "";string Role = "";private void SelectAdmin(){string strfilter = "";string SQL = "select mName AS 用户名,mPwd AS 密码,mAge AS 年龄,mSex AS 性别,mNumber AS ,mRole AS 角色from Madmin ";if (txtName.Text == "")strfilter = "";elsestrfilter = "where mName='" + txtName.Text.Trim() + "'";try{DataTable dt = clsGlobalVar.GetDataTable(SQL + strfilter);int intIndex = 0;if (dt.Rows.Count == 0){MessageBox.Show("抱歉,没有您要找的用户!", "结果提示", MessageBoxButtons.OK, rmation);txtName.Text = "";txtPWD.Text = "";txtAge.Text = "";cboSex.Text = "";txtTel.Text = "";cboRole.Text = "";}else{{LV.Columns.Clear();LV.Items.Clear();LV.Columns.Add("序号", 100, HorizontalAlignment.Center);for (int intJ = 0; intJ < dt.Columns.Count; intJ++){LV.Columns.Add(dt.Columns[intJ].ColumnName, 200, HorizontalAlignment.Center);}for (int intI = 0; intI < dt.Rows.Count; intI++){intIndex = intI + 1;LV.Items.Add(intIndex.ToString());LV.Items[intI].SubItems.Add(dt.Rows[intI]["用户名"].ToString().Trim());LV.Items[intI].SubItems.Add(dt.Rows[intI]["密码"].ToString().Trim());LV.Items[intI].SubItems.Add(dt.Rows[intI]["年龄"].ToString().Trim());LV.Items[intI].SubItems.Add(dt.Rows[intI]["性别"].ToString().Trim());LV.Items[intI].SubItems.Add(dt.Rows[intI][""].ToString().Trim());LV.Items[intI].SubItems.Add(dt.Rows[intI]["角色"].ToString().Trim());}}}}//连接数据库,将数据读取出放入MadminDatacatch (Exception ex){MessageBox.Show("查询数据库出错!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);Console.WriteLine(ex.Message);}}private void btnSearch_Click(object sender, EventArgs e){SelectAdmin();//调用函数}//实现修改功能private void btnUpdata_Click(object sender, EventArgs e){if (txtName.Text == "" || cboRole.Text==""){MessageBox.Show("请选择要修改的用户!");}else{SQL = "UPDATE Madmin SET mName='" + txtName.Text.Trim() + "',mPwd='" +txtPWD.Text.Trim() + "',mAge='" + txtAge.Text.Trim() + "',mSex='" + cboSex.Text.Trim() +"',mNumber='" + txtTel.Text.Trim() + "',mRole='" + cboRole.Text.Trim() + "' where mName='" + name+ "'AND mPwd='" + PWD + "'AND mAge='" + Age + "'AND mSex='" + Sex + "'AND mNumber='" + Tel + "'AND mRole='" + Role + "'";try{bool result = clsGlobalVar.ExecSQL(SQL);if (result){//txtName.Text = "";txtPWD.Text = "";txtAge.Text = "";cboSex.Text = "";txtTel.Text = "";cboRole.Text = "";MessageBox.Show("修改已成功");SelectAdmin();}else{MessageBox.Show("更新失败!", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Error);}}catch (Exception ex){MessageBox.Show("操作数据库出错!", "操作演示", MessageBoxButtons.OK, MessageBoxIcon.Error);Console.WriteLine(ex.Message);}}}private void btnExit_Click(object sender, EventArgs e){this.Close();}private void LV_SelectedIndexChanged_1(object sender, EventArgs e){txtName.Text = LV.FocusedItem.SubItems[1].Text.Trim();txtPWD.Text = LV.FocusedItem.SubItems[2].Text.Trim();txtAge.Text = LV.FocusedItem.SubItems[3].Text.Trim();cboSex.Text = LV.FocusedItem.SubItems[4].Text.Trim();txtTel.Text = LV.FocusedItem.SubItems[5].Text.Trim();cboRole.Text = LV.FocusedItem.SubItems[6].Text.Trim();name = LV.FocusedItem.SubItems[1].Text.Trim();PWD = LV.FocusedItem.SubItems[2].Text.Trim();Age = LV.FocusedItem.SubItems[3].Text.Trim();Sex = LV.FocusedItem.SubItems[4].Text.Trim();Tel = LV.FocusedItem.SubItems[5].Text.Trim();Role = LV.FocusedItem.SubItems[6].Text.Trim();}private void frmSelectAdmin_Load(object sender, EventArgs e){this.btnSearch_Click(sender, e);}private void btnAdd_Click(object sender, EventArgs e){if (txtName.Text == "" || txtPWD.Text == "" || txtAge.Text == "" ||cboSex.Text == "" || txtTel.Text=="" ||cboRole.Text == ""){MessageBox.Show("请至少输入用户名,密码和角色!");}else{SQL = "SELECT mName,mPwd,mAge ,mSex,mNumber,mRole from Madmin WHERE mName='" + txtName.Text.Trim() + "' ";DataTable dt = clsGlobalVar.GetDataTable(SQL);if (dt.Rows.Count == 0){SQL = "INSERT INTO Madmin VALUES ('" + txtName.Text.Trim() + "','" +txtPWD.Text.Trim() + "','" + txtAge.Text.Trim() + "','" + cboSex.Text.Trim() + "','" +txtTel.Text.Trim() + "','" + cboRole.Text.Trim() + "')";if (clsGlobalVar.ExecSQL(SQL) == true){//txtName.Text = "";txtPWD.Text = "";txtAge.Text = "";cboSex.Text = "";txtTel.Text = "";cboRole.Text = "";MessageBox.Show("成功添加新管理员!");SelectAdmin();}else{Exception ex = new Exception();MessageBox.Show(ex.Message.ToString());}}else{MessageBox.Show("用户名已存在,请选择其他用户名!", "结果提示", MessageBoxButtons.OK, rmation);txtName.Text = "";}}}private void btnDelete_Click(object sender, EventArgs e){if (txtName.Text == "" || cboRole.Text == ""){MessageBox.Show("请选择要删除的管理员用户!");}else{DialogResult dr = MessageBox.Show("此操作不可撤销,确定要删除此用户信息吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);if (dr == DialogResult.Yes){SQL = "DELETE FROM Madmin WHERE mName='" + name + "'AND mPwd='" + PWD + "'AND mAge='" + Age + "'AND mSex='" + Sex + "'AND mNumber='" + Tel + "'AND mRole='" + Role + "'";if (clsGlobalVar.ExecSQL(SQL) == true){MessageBox.Show("成功删除此管理信息!");SelectAdmin();}else{Exception ex = new Exception();MessageBox.Show(ex.Message.ToString());}}}}private void btnReset_Click(object sender, EventArgs e){txtName.Text = "";txtPWD.Text = "";txtAge.Text = "";cboSex.Text = "";txtTel.Text = "";cboRole.Text = "";}}}7) 新增读者、查找及修改窗口using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using prjTSGL.ClassLib.DBAccess;namespace prjTSGL.TSGL_UI{public partial class frmUpdateReader : Form{public frmUpdateReader(){InitializeComponent();}string Sno = "";string Pwd = "";string Age = "";string name = "";string Sex = "";string State = "";string Adress = "";string Number = "";string Email = "";string Grade = "";string Class = "";string Role = "";//查找学生读者private void SelectStudent(){string strfilter = "";string SQL = "select rSno AS 读者编号,rName AS 读者姓名,rPwd AS 密码,rAge AS 年龄,rSex AS 性别,rState AS 借书状态,rAdress AS 地址,rNumber AS ,rEmail AS ,rGrade AS 年级,rClass AS 班级,rRole AS 角色from Reader ";if (txtReaderName.Text == "")strfilter = "";elsestrfilter = "where rName='" + txtReaderName.Text.Trim() + "'";try{DataTable dt = clsGlobalVar.GetDataTable(SQL + strfilter);int intIndex = 0;if (dt.Rows.Count==0){MessageBox.Show("抱歉,没有您要找的读者信息!", "结果提示", MessageBoxButtons.OK, rmation);}else{LV.Columns.Clear();LV.Items.Clear();LV.Columns.Add("序号", 100, HorizontalAlignment.Center);for (int intJ = 0; intJ < dt.Columns.Count; intJ++){LV.Columns.Add(dt.Columns[intJ].ColumnName, 200, HorizontalAlignment.Center);}for (int intI = 0; intI < dt.Rows.Count; intI++){intIndex = intI + 1;LV.Items.Add(intIndex.ToString());for (int j=1; j < dt.Columns.Count; j++){LV.Items[intI].SubItems.Add(dt.Rows[intI][j].ToString());}//LV.Items[intI].SubItems.Add(dt.Rows[intI]["读者编号"].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI]["读者姓名"].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI]["密码"].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI]["年龄"].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI]["性别"].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI]["借书状态"].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI]["地址"].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI][""].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI][""].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI]["年级"].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI]["班级"].ToString());//LV.Items[intI].SubItems.Add(dt.Rows[intI]["角色"].ToString());}}}catch (Exception ex){MessageBox.Show("查询数据库出错!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);Console.WriteLine(ex.Message);}}//实现查找功能private void btnSearch_Click(object sender, EventArgs e){SelectStudent();}//实现修改功能private void btnUpdata_Click(object sender, EventArgs e){if (textBox2.Text == ""){MessageBox.Show("请选择要修改的用户!");}else//string sql = "SELECT * from Reader WHERE rSno='" + textBox2.Text.Trim() + "' ";//DataTable dt = clsGlobalVar.GetDataTable(sql);//if (dt.Rows.Count == 0)//{{string SQL = "UPDATE Reader SET rSno='" + textBox2.Text.Trim() + "',rPwd='" + textBox3.Text.Trim() + "',rAge='" + textBox1.Text.Trim() + "',rName='" + txtReaderName.Text.Trim() + "',rSex='" + cboSex.Text.Trim() + "',rState='" + textBox4.Text.Trim() + "',rAdress='" + textBox5.Text.Trim() + "',rNumber='" + textBox6.Text.Trim() + "',rEmail='" + textBox7.Text.Trim() + "',rGrade='" + textBox8.Text.Trim() + "',rClass='" + textBox9.Text.Trim()+ "' ,rRole='" + cboRole.Text.Trim() + "'";string strfilter = "where rSno='" + Sno + "'";try{bool result = clsGlobalVar.ExecSQL(SQL + strfilter);if (result){textBox2.Text = "";textBox3.Text = "";textBox1.Text = "";cboSex.Text = "";textBox4.Text = "";textBox5.Text = "";textBox6.Text = "";textBox7.Text = "";textBox8.Text = "";textBox9.Text = "";cboRole.Text = "";MessageBox.Show("修改已成功");SelectStudent();}else{MessageBox.Show("读者信息不存在!", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.Error);}}catch (Exception ex){MessageBox.Show("操作数据库出错!", "操作演示", MessageBoxButtons.OK, MessageBoxIcon.Error);Console.WriteLine(ex.Message);}}//}//else//{// MessageBox.Show("用户名已存在,请选择其他用户名!", "结果提示", MessageBoxButtons.OK, rmation);// textBox2.Text = "";//}}private void btnExit_Click(object sender, EventArgs e){this.Close();}private void LV_SelectedIndexChanged(object sender, EventArgs e) {textBox2.Text = LV.FocusedItem.SubItems[1].Text.Trim();txtReaderName.Text = LV.FocusedItem.SubItems[2].Text.Trim();textBox3.Text = LV.FocusedItem.SubItems[3].Text.Trim();textBox1.Text = LV.FocusedItem.SubItems[4].Text.Trim();cboSex.Text = LV.FocusedItem.SubItems[5].Text.Trim();textBox4.Text = LV.FocusedItem.SubItems[6].Text.Trim();textBox5.Text = LV.FocusedItem.SubItems[7].Text.Trim();textBox6.Text = LV.FocusedItem.SubItems[8].Text.Trim();textBox7.Text = LV.FocusedItem.SubItems[9].Text.Trim();textBox8.Text = LV.FocusedItem.SubItems[10].Text.Trim();textBox9.Text = LV.FocusedItem.SubItems[11].Text.Trim();cboRole.Text = LV.FocusedItem.SubItems[12].Text.Trim();Sno = LV.FocusedItem.SubItems[1].Text.Trim();name = LV.FocusedItem.SubItems[2].Text.Trim();Pwd = LV.FocusedItem.SubItems[3].Text.Trim();Age = LV.FocusedItem.SubItems[4].Text.Trim();Sex = LV.FocusedItem.SubItems[5].Text.Trim();State = LV.FocusedItem.SubItems[6].Text.Trim();Adress = LV.FocusedItem.SubItems[7].Text.Trim();Number = LV.FocusedItem.SubItems[8].Text.Trim();Email = LV.FocusedItem.SubItems[9].Text.Trim();Grade = LV.FocusedItem.SubItems[10].Text.Trim();Class= LV.FocusedItem.SubItems[11].Text.Trim();Role = LV.FocusedItem.SubItems[12].Text.Trim();}private void btnReset_Click(object sender, EventArgs e){textBox2.Text = "";textBox3.Text = "";txtReaderName.Text = "";textBox1.Text = "";cboSex.Text = "";textBox4.Text = "";textBox5.Text = "";textBox6.Text = "";textBox7.Text = "";textBox8.Text = "";textBox9.Text = "";cboRole.Text = "";}private void btnAdd_Click(object sender, EventArgs e){string SQL="";if (textBox2.Text == "" || textBox3.Text == "" || txtReaderName.Text == "" || textBox4.Text == "" || textBox5.Text == ""){MessageBox.Show("请至少输入读者姓名,用户名,密码,借书状态和角色!");}else{string sql = "SELECT * from Reader WHERE rSno='" + textBox2.Text.Trim() + "' ";DataTable dt = clsGlobalVar.GetDataTable(sql);if (dt.Rows.Count == 0){if(cboRole.Text.Trim()=="教师")SQL = "INSERT INTO Reader(rSno,rPwd,rName,rAge,rSex,rState,rAdress,rNumber,rEmail,rGrade,rClass,rRole)VALUES ('" + textBox2.Text.Trim() + "','" + textBox3.Text.Trim() + "','" + txtReaderName.Text.Trim() + "','"+ textBox1.Text.Trim() + "','" + cboSex.Text.Trim() + "','" + textBox4.Text.Trim() + "','" + textBox5.Text.Trim() + "','" + textBox6.Text.Trim() + "','" + textBox7.Text.Trim() + "','" + "NULL"+ "','" + "NULL" + "','" + cboRole.Text.Trim() + "')";elseSQL = "INSERT INTO Reader(rSno,rPwd,rName,rAge,rSex,rState,rAdress,rNumber,rEmail,rGrade,rClass,rRole)VALUES ('" + textBox2.Text.Trim() + "','" + textBox3.Text.Trim() + "','" + txtReaderName.Text.Trim() + "','"+ textBox1.Text.Trim() + "','" + cboSex.Text.Trim() + "','" + textBox4.Text.Trim() + "','" + textBox5.Text.Trim() + "','" + textBox6.Text.Trim() + "','" + textBox7.Text.Trim() + "','" + textBox8.Text.Trim() + "','" + textBox9.Text.Trim() + "','" + cboRole.Text.Trim() + "')";if (clsGlobalVar.ExecSQL(SQL) == true){textBox2.Text = "";textBox3.Text = "";textBox1.Text = "";cboSex.Text = "";textBox4.Text = "";textBox5.Text = "";textBox6.Text = "";textBox7.Text = "";textBox8.Text = "";textBox9.Text = "";cboRole.Text = "";MessageBox.Show("成功添加此用户!");SelectStudent();}else{Exception ex = new Exception();MessageBox.Show(ex.Message.ToString());}}else{MessageBox.Show("用户名已存在,请选择其他用户名!", "结果提示", MessageBoxButtons.OK, rmation);textBox2.Text = "";}}}private void btnDel_Click(object sender, EventArgs e){if (textBox2.Text == ""){MessageBox.Show("请选择要删除的用户!");}else{DialogResult dt= MessageBox.Show("此操作不可撤销,确定要删除此用户信息吗?", " 提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);if (dt == DialogResult.Yes){string SQL = "DELETE FROM Reader where rSno='" + Sno + "'";if (clsGlobalVar.ExecSQL(SQL) == true){textBox2.Text = "";textBox3.Text = "";textBox1.Text = "";cboSex.Text = "";textBox4.Text = "";textBox5.Text = "";textBox6.Text = "";textBox7.Text = "";textBox8.Text = "";textBox9.Text = "";cboRole.Text = "";MessageBox.Show("删除此用户成功!");SelectStudent();}else{Exception ex = new Exception();MessageBox.Show(ex.Message.ToString());}}}}private void frmUpdateReader_Load(object sender, EventArgs e){SelectStudent();}}}8) 图书的查找及修改窗口using System;using System.Collections.Generic;using ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using prjTSGL.ClassLib.DBAccess;namespace prjTSGL.TSGL_UI{。