0% found this document useful (0 votes)
375 views

Library Management System: Latika Ahuja

ANSAL INSTITUTE of TECHNOLOGY, GURGAON Affiliated to GURU GOBIND SINGH INDRAPRASTHA UNIVERSITY MAY 2010. The project entitled LIBRARY MANAGEMENT SYSTEM: A Windows based Application Software was submitted to ANSAL INSTITUTE OF TECHNOLOGY as a part of summer training project. The matter embodied in this project is authentic and is genuine work done by the student.

Uploaded by

ashishthakuri
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
375 views

Library Management System: Latika Ahuja

ANSAL INSTITUTE of TECHNOLOGY, GURGAON Affiliated to GURU GOBIND SINGH INDRAPRASTHA UNIVERSITY MAY 2010. The project entitled LIBRARY MANAGEMENT SYSTEM: A Windows based Application Software was submitted to ANSAL INSTITUTE OF TECHNOLOGY as a part of summer training project. The matter embodied in this project is authentic and is genuine work done by the student.

Uploaded by

ashishthakuri
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 103

LIBRARY MANAGEMENT SYSTEM

A SUMMER TRAINING PROJECT REPORT Submitted By

LATIKA AHUJA
in partial fulfillment for the award of the degree of

BACHELOR OF TECHNOLOGY
IN COMPUTER SCIENCE ENGINEERING (CSE)

ANSAL INSTITUTE OF TECHNOLOGY, GURGAON

Affiliated to

GURU GOBIND SINGH INDRAPRASTHA UNIVERSITY


MAY 2010

ANSAL INSTITUTE OF TECHNOLOGY, GURGAON


Affiliated to

GURU GOBIND SINGH INDRAPRASTHA UNIVERSITY,DELHI

BONAFIDE CERTIFICATE
This is to certify that the project entitled LIBRARY MANAGEMENT SYSTEM: A Windows based Application Software submitted to Ansal Institute of Technology as a part of summer training Project is an original work carried out by Ms. LATIKA AHUJA enrolment no 0157012708 under my guidance .The matter embodied in this project is authentic and is genuine work done by the student.

Mr.Arun Chauhan SUPERVISOR


Appin Technology Lab
Sec 14,Gurgaon

ii

ACKNOWLEDGEMENT
I am extremely grateful and remain indebted to MR. ARUN CHAUHAN for being a source of inspiration and for his constant support in the Design, Implementation and Evaluation of the project. I am thankful to him for his constant constructive criticism and invaluable suggestions, which benefited me a lot while developing the project on LIBRARY MANAGEMENT SYSTEM. He has been a constant source of inspiration and motivation for hard work. He has been very co-operative throughout this project work. Through this column, it would be a utmost pleasure to express my warm thanks to him for his encouragement, co-operation and consent without which i mightnt be able to accomplish this project.

LATIKA AHUJA 0157012708 B TECH(CSE)

iii

ABOUT THE INSTITUTION

Appin Knowledge Solutions is a part of Appin Group of Companies and the premier provider of hi- technology certification, courseware as well as online, computer based and instructor led training across the world. Appin is primarily an IIT Alumni company. Appin has come up with the way of innovative learning concept using Computer Based Training Software (CBTS) in a highly interactive environment. Its mission is to provide current and comprehensive educational programs that enhance individual performance and corporate productivity in the higher-end technology with a knowledge based. They provide the most convenient and cost effective delivery of course content created by world experts in academia and industry.

iv

ABSTRACT
This project of LIBRARY MANAGEMENT of gives us the complete information about the library. Although this system has been implemented earlier also, but this project is a means to implement the knowledge gained . It is designed & developed for a receipt and issuance of books in the library .We can enter the record of new books and retrieve the details of books available in the library. We can issue the books to the students and maintain their records and can also check how many books are issued and stock available in the library. In this project we can maintain the late fine of students who returns the issued books after the due date.It also maintains the records of students,edit them timely.The records of users are also maintained so as to provide authentication. Throughout the project the focus has been on presenting information and comments in an easy and intelligible manner. The project is very useful for those who want to know about Library Management System. In the end, the setup is also made so that it can be easily installed and used. The requirement is Microsoft Visual Studio 2005 platform and Sql Express.

TABLE OF CONTENTS
SNO. TOPIC Acknowledgement About the Institution Abstract List of Tables List of Figures PAGE NO iii iv v vi vii

1. Introduction 1.1 What is MICROSOFT .NET? 1.2 .NET Architecture 1.3 .NET Framework 1.4 .NET Tools 1.5 Benefits of using .NET 1.6 Introduction to Visual Basic 1.7 Introduction to Ado.net 1.7.1 Goal 1.7.2 Architecture of ado.net 1.7.3 Accessing data through ado.net
2. Analysis Concepts and Principles

1 2 4 5 5 6 7

2.1 Process Model used 2.2 Problem Statement 2.3 Context Diagram 2.4 Entity Relationship Diagram

11 12 14 15

vi

2.5 Use case Diagram 2.6 Use case Description 2.6.1 Login 2.6.2 Issue Books 2.6.3 Return books 2.6.4 Query book 2.6.5 Maintain Books details 2.6.6 Maintain Students details 2.7 Software Requirement Specification 2.7.1 Introduction 2.7.1.1 2.7.1.2 2.7.1.3 2.7.1.4 2.7.1.5 2.7.2.1 2.7.2.2 2.7.2.3 2.7.2.4 2.7.2.5 2.7.3.1 Purpose Scope Definitions and Abbreviations References Overview Product Perspective Product Function User Characteristic Constraints Assumptions and Dependencies Tools/Platform used.

16 17

23

2.7.2 Overall Description

2.7.3 Specific Requirements

3. Implementation

3.1

Database Tables 3.2 Screenshots and Source code

29 34
vii

3.3 Creation of Setup 4. Testing and security 4.1 Meaning 4.2 Objectives 4.3 Levels of testing 4.3.1 Unit testing 4.3.2 Integration testing 4.3.3 System testing 4.3.4 Black testing 4.3.5 White testing 4.3.6 Static testing 4.3.7 Dynamic testing 4.4 Implementation of Security 5. Conclusion 5.1 Limitation of Project 5.2 Client of Project 6.References 7.Bibliography

78 85 85 86

89 91 92 92 93 94

viii

LIST OF TABLES

TABLE NO 1 2 3 4 5 6 7

CAPTION Minimum Hardware Requirements Books Details Login Details Users Details Students details Issue Books Return Books

PAGE NO 27 29 29 30 30 30 31

LIST OF FIGURES

ix

FIGURE NO 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

CAPTION Appin logo Dot net logo .Net Architecture Ado.net architecture Data adapter Process model Context Diagram Entity Relationship Diagram Use case Diagram Start Page Login Form(1) Login Form(2) Menu Change password(3) Change password(2) Change password(3) Student account Student Record updation Search form Search on the basis of bookname Search on the basis of Publisher Creation of new user User updations Issue details Issue form Addition of books Deletion of books Showing books details Updation of books Return Form Calculation of fine(if any) Creation of Setup(1) Creation of Setup(2) Creation of Setup(3) Creation of Setup(4) Creation of Setup(5) Creation of Setup(6)

