C# book management system [including source code + database]

table of Contents

1. System analysis

1.1 Analysis of basic requirements function points

1.2 Analysis of system operating conditions

2. System design

2.1 System function module design

2.2 Administrator function module

2.3 Common user function module

3. Database design

4. Page display

5. Source code


1. System analysis

1.1 Analysis of basic requirements function points

The main goal of the book borrowing management system is to simplify the existing manual management, through scientific computer management of the book borrowing management, improve work efficiency, and realize daily management information and paperless.

1) System users are mainly divided into two categories: a. Administrator user category (equivalent to a super user with various operation permissions) b. Ordinary user category. The system chooses to log in to different pages for subsequent operations according to different identities on the login page.

2) The main functions of administrator users: a. Management functions: user management, book management (book category management, book information management), reader management (reader category management, reader information management), borrowing record management, system management (logout, Exit); b. Statistics function: statistics of the most popular book categories, statistics of the most popular books, statistics of active readers, statistics of untrustworthy readers.

3) The main functions of ordinary users: a. Management function: book borrowing management (borrowing books, returning books), password modification, system management (logout, exit); b. Query function: querying readers’ borrowing status, querying book borrowing status.

4) System performance: adapt to the actual library management needs, timely update of information, efficient and accurate data query, and improve the management efficiency of staff.

5) System input: user name, user password, various information of books, various information of readers, etc.

1.2 Analysis of system operating conditions

This software system requires at least one computer as a server, and requires that the computer is equipped with Microsoft Visual Studio and SQL Server. The detailed system requirements are as follows:

·Windows XP or Windows 7 and above

·Microsoft Visual Studio 2005 and above

·SQL Server 2008 or higher version database server.

2. System design

2.1 System function module design

The design of the system includes two aspects: system function module design and database design. This article will introduce the overall module design and database design of the system. The specific function modules will introduce the main interface of administrator operation, book borrowing function, book return function and borrowing record Delete function. The overall module diagram of this system is given below:

2.2 Administrator function module

The specific function of this module is to query and manage information such as ordinary users, book information, reader information and book borrowing conditions, including system management, user management, book management, reader management, data statistics and data management.

1. User management module: Under this module, the administrator user mainly adds, deletes and resets the password of ordinary users.

2. Book management module: This module contains two sub-modules: book category management and book information management. Book category management includes adding book categories, modifying book categories and querying book categories; book information management includes adding book information, modifying book information, querying book information, and disposing of scrapped books.

3. Reader management module: This module contains two sub-modules: reader category management and reader information management. Reader category management includes adding reader categories and checking and modifying reader categories; reader information management includes adding reader information, viewing reader information, checking and modifying reader information, and deleting reader information.

4. Data statistics module: This module mainly counts the readers' borrowing situation within a period of time, including statistics on the most popular book categories, statistics on the most popular books, statistics on active readers, and statistics on untrustworthy readers.

Data management module: This module is for the administrator to delete the readers' borrowing status (returned books) for a period of time.

System Management: This module includes logout and exit.

The overall design of the administrator module is as follows:

2.3 Common user function module

The specific function of this module is to query and manage readers' book borrowing, book borrowing status, personal password and other information, including system management, book borrowing, borrowing status query and password modification and other functions.

1. Book borrowing module: This module contains two functions: book borrowing and returning books.

2. Borrowing situation inquiry module: This module contains two functions: readers' borrowing situation inquiry and book borrowing situation inquiry.

3. Password modification module: This module is generally used to modify users to modify ordinary user passwords.

4. System Management: This module includes logout and exit.

The overall design of the common user module is as follows:

3. Database design

According to demand analysis, a basic book borrowing management system database roughly includes 6 tables: user information table ( Manager ), book category table ( BookCategory ), book information table ( BookList ), reader category table ( ReaderCategory ), reader information table ( Reader ), borrowing information table ( BookLendList ). The data information of the corresponding sub-function modules are stored separately, and the tables are related to each other, and the data is operated in a unified manner. The ER diagram of the database design of this system is given below :

create database Library 
go
use Library

--管理员表
create table Manager
(
	managerid char(20) primary key,--账号
	managerPassword char(12) not null,--密码
	mIdentity bit not null default 1,--身份(管理员-1、工作人员-0)
)

--图书类别表
create table BookCategory
(
	bCategoryid int primary key,--图书类别编号
	bCategoryname nchar(16) not null,--图书类别名称
)

--图书信息表
create table BookList
(
	ISBN char(25) primary key,--ISBN
	BookName nchar(30) not null, --书名
	bCategoryid int not null foreign key references BookCategory,--图书类别编号
	author nchar(20) not null, --第一作者
	publisher nchar(30) not null,--第一出版社
	publishTime int not null, --出版年份
	bookstate bit not null default 1, --状态(正常-1,报废-0)
	num int not null, --库存数目
	lendnum int not null, --借出数目 
	price float not null --单价
)

--读者类别
create table ReaderCategory
(
	Rcategoryid int not null primary key, --读者类别编号 
	Rcategoryname nchar(10) not null, --读者类别名称 
	Rbnum int not null, --可借书数目
	Rday int not null --可借书天数
)

--读者信息表
create table Reader
(
	Rid char(19) primary key, --身份证号
	Rname nchar(10) not null, --姓名
	Rcategoryid int not null foreign key references ReaderCategory, --类别(学生,教师等)
	Phone char(11), --电话
	RbLnum int not null, --已借书数目
)

--借书记录明细
create table BookLendList
(
	Rid char(19) not null foreign key references Reader, --读者身份证号
	ISBN char(25) not null foreign key references BookList,--ISBN
	LendTime datetime not null Default getdate(), --借书时间
	BackTime datetime not null Default getdate(), --还书时间
	money float not null, --超期扣款
	isback bit not null, --是否已还书 
	renew bit not null--是否续借
)

4. Page display

       

      

 

5. Source code

Project source code and database code, see cloud disk link:

[If this post has helped you, fingertips, point a praise chant, Cheng Xie ~]

Link: https://pan.baidu.com/s/1vLQdKXXPTquNTT_t71Dg-A 
Extraction code: 4kut

[Note]: Some configurations in the code need to be filled in according to your actual situation. For example: Line 30 in the Login.cs file, (string connstring = "Data Source = .;Initial Catalog = Library;User ID= sa;Pwd=123456";), database related information needs to be set by yourself, other files are similar. I use SQL Server authentication. If you use Windows authentication, please find a solution by yourself (very simple implementation).

Guess you like

Origin blog.csdn.net/Aibiabcheng/article/details/106482492