PAGE NO iv 1 2 8 9 11 14 15 16 33 34 35 37 40 41 42 45 46 50 50 51 53 54 57 58 63 64 64 65 68 69 77 78 79 80 80 81
x

38 39

Creation of Setup(7) Final Setup

82 82

INTRODUCTION

Microsoft has a time honored reputation for creating innovative technologies; .NET framework is the latest example. .NET is actually a cluster of technologies-some revolutionary, some not-that are designed to help developers build a variety of different types of applications. Developers can use it to build rich Windows Applications, long running services and even command line tools.

1.1 WHAT IS MICROSOFT .NET?


Microsoft .NET is simply something you need on your Windows PC to run our software. Microsoft .NET (pronounced dot net) is a software component that runs on the Windows operating system. .NET provides tools
xi

and libraries that enable developers to create Windows software much faster and easier. .NET benefits end-users by providing applications of higher capability, quality and security. The .NET Framework must be installed on a users PC to run .NET applications. This is how Microsoft describes it: .NET is the Microsoft Web services strategy to connect information, people, systems, and devices through software. Integrated across the Microsoft platform, .NET technology provides the ability to quickly build, deploy, manage, and use connected, security-enhanced solutions with Web services. .NET-connected solutions enable businesses to integrate their systems more rapidly and in a more agile manner and help them realize the promise of information anytime, anywhere, on any device.

1.2 .NET ARCHITECTURE


Microsoft .NET consists of four major components:

Common Language Specification (CLS) blue in the diagram below Framework Class Library (FCL) red Common Language Runtime (CLR) green .NET Tools yellow

xii

Figure 3:.Net Architecture

At the base of the diagram in gray is the operating system, which technically can be any platform but typically is Microsoft Windows 2000 or greater, accessed through the Win32 API (Application Programming Interface).

Common Language Specification (CLS)


The CLS is a common platform that integrates code and components from multiple .NET programming languages. In other words, a .NET application can be written in multiple programming languages with no extra work by the developer (though converting code between languages can be tricky). .NET includes new object-oriented programming languages such as C#, Visual Basic .net, J# and Managed C++. These languages, plus other experimental languages like F#, all compile to Common Language Specification and can work together in the same application.

xiii

Framework Class Library (FCL)


The FCL is a collection of over 7000 classes and data types that enable .NET applications to read and write files, access databases, process XML, display a graphical user interface, draw graphics, use Web services, etc. The FCL wraps much of the massive, complex Win32 API into more simple ..NET objects that can be used by C# and other .NET programming languages.

Common Language Runtime (CLR)


The CLR is the execution engine for .NET applications and serves as the interface between .NET applications and the operating system. The CLR provides many services such as:

Loads and executes code Converts intermediate language to native machine code Separates processes and memory Manages memory and objects Enforces code and access security Handles exceptions Interfaces between managed code, COM objects, and DLLs Provides type-checking Provides code meta data (Reflection) Provides profiling, debugging, etc.

1.3 THE .NET FRAMEWORK


The technologies included in .NET framework are:

xiv

1) The .NET languages: These include Visual Basic, C#, Jscript .NET, J# and C++. 2) The Common Language Runtime (CLR): This is the engine that executes all .NET programs and provides automatic services for these applications, such as security checking, memory management and optimization. 3) The .NET Framework Class Library: The class library collects thousands of pieces of prebuilt functionality that you can snap in to your applications. These features are sometimes organized into technology sets, such as ADO.NET(technology for technology for creating database applications) and windows forms(the technology for creating desktop user interfaces). 4) ASP.NET: this is the engine that hosts the web applications you create with .NET, and supports almost any feature from the .NET class library.ASP.NET also includes a set of web specific services, like secure authentication and data storage.

5) Visual Studio: this optional development tool contains rich setoff productivity and debugging features

1.4 .NET Tools


Visual Studio .NET is Microsofts flagship tool for developing Windows software. Visual Studio provides an integrated development environment
xv

(IDE) for developers to create standalone Windows applications, interactive Web sites, Web applications, and Web services running on any platform that supports .NET.

1.5 BENEFITS OF .NET


.NET provides the best platform available today for delivering Windows software. .NET helps make software better, faster, cheaper, and more secure. .NET is not the only solution for developing Web softwareJava on Linux is a serious alternative. But on the Windows desktop, .NET rules. For developers, .NET provides an integrated set of tools for building Web software and services and Windows desktop applications. .NET supports multiple programming languages and Service Oriented Architectures (SOA). For companies, .NET provides a stable, scalable and secure environment for software development. .NET can lower costs by speeding development and connecting systems, increase sales by giving employees access to the tools and information they need, and connect your business to customers, suppliers and partners. For end-users, .NET results in software thats more reliable and secure and works on multiple devices including laptops, Smartphones and Pocket PCs.

1.6

VISUAL BASIC

Visual Basic is Graphical Rapid Application Development (RAD) tool that

xvi

aims at providing the user with a graphical interface that is intuitive and easy to use. Visual Basic is a popular programming tool that can be used to write any kind of visual application ranging from a game to a database management application. Now-a-days Visual basic is being widely used for developing different types of applications and performing various types of jobs. With Visual basic, one can automate everyday tasks, add custom required features and functions to suit ones need, and create applications, which makes task easier. A visual Basic programming environment provides all features that are required to develop a graphical user interface as ready to use components. The Visual Basic programming environment is also called Point and Click environment. The programmer does not have to write the code to create and display commonly required user-friendly features each time around. When the programmer needs a specific user interface feature such as a button, he selects the appropriate ready to use component provided by the Visual programming environment. These components can be moved, resized and renamed as required. So a Visual programming environment automates the process of creating the user interface by designing Visual interface using the ready to use components. In addition, it also provides the means of associating the user written logically defined code with the components used in a project. My project on Library Management deals with the transaction happenings in Library in an organization/institute. This project will be proved easier, as more of the tasks obtained are managed by a mouse click. The final reports and other facilities and calculations are calculated and updated automatically
xvii

1.7 ADO.NET
ADO.NET (ActiveX Data Objects .NET) is the primary data access API for the .NET Framework. It provides the classes that are used to develop database applications with Visual Basic .NET as well as other .NET languages.

1.7.1 GOAL
The goal of ADO.NET is to provide a bridge between the objects in ASP.NET and the backend database. It provides an object oriented view into the database, encapsulating many of the database properties and relationships within ADO.NET objects.

1.7.2 ADO.NET ARCHITECTURE An overview of the ADO.NET architecture is shown:

xviii

Figure 4:Ado.net architecture

THE DATASET CLASS The ADO.NET object model is rich, but at its heart, it is a fairly straightforward set of classes. The key class is the dataset, which is located in the System. Data namespace. The dataset represents a rich subset of the entire database, cached in session state or in memory, without a continuous connection to the database. The dataset consists of dataTable objects as well as Datarelation objects. These are accessed as the tables and relations properties, respectively, of the dataset object.

xix

Figure 5:Data adapter

THE DATAADAPTER OBJECT Rather than tie the dataset object too closely to the database architecture, ADO.NET uses a data adapter object to mediate between the dataset object and the database. This decouples the dataset from the database and allows a single dataset to represent more than one database or other data source. ASP.NET provides different versions of the dataadapter object. For example, there is one for use with SQL Server and other for use with OLE DB providers such as access. We connected to a SQL server database to increase the performance of application by using Sqldataadapter along with Sqlcommand and Sqlconnection.

xx

1.7.3 ACCESSING DATA USING ADO.NET


Data access using ADO.NET involves the following steps: Defining the connection string for the database server. Defining the connection to the database using sql connection string. Defining the command that contains the query. Defining the data adapter using the command string and the connection object. Creating a new Dataset object. If the command is SELECT, filling the dataset object with the result of query through data adapter. Reading the records from the datatables in the dataset using the datarow and datacolumn objects. If the command is DELETE,UPDATE or INSERT, then updating the dataset through the data adapter. Accepting to save the changes in the dataset to the database.

xxi

2.

ANALSIS CONCEPTS AND PRINCIPLES

2.1 PROCESS MODEL USED

In this project, the kind of life cycle model used is WATERFALL model. It is used when the requirements are somewhat known beforehand and they are stable. The phases that are implemented in the project are:

Requirement analysis

Design

Implementation and unit testing

Integration and system testing

Operation and Maintenance

The model was easy to understand and work upon as it reinforces the notion of define before design and design before code .It suggests a systematic,
xxii

sequential approach to software development that begins with customer specification of requirements and progresses through planning, modelling, construction and deployment, culminating in on-going support of the complete software. This model was quite appropriate for this project as time constraint was not there and the phases donot overlap.But some difficulties were to be overcome like it was difficult to define all the requirements at the beginning of the project. 2.2 PROBLEM STATEMENT

A software has to be developed for developing the library system of a college or a school. The system should be standalone in nature. It should be designed to provide functionalities as explained below: ISSUE OF BOOKS

(a) A student of any course should be able to get books issued. (b) A limitation is imposed on the number of books a student can be issued. (c) A maximum of 3 books per student can be issued. (d) The software developed takes the current system date as the date of issue and calculate the date of return (i.e. after 15 days). (e) Records are maintained for students and software users. (f) The due date for return is written on the book.

xxiii

RETURN OF BOOKS

(a) Any person can return the books on the basis of book no. (b) A fine of Rs. 5 is charged per day, if book is not returned on time. (c) The information is saved and the corresponding updations take place in the database. QUERY PROCESSING

The system should be able to provide information like: (i)Availability of a particular book. (ii)Availability of books of any author. (iii)Searching a book on the basis of publisher. The system should be able to generate reports regarding the details of the books available. It can also generate the details of users, students. Security provisions like the login authentication should be provided. Each user should have a user id and a password. Record of the users of the system should be kept in the log file. There should be a provision to change the passwords.

xxiv

2.3 CONTEXT DIAGRAM

Figure 7: Context Diagram

xxv

2.4 ENTITY RELATIONSHIP MODEL

Figure 8:Entity Relationship Model

xxvi

2.5 USE CASE DIAGRAM

Figure 9:Use Case Diagram

xxvii

2.6 USE CASE DESCRIPTION 2.6.1 LOGIN 2.6.1.1) Introduction: This use case documents the procedure for logging into the Library Management System based on user id and password. 2.6.1.2) Actors: Operator has the privilege to login. 2.6.1.3) Pre Condition: The system should be in powered on situation and the screen for login should be there. 2.6.1.4) Post Condition: If use case is successful, the user is logged into the system; otherwise the system state is unchanged. 2.6.1.5) Flow of events: Basic Flow: This use case starts when actor wishes to log in to the library

management System. The System requests that the actor enters his/her username and password. The actor enters username and password. The system validates the username and password.

xxviii

menu.

If the username and password matches, he/she will be logged in to the The use case ends. Alternate Flow: Invalid username or password:

If the system receives an invalid username or password, and error message is displayed and the use case ends. 2.6.2) ISSUE BOOKS 2.6.2.1) Introduction: This use case documents the procedure of issuing a book. 2.6.2.2) Actors: Operator has the privilege to issue books. 2.6.2.3) Pre Condition: The user/operator should be logged in and the form to enter issue details should be opened. 2.6.2.4) Post Condition: If use case is successful, the book is issued to the student in his/her account, otherwise the system state is unchanged. 2.6.2.5) Flow of events:

xxix

Basic Flow: The operator enter the book no and enrollment no The system automatically calculates the due date The book and student details are saved into the The use case ends. Alternate flow: not authorized. This may be possible that the student enroll_no is If the no of books already issued is 3, then error message is flashed as maximum of 3 books can be issued.

The use case starts when a student wants to get a book issued. of student while issuing the book. i.e. after 15 days. database.

2.6.3) RETURN BOOKS 2.6.3.1) Introduction: This use case documents the procedure for returning a book and calculating the fine amount if the student has returned the book after the specified return date. 2.6.3.2) Actors: Operator has the privilege to issue books. 2.6.3.3) Pre Condition:

xxx

The user/operator should be logged in to the system. 2.6.3.4) Post Condition: If use case is successful, the book is returnedback to the library and if needed, fine is calculated, otherwise the system state is unchanged. 2.6.3.5) Flow of events: Alternate flow: Late return of book Basic Flow: The operator enters the book no while returning The system takes the reurn date as the current date. The database entries corresponding to the student The use case ends. The use case starts when a student wants to return a book. and the corresponding enroll_no , issue date and due date is displayed.

account and book are updated.

If the book is returned after the due date,fine is calculated (Rs. 5 per day) and the database is updated accordingly. The use case ends here. 2.6.4) QUERY BOOK 2.6.4.1) Introduction: This use case documents the procedure for searching a book on the basis of Author name/Publisher name/Book name.

xxxi

2.6.4.2) Actors: Operator and the student can ask for querying a book. 2.6.4.3) Pre Condition: The user/operator should be logged in to the system. 2.6.4.4) Post Condition: If use case is successful, the book details are displayed. 2.6.4.5) Flow of events: Alternate flow: Basic Flow: The system displays the searched book. The use case ends. The use case starts when a student wants to search for a particular book.

Searched book may not be available. 2.6.5) MAINTAIN BOOKS DETAILS 2.6.5.1) Introduction: This use case documents the procedure for updating the books records by entering or removing specified books. 2.6.5.2) Actors: Operator maintains the book records.

xxxii

2.6.5.3) Pre Condition: The user/operator should be logged in to the system. 2.6.5.4) Post Condition: If use case is successful, the books details are entered or updated.. 2.6.5.5) Flow of events: Basic Flow: The use case starts when the operator wants to add, delete or modify some details in the library. database . 2.6.6) MAINTAIN STUDENT DETAILS 2.6.6.1) Introduction: This use case documents the procedure for storing the student details. 2.6.6.2) Actors: Operator maintains the students records. 2.6.6.3) Pre Condition: The user/operator should be logged in to the system. 2.6.6.4) Post Condition: The use case ends. The corresponding changes are saved into the

xxxiii

If use case is successful, the student details are entered or updated.. 2.6.6.5) Flow of events: Basic Flow: The use case starts when the operator wants to add, delete or modify some student details. database The use case ends. 2.7 SOFTWARE REQUIREMENT SPECIFICATION (SRS) 2.7.1) INTRODUCTION This document aims at defining the overall software requirements for Library Management System (LMS). The final product will be having only features/functionalities mentioned in this document and assumptions for any additional functionality/feature should not be made. 2.7.1.1) Purpose: This specification document describes the capabilities that will be provided by the software application LMS. It also states the various required constraints about which the system will abide. 2.7.1.2) Scope: The software product LMS will be used for computerizing the library system. This application will greatly simplify the possible queries by the The corresponding changes are saved into the

xxxiv

students for issuing books to a great extent. It will help the operator to a great extent for maintaining the library catalogs. 2.7.1.3) Definitions, Abbreviations and Acronyms: Operator- He is the person who maintains the library catalogs. Student- He comes to issue/return books and for some library queries. LMS- Library Management System. 2.7.1.4) References: IEEE recommended practice for Software Requirements SpecificationsIEEE STD 830-1993. 2.7.1.5) Overview: The rest of this SRS document describes the various system requirements, interfaces, features, product perspectives and other functionalities in detail. 2.7.2) OVERALL DESCRIPTION LMS is the windows based application developed to provide an aid for books queries and for maintaining library records. The operator will find the software developed easy to use and provides a user friendly interface.
2.7.2.1)

Product Perspective:
xxxv

The product developed will help in searching the books available in the library .It will help the students for answering their queries for the availability of the book. Books issued ,returned records are maintained in the database(SQL).At any time, details of books can be updated . 2.7.2.2) Product function: Forms are developed while keeping in mind the usage of Library. The functions that this application will perform are: Login. Maintaining Students Records Maintaining operators Records. Maintaining Books records. Searching. Issue/return Books. Calculating fine to be paid. Changing the password. Generating reports. The functionalities are tested by the developer. 2.7.2.3) User Characteristics: The system is interactive and extremely user friendly. The intended users are: Operator- Who logins the library management system and maintains the catalogs.
xxxvi

2.7.2.4) Constraints: The application provides the authorized access to the specific user only .He provides correct username and password and then only accesses the system. The Student can only ask for the information. The modification task access is bound to the authorized members only. The DBMS system may become slow due to excessive use. 2.7.2.5) Assumptions and dependencies: The data entered is not changed unless specific need is there. It is assumed that operator has understood the usage of software. 2.7.3) SPECIFIC REQUIREMENTS

This section contains the software requirements to a level of detail, sufficient to enable designers to design the system and testers to test that system. 2.7.3.1)Tools/ Platforms, language to be used Since major activities of the project are to store data and generate reports based on stored data, we need following software and Hardware for the project.

xxxvii

Software Requirement: Following type of software is required for the project A good RDBMS with distributed computing support. A good user-friendly user interface with good report generation capability. This project is based upon client/server Model in which Visual Basic.Net is used as Front End Tools (Menu) or client side application and SQL as Back End Tools or Server side application, which is a hardware platform in which it handles its request and interfaces to a database. Basic purpose of this project is to use the database with different location for different users. So client /Server model is best to choose. Selection of RDBMS Product in market Product Selected Product in Market Product selected Selection of O/S UNIX, LINUX, Windows NT Product Selected : Windows 2000/XP : ORACLE, SYBASE, SQL Server, etc : SQL Server : Developer 2002, Visual Basic.Net etc. : Visual Basic .Net(C#)

Selection of User Interface

The specification of Hardware & Software used for the development and maintenance of the system are as follows. The software also supports other

xxxviii

compatible systems: Minimum Hardware Requirement: Following are the minimum requirement to run the current project. It can also run higher configuration. CPU Intel or compatible Pentium 450 Mhz but Ms recommended Pentium III with 733 MHz for maximum Memory (RAM) Hard Disk Monitor Pointing Device performance. 128 MB but 256 MB is recommended Available Hard disk space is 3GB 800X600, 256 colors (recommended: High Color 16bit) Microsoft Mouse or compatible

Note1: Additional memory may be required, depending on operating system requirements. Note2: Actual requirements will vary bases on the system configuration where it is implemented and the application and feature required to install Visual Basic .Net and Sql Server.

xxxix

IMPLEMENTATION
3.1) DATABASE TABLES
Table 1 :Books Details

BOOKS DETAILS book_no varchar(10) ISBN varchar(20) Subject varchar(20) book_name varchar(30) author varchar(30) publisher varchar(30) edition varchar(5)

Table 2:Login Details

username password

LOGIN DETAILS varchar(20) varchar(10)

xl

Table 3:User details

name address contactno username password

USERS DETAILS varchar(20) varchar(30) varchar(10) varchar(20) varchar(10)

Table 4:Students Details

STUDENTS DETAILS enrol_no varchar(10) stud_name varchar(30) branch varchar(10)


Table 5:Issue Details

ISSUE BOOKS enrol_no varchar(10) no_of_copies Int book_no varchar(10) issue_date varchar(10) issue_mon varchar(10) issue_year varchar(10) due_date varchar(10) due_mon varchar(10)

xli

due_year

varchar(10)

Table 6:Return Details

book_no enrol_no issue_date issue_mon issue_year due_date due_mon due_year return_date return_mon return_year fine

RETURN BOOKS varchar(10) varchar(10) varchar(10) varchar(10) varchar(10) varchar(10) varchar(10) varchar(10) varchar(10) varchar(10) varchar(10) int

xlii

xliii

Figure 10:Start Page

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace library { public partial class start : Form { public start() { InitializeComponent(); } private void label2_Click(object sender, EventArgs e) xliv

{ login l = new login(); l.Show(); this.Hide(); } private void label3_Click(object sender, EventArgs e) { this.Close(); } } }

Figure 11: Login Form(1)

xlv

Figure 12:Login Form(2)

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data .SqlClient ; namespace library { public partial class login : Form { public login() { InitializeComponent(); } private void login_Load(object sender, EventArgs e) { DateTime date = new DateTime(); date = DateTime.Today; xlvi

string s = date.ToString(); label4.Text = s; } private void button3_Click(object sender, EventArgs e) { SqlConnection connect = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand com = new SqlCommand("insert into loginvalues('"+textBox1.Text+"','"+textBox2 .Text +"')", connect); connect.Open(); if (com.ExecuteNonQuery() > 0) { MessageBox.Show("user details saved"); } } private void button2_Click(object sender, EventArgs e) { this.Close(); } private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("please enter your user name"); textBox1.Focus(); } else if (textBox2.Text == "") { MessageBox.Show("enter the password!!"); } else { SqlConnection connect = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlDataAdapter data = new SqlDataAdapter("select * from newuser where username='" + textBox1.Text + "'and password='" + textBox2.Text + "'",

xlvii

connect); DataSet ds = new DataSet(); data.Fill(ds); if (ds.Tables[0].Rows.Count > 0) { Menu m = new Menu(); m.Show(); this.Hide(); } else { MessageBox.Show("Check Your Id or Password"); textBox2.Text = ""; textBox2.Focus(); } } } } }

Figure 13:Menu

xlviii

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace library { public partial class Menu : Form { public Menu() { InitializeComponent(); } private void studentAccountToolStripMenuItem_Click(object sender, EventArgs e) { Stu_Acunt fm = new Stu_Acunt(); fm.MdiParent = this; fm.Show(); } private void booksIssueToolStripMenuItem_Click(object sender, EventArgs e) { issue i = new issue(); i.MdiParent = this; i.Show(); } private void bookReturnToolStripMenuItem_Click(object sender, EventArgs e) { return1 r = new return1(); r.MdiParent = this; r.Show(); } private void createUserToolStripMenuItem_Click(object sender, EventArgs e) { createuser cs = new createuser(); cs.MdiParent = this; cs.Show(); } private void searchToolStripMenuItem_Click(object sender, EventArgs e)

xlix

{ searchnew s = new searchnew(); s.MdiParent = this; s.Show(); } private void passwordToolStripMenuItem_Click(object sender, EventArgs e) { change r = new change (); r.MdiParent = this; r.Show(); } private void addBooksToolStripMenuItem_Click(object sender, EventArgs e) { enter r = new enter (); r.MdiParent = this; r.Show(); } } }

Figure 14: Change password(1)

li

Figure 15:Change Password(2)

lii

Figure 16:Change Password(3)

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace library { public partial class change : Form { public change() { InitializeComponent(); }

liii

private void button1_Click(object sender, EventArgs e) { if (textBox2.Text == textBox3.Text) { SqlConnection conct = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand co = new SqlCommand("update newuser set password='" + textBox2.Text + "'", conct); conct.Open(); if (co.ExecuteNonQuery() > 0) { MessageBox.Show("password changed"); } } else MessageBox.Show("Confirmed password doesnot match!!"); } private void button2_Click(object sender, EventArgs e) { this.Close(); } private void textBox1_Leave(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("Please enter the old password"); textBox1.Focus(); } } private void textBox2_Leave(object sender, EventArgs e) { if (textBox2.Text == "") { MessageBox.Show("Please enter the new password"); textBox2.Focus(); } }

liv

private void textBox3_Leave(object sender, EventArgs e) { if (textBox3.Text == "") { MessageBox.Show("Again enter the new password"); textBox3.Focus(); } } private void button7_Click(object sender, EventArgs e) { Menu m = new Menu(); m.Show(); } } }

lv

Figure 17:Student account

lvi

Figure 18:Student Record updation

using System; using System.Collections.Generic; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Data.SqlClient; using System.Windows.Forms; namespace library { public partial class Stu_Acunt : Form { lvii

public Stu_Acunt() { InitializeComponent(); } private void button5_Click(object sender, EventArgs e) { this.Close(); } private void button2_Click(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand com = new SqlCommand("delete student where enrol_no='"+ comboBox1 .Text+ "'", sa); sa.Open(); if (com.ExecuteNonQuery() > 0) { MessageBox.Show("data Deleted successfully"); } } private void button4_Click(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand s = new SqlCommand("update student set stud_name='"+textBox2 .Text +"',branch='" + textBox3.Text + "' where enrol_no='" +comboBox1 .Text +"'", sa); sa.Open(); if (s.ExecuteNonQuery() > 0) { MessageBox.Show("data updated"); } } private void Stu_Acunt_Load(object sender, EventArgs e) { button3.Visible = false; SqlConnection sa = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlDataAdapter data = new SqlDataAdapter("select enrol_no from student", sa); DataSet ds = new DataSet(); data.Fill(ds); comboBox1.DataSource = ds.Tables[0];

lviii

comboBox1.ValueMember = "enrol_no"; comboBox1.Text = "-select"; textBox2.Text = ""; textBox3.Text = ""; } private void button1_Click_1(object sender, EventArgs e) { comboBox1.Visible = false; textBox1.Visible = true; textBox2.Text =""; textBox3.Text =""; textBox1.Focus(); button3.Visible =true ; } private void comboBox1_SelectedIndexChanged_1(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlDataAdapter data = new SqlDataAdapter("Select stud_name,branch from student where enrol_no='" + comboBox1.Text.ToString() + "'", sa); DataSet ds = new DataSet(); data.Fill(ds); if (ds.Tables[0].Rows.Count > 0) { textBox2.Text = ds.Tables[0].Rows[0][0].ToString(); textBox3.Text = ds.Tables[0].Rows[0][1].ToString(); } } private void textBox3_Leave(object sender, EventArgs e) { button3.Visible = true; } private void button3_Click(object sender, EventArgs e) { SqlConnection conct = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand co = new SqlCommand("insert into student values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "')", conct); conct.Open(); SqlConnection conc = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial

lix

Catalog=library;Integrated Security=True"); SqlCommand com = new SqlCommand("insert into IssuedCopies values('" + textBox1.Text + "',0)", conc); conc.Open(); if (com.ExecuteNonQuery() > 0) { MessageBox.Show("student entry done"); } } private void button6_Click(object sender, EventArgs e) { textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; } private void button7_Click(object sender, EventArgs e) { Menu m = new Menu(); m.Show(); } } }

lx

Figure 19:Search form

Figure 20:Search on the basis of bookname

lxi

Figure 21:Search on the basis of Publisher

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace library { public partial class searchnew : Form { public searchnew() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated lxii

Security=True"); string temp = ""; string query="Select * from books_details where "; if(textBox1 .Text!="") { if (temp == "") temp = ("book_name='" + textBox1.Text + "'"); else temp = temp +(" and " + " book_name='" + textBox1.Text + "'"); } if (textBox2.Text != "") { if (temp == "") temp = ("author='" + textBox2.Text + "'"); else temp += (" and " + " author='" + textBox2.Text + "'"); } if (textBox3.Text != "") { if (temp == "") temp = ("publisher='" + textBox3.Text + "'"); else temp += (" and " + " publisher='" + textBox3.Text + "'"); } query = query + temp; SqlDataAdapter data = new SqlDataAdapter(""+query+"" , con); DataSet ds = new DataSet(); data.Fill(ds); dataGridView1.DataSource = ds.Tables[0]; } private void button3_Click(object sender, EventArgs e) { textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; }

lxiii

private void button2_Click(object sender, EventArgs e) { this.Close(); } private void button7_Click(object sender, EventArgs e) { Menu m = new Menu(); m.Show(); } } } }

Figure 22:Creation of new user

lxiv

Figure 23:User updation

using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace library { public partial class createuser : Form { public createuser() { InitializeComponent(); }

lxv

private void button1_Click(object sender, EventArgs e) { SqlConnection conct = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand co = new SqlCommand("insert into newuser values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "')", conct); conct.Open(); if (co.ExecuteNonQuery() > 0) { MessageBox.Show(" New user created"); } } private void button3_Click(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand s = new SqlCommand("update newuser set address ='" + textBox2.Text + "',contactno='" + textBox3.Text + "',username='" + textBox4.Text + "' where name='"+textBox1 .Text +"'",sa); sa.Open(); if (s.ExecuteNonQuery() > 0) { MessageBox.Show(" Record updated"); } } private void button2_Click(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand com = new SqlCommand("delete newuser where name='" + textBox1.Text + "'", sa); sa.Open(); if (com.ExecuteNonQuery() > 0) { MessageBox.Show("Deleted successfully"); } } private void button4_Click(object sender, EventArgs e)

lxvi

{ Menu m = new Menu(); m.Show(); } private void button7_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlDataAdapter data = new SqlDataAdapter("select address,contactno,username from newuser where name='"+textBox1 .Text +"'", con); DataSet ds = new DataSet(); data.Fill(ds); if (ds.Tables[0].Rows.Count > 0) { textBox2.Text = ds.Tables[0].Rows[0][0].ToString(); textBox3.Text = ds.Tables[0].Rows[0][1].ToString(); textBox4.Text = ds.Tables[0].Rows[0][2].ToString(); textBox5.Enabled = false; } } private void button5_Click(object sender, EventArgs e) { textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4 .Text=""; textBox5.Text = ""; } private void button6_Click(object sender, EventArgs e) { this.Close(); } private void createuser_Load(object sender, EventArgs e) { textBox4.Enabled = false; textBox5.Enabled = false; } } }

lxvii

Figure 24:Issue details

lxviii

Figure 25:Issue form

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace library { public partial class issue : Form { public issue() { InitializeComponent(); } private void comboBox3_SelectedIndexChanged(object sender, EventArgs e) {

lxix

int date1 = Convert.ToInt32(comboBox1.Text); string month1 = comboBox2.Text; int year1 = Convert.ToInt32(comboBox3.Text); int date_return = date1 + 15; if (comboBox2.Text == "feb") { if (date_return > 28) { month1 = "mar"; date_return -= 28; } } if (comboBox2.Text == "apr") { if (date_return > 30) { month1 = "may"; date_return -= 30; } } if (comboBox2.Text == "jun") { if (date_return > 30) { month1 = "jul"; date_return -= 30; } } if (comboBox2.Text == "nov") { if (date_return > 30) { month1 = "dec"; ; date_return -= 30; } } if (comboBox2.Text == "sep") { if (date_return > 30) {

lxx

month1 = "oct" ; date_return -= 30; } } if (comboBox2.Text == "jan") { if (date_return > 31) { month1 = "feb"; date_return -= 31; } } if (comboBox2.Text == "mar") { if (date_return > 31) { month1 = "apr" ; date_return -= 31; } } if (comboBox2.Text == "may") { if (date_return > 31) { month1 = "jun"; date_return -= 31; } } if (comboBox2.Text == "jul") { if (date_return > 31) {

lxxi

month1 ="aug"; date_return -= 31; } } if (comboBox2.Text == "aug") { if (date_return > 31) { month1 = "sep"; date_return -= 31; } } if (comboBox2.Text == "oct") { if (date_return > 31) { month1 = "nov"; date_return -= 31; } } if (comboBox2.Text == "dec") { if (date_return > 31) { month1 = "jan"; date_return -= 31; year1++; } } comboBox4.Text = date_return.ToString(); comboBox5.Text = month1; comboBox6.Text = year1.ToString(); }

lxxii

private void textBox2_Leave(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlDataAdapter data = new SqlDataAdapter("select issuedNo from IssuedCopies where enrol_no='"+textBox2.Text+"'", sa); DataSet ds = new DataSet(); data.Fill(ds); textBox3.Text = ds.Tables[0].Rows[0][0].ToString(); if (textBox3.Text == "3") { button1.Visible = false; MessageBox.Show("No more books can be issued"); } } private void button1_Click(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand data = new SqlCommand("insert into issue1 values('" + textBox2.Text + "','" + textBox3.Text + "','" + textBox1.Text + "','" + comboBox1.Text + "','" + comboBox2.Text + "','" + comboBox3.Text + "','" + comboBox4.Text + "','" + comboBox5.Text + "','" + comboBox6.Text + "')", sa); sa.Open(); data.ExecuteNonQuery(); string a=Convert.ToString(Convert.ToInt16(textBox3.Text)+1); SqlConnection s = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand data1 = new SqlCommand("update IssuedCopies set issuedNo=" +a+ " where enrol_no='"+textBox2.Text+"'", s); s.Open(); if (data1.ExecuteNonQuery() > 0) { MessageBox.Show("saved"); } } private void button2_Click(object sender, EventArgs e) {

lxxiii

button1.Visible = true; textBox3.Text = ""; textBox2.Text = ""; textBox1.Text = ""; } private void button3_Click(object sender, EventArgs e) { this.Close(); } private void button7_Click(object sender, EventArgs e) { Menu m = new Menu(); m.Show(); } } }

Figure 26:Addition of books

lxxiv

Figure 27:Deletion of books

Figure 28:Showing books details

lxxv

Figure 29: Updation of books

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; using System.Configuration; namespace library { public partial class enter : Form { public enter() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "" || textBox5.Text == "" || textBox6.Text == "" || textBox7.Text == "")

lxxvi

{ MessageBox.Show("Please enter all fields"); } else { SqlConnection conct = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand co = new SqlCommand("insert into books_details values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + textBox6.Text + "','" + textBox7.Text + "')", conct); conct.Open(); if (co.ExecuteNonQuery() > 0) { MessageBox.Show("Books details Added"); } } } private void button2_Click(object sender, EventArgs e) { this.Close(); } private void button3_Click(object sender, EventArgs e) { textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; textBox5.Text = ""; textBox6.Text = ""; textBox7.Text = ""; } private void button5_Click(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand com = new SqlCommand("delete books_details where book_no='" + textBox1.Text + "'", sa); sa.Open(); if (com.ExecuteNonQuery() > 0) {

lxxvii

MessageBox.Show("Deleted successfully"); } } private void button4_Click(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand s = new SqlCommand("update books_details set ISBN='" + textBox2.Text + "',Subject='" + textBox3.Text + "',book_name='" + textBox4.Text + "',author='"+textBox5 .Text +"',publisher='"+textBox6 .Text +"',edition='"+textBox7 .Text +"' where book_no='" + textBox1.Text + "'", sa); sa.Open(); if (s.ExecuteNonQuery() > 0) { MessageBox.Show(" Record updated"); } } private void button6_Click(object sender, EventArgs e) { SqlConnection connect = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlDataAdapter da = new SqlDataAdapter("select * from books_details", connect); DataSet ds = new DataSet(); da.Fill(ds); dataGridView1.DataSource = ds.Tables[0]; } private void dataGridView1_DoubleClick(object sender, EventArgs e) { SqlConnection c = new SqlConnection("Data Source=CHAUHAN\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlDataAdapter s = new SqlDataAdapter("select * from books_details where book_no='" + dataGridView1.CurrentRow.Cells[0].Value.ToString() + "'", c); DataSet ds = new DataSet(); dataGridView1.CurrentRow.Cells[0].Value.ToString(); s.Fill(ds); textBox1.Text = ds.Tables[0].Rows[0][0].ToString(); textBox2.Text = ds.Tables[0].Rows[0][1].ToString(); textBox3.Text = ds.Tables[0].Rows[0][2].ToString();

lxxviii

textBox4.Text = ds.Tables[0].Rows[0][3].ToString(); textBox5.Text = ds.Tables[0].Rows[0][4].ToString(); textBox6.Text = ds.Tables[0].Rows[0][5].ToString(); textBox7.Text = ds.Tables[0].Rows[0][6].ToString(); } } }

Figure 30:Return Form

lxxix

Figure 31:Calculation of fine(if any)

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace library { public partial class return1 : Form { public return1() { InitializeComponent(); } lxxx

private void comboBox3_SelectedIndexChanged(object sender, EventArgs e) { int date1 = Convert.ToInt32(comboBox1.Text); string month1 = comboBox2.Text; int year1 = Convert.ToInt32(comboBox3.Text); int date_return = date1 + 15; if (comboBox2.Text == "feb") { if (date_return > 28) { month1 = "mar"; date_return -= 28; } } if (comboBox2.Text == "apr") { if (date_return > 30) { month1 = "may"; date_return -= 30; } } if (comboBox2.Text == "jun") { if (date_return > 30) { month1 = "jul"; date_return -= 30; } } if (comboBox2.Text == "nov") { if (date_return > 30) { month1 = "dec"; ; date_return -= 30; } } if (comboBox2.Text == "sep") { if (date_return > 30)

lxxxi

{ month1 = "oct" ; date_return -= 30; } } if (comboBox2.Text == "jan") { if (date_return > 31) { month1 = "feb"; date_return -= 31; } } if (comboBox2.Text == "mar") { if (date_return > 31) { month1 = "apr" ; date_return -= 31; } } if (comboBox2.Text == "may") { if (date_return > 31) { month1 = "jun"; date_return -= 31; } } if (comboBox2.Text == "jul") { if (date_return > 31) { month1 ="aug"; date_return -= 31; } }

lxxxii

if (comboBox2.Text == "aug") { if (date_return > 31) { month1 = "sep"; date_return -= 31; } } if (comboBox2.Text == "oct") { if (date_return > 31) { month1 = "nov"; date_return -= 31; } } if (comboBox2.Text == "dec") { if (date_return > 31) { month1 = "jan"; date_return -= 31; year1++; } } comboBox4.Text = date_return.ToString(); comboBox5.Text = month1; comboBox6.Text = year1.ToString(); } public int month_int(string t,string m) { string temp=""; if(m=="2") { temp=comboBox2.Text; } if (m == "5") { temp = comboBox5.Text; }

lxxxiii

int mo=0; if (temp == "jan") { mo = 1; } if (temp == "feb") { mo = 2; } if (temp == "mar") { mo = 3; } if (temp == "apr") { mo = 4; } if (temp == "may") { mo = 5; } if (temp == "jun") { mo = 6; } if (temp == "jul") { mo = 7; } if (temp == "aug") { mo = 8; } if (temp == "sep") { mo = 9; } if (temp == "oct") { mo = 10; } if (temp == "nov") { mo = 11; }

lxxxiv

if (temp == "dec") { mo = 12; } return mo; } private void textBox4_Click(object sender, EventArgs e) { int com8=0; int com5=0; if (comboBox8.Text != "") { string s="2"; com8 = month_int(comboBox8.Text, s); } if (comboBox5.Text != "") { string s="5"; com5 = month_int(comboBox5.Text, s); } int d = Convert.ToInt32(comboBox9.Text) - Convert.ToInt32(comboBox4.Text); int m = com8 - com5; int y = Convert.ToInt32(comboBox7.Text) - Convert.ToInt32(comboBox6.Text); if (m > 0) { m = m * 30; } else m = -(m * 30); if (d < 0) { d = -d; } int total = (y * 360) + m + d; textBox4.Text = Convert.ToString(total * 5); } private void textBox1_Leave(object sender, EventArgs e) { SqlConnection s = new SqlConnection("Data

lxxxv

Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlDataAdapter data = new SqlDataAdapter("select enrol_no,issue_date,issue_mon,issue_year,due_date,due_mon,due_year from issue1 where book_no='"+textBox1.Text+"'", s); DataSet ds = new DataSet(); data.Fill(ds); textBox2.Text = ds.Tables[0].Rows[0][0].ToString(); comboBox1.Text = ds.Tables[0].Rows[0][1].ToString(); comboBox2.Text = ds.Tables[0].Rows[0][2].ToString(); comboBox3.Text = ds.Tables[0].Rows[0][3].ToString(); comboBox4.Text = ds.Tables[0].Rows[0][4].ToString(); comboBox5.Text = ds.Tables[0].Rows[0][5].ToString(); comboBox6.Text = ds.Tables[0].Rows[0][6].ToString(); } private void button1_Click(object sender, EventArgs e) { textBox1.Text =""; textBox2.Text = ""; textBox4.Text =""; comboBox1.Text = ""; comboBox2.Text =""; comboBox3.Text = ""; comboBox4.Text = ""; comboBox5.Text = ""; comboBox6.Text =""; comboBox7.Text =""; comboBox8.Text =""; comboBox9.Text =""; } private void button7_Click(object sender, EventArgs e) { this.Close(); } private void button12_Click(object sender, EventArgs e) { SqlConnection sa = new SqlConnection("Data Source=chauhan\\SQLEXPRESS;Initial Catalog=library;Integrated Security=True"); SqlCommand data = new SqlCommand("insert into returndet values('" + textBox1.Text + "','" + textBox2.Text + "','" +comboBox1.Text + "','" + comboBox2.Text + "','" + comboBox3.Text + "','" + comboBox4.Text + "','" + comboBox5.Text + "','" + comboBox6.Text + "','" + comboBox9.Text +

lxxxvi

"','"+comboBox8 .Text +"','"+comboBox7 .Text +"','"+textBox4 .Text +"')", sa); sa.Open(); if (data.ExecuteNonQuery() > 0) { MessageBox.Show("saved"); } } } }

lxxxvii

3.3) CREATION OF SETUP


Following steps are to be followed to create the setup. Go to File. Click on New. Select Project.

Figure 32:Creation of setup(1)

lxxxviii

Figure 33:Creation of Setup(2)

lxxxix

Figure 34:Creation of Setup(3)

Right click on lib Click on add. Select project output.

xc

Figure 35:Creation of Setup(4)

Figure 36:Creation of Setup(5)

xci

Click on Project. Select setup2 properties.

Figure 37:Creation of Setup(6)

Click on prerequisites.

xcii

Figure 38:Creation of Setup(7)

Click on ok and then apply it. Go to build, then select bulid solution. Select build setuup2. Go to my documents. Open visual studio 2005. Open library,then setup2 and then debug

Figure 39:final setup

In this way, setup of the windows application is created.

xciii

TESTING
4.1) MEANING Testing is the process of detecting errors. Testing performs a very critical role for quality assurance and for ensuring the reliability of the software. The results of testing are used later on during maintenance also. Testing is vital to the success of the system. It is integral part of any systems development life cycle without which the system developed is sure to fail and result in loss of economic and manpower investments besides users dissatisfaction and downfall of reputation. 4.2) TESTING OBJECTIVES: The main objective of testing is to uncover a host of errors, systematically and with minimum effort and time. Stating formally, we can say, Testing is a process of executing a program with the intent of A successful test is one that uncovers an as yet undiscovered error. A good test case is one that has a high probability of finding error, The tests are inadequate to detect possibly present errors. The software more or less confirms to the quality and reliable

finding an error.

if it exists.

standards.

xciv

4.3) LEVELS OF TESTING In order to uncover the errors present in different phases, we have the concept of levels of testing. 4.3.1) UNIT TESTING Unit testing focuses verification effort on the smallest unit of software i.e. the module. Using the detailed design and the process specifications, testing is done to uncover errors within the boundary of the module. All modules must be successful in the unit test before the start of the integration testing begins. In this project each service can be thought of a module. There are so many modules like Login, Searching, Maintaining records etc. Each module has been tested by giving different sets of inputs. When developing the module as well as finishing the development, the module works without any error. 4.3.2) INTEGRATIN TESTING After unit testing, we have to perform integration testing. The goal here is to see if modules can be integrated properly, the emphasis being on testing interfaces between modules. This testing activity can be considered as testing the design and hence the emphasis on testing module interactions. In this project the main system is formed by integrating all the modules. When integrating all the modules I have checked whether the integration effects working of any of the services by giving different combinations of inputs with which the two services run perfectly before Integration.
xcv

4.3.3) SYSTEM TESTING Here the entire software system is tested. The reference document for this process is the requirements document, and the goal is to see if software meets its requirements. Here entire LMS has been tested against requirements of project and it is checked whether all requirements of project have been satisfied or not. 4.3.4) BLACK BOX TESTING In Black-Box Testing the tester only knows what the software is supposed to do-he cant see how it operates. If he types in a certain input, he gets a certain output. He doesnt know how or why it happens, just that it dose. Means run a test, give input and verify its output and if any bug or unexpected result you have faced, and ask developer to review its related code. 4.3.5) WHITE-BOX TESTING While in white-Box testing the software tester has access to the programs code and can examine it for clues to help him with his testing he scan see inside the box. Thus we can say that in white-box testing the tester has knowledge about the software that what and how the things are going on inside the system. Thus he can debug that the certain error is coming from which part of the software. 4.3.6) STATIC TESTING
xcvi

Static testing refers to testing something thats not running, means just examining and reviewing it without running it. It is just related to reviewing of concerned code. 4.3.7) DYNAMIC TESTING While the dynamic testing refers to the process that would normally think of as testing running and using the software. In this project, the exceptions produced and the general errors in the coding which were not detectable at programming time are checked. The test cases are based to test the behavior in a specific condition. They are formed generally to test each and every part of the code i.e. each statement is executed at least once when testing the software. The first step is to test the application for the new modules added. They are checked weather is working according to the requirement specifications or not. Only after rigorous testing, the module is the next phase. The second phase consists of negative testing. I played with the application and just try to produce an exception. Still the software application should be good enough to handle all the activities of the user and still behave properly. This is a real test of the application from this phase, which passes from this phase, is then sent to the next and the final phase of the testing.
xcvii

The modules are then modified accordingly and then added to the main copy of the application and are named the latest copy of the application.Thus each of the module/methods added to the original application undergo rigorous testing before being actually added to the main project.

4.4) IMPLEMENTATION OF SECURITY There are two dimensions for the protection of data in the database. First, a certain class of data is available only to those persons who are authorized to access it. This ensures hat the confidently of the data is maintain. Second, the data must be protected from accidental or intentional corruption or destruction. In addition to the economic or strategic reasons for protecting data from unauthorized access, corruption, or destruction, there is a privacy dimension for data security and integrity. There are legal restrictions that data can only be used for the purpose for which it is collected. Following are the terms used in system security measures.

Privacy: The ethical and legal rights that individuals have with regard to control over the dissemination and use of their personal information.

xcviii

Database Security: Protection of the information contained in the database against unauthorized access, modification, or destruction.

Database integrity: The mechanism that is applied to ensure that the data in the database is correct and consistent. The term semantic integrity is sometimes use to refer to the need for maintaining database consistency in the presence of user modifications. Semantic integrity is maintained either implicitly or explicitly specified by appropriate constraints on the data that can be entered by the user, and this data is checked by the DBMS. Entity and referential integrity constraints are implicit in the relational data model.

Authorization: The culmination of administrative policies of the organization, expressed as a set of rules that can be used to determine which user has what type of access to which portion of the database. Persons who are in charge of specifying the authorization of different portions of the database are called security administrators or authorizers.

xcix

CONCLUSION
The LIBRARY MANAGEMENT SYSTEM process has been made computerized to reduce human errors and to increase the efficiency. The main focus of this project is to lessen human efforts. The maintenance of the records is made efficient, as all the records are stored in the ACCESS database, through which data can be retrieved easily. The navigation control is provided in all the forms to navigate through the large amount of records. If the numbers of records are very large then user has to just type in the search string and user gets the results immediately. The editing is also made simpler. The user has to just type in the required field and press the update button to update the desired field.

The Books and Students are given a particular unique id no., so that they can be accessed correctly and without errors. Our main aim of the project is to get the correct information about a particular student and books available in the library.

It is expected that this project will go a long way in satisfying users requirements. The computerization of the Library Management will not only improves the efficiency but will also reduce human stress thereby indirectly improving human recourses.

5.1) LIMITATION OF THE PROJECT To succeed in the long run, planning with a vision as well as adaptability to change is necessary. First and for most, I would like the point out that when a whole state is the subject under consideration, there are many aspects related to it. The vastness of the subject was in itself a limitation for me. Keeping in mind that my project had to be completed within six weeks, it was difficult initially to collect and compile data related and then to arrange it according. Lastly, it can only said to err is human. The vastness of the subject could have been limited only by any inefficiency on my part.

5.2) CLIENT OF THE PROJECT

This is conceptual modeled Project. It has not being developed for any Client. But in case anybody can implement it by just installing the setup.

ci

REFERENCES

1. 2. 3. 4. 5. 6.

www.microsoft.com www.123eng.com www.minfosystems.com www.sourcecodeonline.com www.dotnetspider.com www.knowdotnet.com

cii

BIBLIOGRAPHY
1.

Christian Nagel et al, Beginning Visual C# Wrox , September 2001.

Christian Nagel et al Data-Centric .NET Programming- Wrox, December 2001. 2. Mark Schmidt, Microsoft Visual C# .NET 2005 Developers cookbook. 3. Roger S. Pressman , Software Engineering-fifth edition.

ciii

You might also like