You are on page 1of 59

ACKNOWLEDGEMENTS

The experience that we have gathered during the project has been unique and overwhelming. For this we are pleased to express our deepest sense gratitude and regards to our respected project guide Mr. Pranay Roy for providing us with resources as and when required and allowing us to pursue the project in C#.net and ASP.net technology as front end (Database). In spite of his busy schedules, his frequent valuable advice and master suggestions at every stage lead to a systematic approach in completing this project without which this project work could not take its shape. We are thankful to Microsoft, Ulead for developing software like Microsoft.net Framework, Microsoft SQL Server, Microsoft Office and Ulead GIF Animator 4 for providing us with a platform to develop this software quite easily and comfortably. We believe that the honor of thanks should also be given to WBUT (West Bengal University of Technology) for introducing the concept of project work in our syllabus without which the idea of doing it wouldnt have come to our mind. We are also thankful to Google for providing some suggestions. Last but not the least we would like to thank the reader for bearing with us. We would be grateful to them if they forgive us for our mistakes and help us to rectify them by filling up the provided feedback form. Thanking you. and SQL Server as backend

Page 1 of 59

Certificate of Originality

To Whom It May Concern

This is to certify that the Project Report entitled BOOKSHOP MANAGEMENT, submitted to SILIGURI INSTITUTE OF TECHNOLOGY, in partial fulfillment of the requirement for MINOR PROJECT, is an original work carried out byNAME COLLEGE SANJEEV KUMAR SIT ,SILIGURI SAROWAR KUMAR
SIT,SILIGURI

UNIVERSITY ROLL NO 08119001049 08119001036 08119001069 08119001038 Under the guidance of PRANAY ROY.

SATISH SINGH
SIT,SILIGURI

TOUSIF AHMAD
SIT,SILIGURI

The matter in this project is a genuine work done by the student and has not been submitted elsewhere of any course of study.

PRANAY ROY TECHNOLOGY

SILIGURI INSTITUTE OF

Page 2 of 59

Industrial Seal and Signature

INDEX
Contents
1. 2. 3. 4. 5. 6. 7. Introduction 5 Objectives Project Description 7 Project Category Project Scope 9 Data Dictionary Table Structure Feasibility Study
Technical Feasibility Operational Feasibility Economical Feasibility Cost Saving Benefits Improved Saving Level Benefits Social Feasibility Management Feasibility Time Feasibility Legal Feasibility

Page No.

10-11 12-13 12 12 12 12 13 13 13 13 13

Page 3 of 59

8.

System Analysis & Design 14-16


Identification of the Need Preliminary Investigation Analyst Working on Preliminary Investigation Conducting Interviews

14 15 16 16

9.

Cost Analysis 17-18


Software & Hardware Costs Personnel Costs Cost Estimation Using COCOMO Model

17 18

10.

Software & Hardware Requirement Specification 19-25


Hardware Specification (Server Side) Software Specification (Server Side)

19

20
About Software

22 22 23 23 23 24 24 25 25 25

Microsoft Visual Studio Operating System Windows Server 2003 & Server 2000

C# Features History of C# SQL SQL Database Structure

Connected Database Architecture System Disconnected Database Architecture System

11. 12. 13.

System Architecture 26 Entity Relationship Diagram (ERD) 27-28 Data Flow Diagram (DFD) 29-32

Page 4 of 59

Level 0 Data Flow Diagram Level 1 DFD of Admin Level 1 DFD of User

30 31 32

14. 15. 16.

Screenshots 33-35 System Coding Testing


Introduction Unit Testing Integration Testing

36-46 47-49 47 48 49

17. 18. 19.

Limitation of the Project 50 Future Scopes 51 Bibliography 52

INTRODUCTION

First, let us narrate our thinking about the project, which we are going to propose. BOOKSHOP MANAGEMENT means ADMINISTRATOR can update book stock and can see the book sales part.

Page 5 of 59

The GOALS of BOOK SHOP MANAGEMENT are-- BOOK Shop Management store and sales details. Customer can order more than one book through this product. Administrator can update stock . It comprises from registering of new user to the validation of

existing user.

Page 6 of 59

OBJECTIVES

We have the following objectives in our mind:


To provide the best security using the right security policies and

correct technologies. To make myself aware of the various dangers that may occur due to lack of security when we use the website in the entire internet. To make myself aware of the online inventory system. To learn the latest technologies provided by Microsoft in the form of .net. To make myself familiar with the professional tools like Visual Studio 2008, .net, Microsoft word, Microsoft Power Point, Ulead GIF animator 4 etc. To author a real life software.

Page 7 of 59

PROJECT DESCRIPTION

(a) USER SIGNUP: New user can do registration here. (b) USER LOGIN: Existing user can login here. (c) ADMIN LOGIN: Administrator can log in here.

USER LOGIN
1. UPDATE TABLE: User can update table. 2. ORDER: User can choose product and can create order. 3. VIEW PRODUCT: User can choose product and view detail

description of books.
4. VIEW ORDER: User can view the order of its own.

ADMIN LOGIN:
1. UPDATE TABLE: Administrator can see the details of BO0K

TABLE, can block the user depends on the situation. And can modify his user name, password.
2. VIEW ORDER: Administrator can choose the any user nd can see

their order.
3. VIEW PRODUCT: Administrator can entry product, modifies it,

and can delete it. Administrator can also see the status of product (sale status).

Page 8 of 59

PROJECT CATEGORY

This proposed software would be a window application. The computer GUI will be designed with proper care. The GUI Tool which we use in the front end is ASP.net. At the back end we are using SQL server. The language used is C#. The IDE used is Visual Studio 2008. Therefore, we will be using overall C#.net concept in my project.

Page 9 of 59

PROJECT SCOPE

SCOPE:
The scope of the BOOK SHOP MANAGEMENT facilitates us in the following jobs:
Fulfilling Customer orders. Maintaining books stocks. Maintaining book category details.

DATA DICTIONARY
A data dictionary is a "centralized repository of information about data such as meaning, relationships to other data, origin, usage, and format." The term may have one of several closely related meanings pertaining to databases and database management systems (DBMS):
A document describing a database or collection of databases An integral component of a DBMS that is required to determine its

structure
A piece of middleware that extends or supplants the native data

dictionary of a DBMS

Page 10 of 59

Table Structure

User table

Book Database

Billing

Page 11 of 59

Page 12 of 59

FEASIBILITY STUDY
Feasibility study: It is necessary to evaluate the feasibility of a project otherwise months or years, & thousands or millions of dollars can be lost if a bad system is developed. Technical Feasibility: BOOK SHOP Management System can be shown by any retailers at any specified time to the customers using services. In case of the customer does not know the exact amount of the plan, the system will show for specified amount of plans in the screen. Operational Feasibility: Our application will take information of customer and notify the retailer. It is an efficient way to collect sensitive/confidential information in a cost-effective manner. The application depends on the information provided by the retailer or bookshop, so it doesn't require any major changes in database structure and skills of the staff. Economical Feasibility: It judges the ultimate income or benefits derived from the developed product against the development cost. This product is economically feasible because the development cost is feasible according to the revenue/benefits generated after the implementation of the messaging system. Cost Saving Benefits: The main objective of this product is to provide the retailer with the instant information in the most efficient and economical way. The services used for the database maintenance, customer record are far more efficient & economical as compared to conventional book shop departments. Thus it helps in reducing the overall costs.

Page 13 of 59

Improved Service Level Benefits: This software helps in improving the service level. Our project used to create database & collect customer information, which are highly reliable, instant, and cost-effective. Social Feasibility: The objective of our project is to provide secured database or correct information at right time. Its social feasibility is very high with only constraints that user should equip himself with new technology of MRDB which are now available at low cost. Management Feasibility: The management is always interested in the system that can provide more efficiency at a lower cost. Our system is made for organizations that constantly want to keep the retailers updated with the transaction results. Time Feasibility: Will the project's time to market beat the competition? Legal Feasibility: Legal feasibility is the determination of any infringement, violation, or the liability that could result from the development of the system. The Online BookShop Data Base system is the integration and customization of the services like collecting customer information, providers plan & secure database.

Page 14 of 59

SYSTEM ANALYSIS & DESIGN


System analysis is the process of gathering and interpreting facts, diagnosing problems and using the informations to recommend improvement to the system. Analysis is a detailed study of the various operations performed by a system and their relationship within and outside of the system. One aspect of analysis is defining the boundaries of the system and determining whether or not a candidate system should consider other related systems. To make the project, we have done system analysis to find out the users needs. Analysis includes finding out how the system works and what it does. It also finds out in detailed manner the problems area of a system and what users are required from the changed or from the new system. During analysis data are collected from the same types of database in the internet. BOOK SHOP MANAGEMENT is a Windows based general purpose one and it has to satisfy the needs of variety of BOOK SELLERS. For this satisfaction we have interviewed many shop owners to know about retailers preferences. To gather the important facts we have visited some community web site.

Identification of the Need


The first step in the system development is the identification of the need. This is a users request to change, improve or enhance an existing system. Because there is likely to be a stream of such request, standard procedures must be established to deal with them. The success of the system depends largely on

Page 15 of 59

how accurately a problem is defined, thoroughly investigated and properly carried out through the choice of solution. Our project Book Shop Management System is a C#.Net

Windows based project and its users ranges from middle class shop owner to rich one and young people as well as older one, to satisfy vast user demand we have find out the retailer need and the problems have to faced in near future. To cater this immense need for storage, retrieval and processing of important records the system needs to be robust and flexible. The data base will have a big number of users and thus the software has to add or change many of its features to meet user demand in daily basis. Thus the maintenance and continues information feeding is a huge work and have to be dealt properly. The basic ground of this project is to provide a user friendly environment to its users and also provide a way to make strong database. The main objective and inspiration for this project is to provide a check out competitive digital animation the environment place for users do their where at they can provider and choices and an extremely

work. The GUI based

application software is very simple, useful and attractive to all level of users and its easily understandable to solve problems. All the programs and the peripherals are very user friendly and well documented. It is very economic to minimize the recurring cost. This project is mainly an effort to continuously shape the Indian software revolution by building the largest and the number one offline profitable software in the country. We will try to do so in experience the in future by offering the best consumer an environment driven by high performance,

constant innovation, teamwork.

Preliminary Investigation

Page 16 of 59

The Preliminary

Investigation is the first phase of system of a brief survey of the areas

development and consists

involved and will result in taking the project in the next phase. It is a way of handling the needs for identification of the system. The objective is to determine whether the request database software is valid and feasible before a recommendation is reached to do nothing, improve or modify the existing system or build a new one. The purpose of the preliminary investing is to evaluate project requests.

Analyst working on the preliminary should accomplish the following objects


Project size determination.

investigation

Finding out cost and benefit of alternative approach. Clarify and understand the project request. Determination of technical and operational feasibility.

Conducting Interviews
Analyst uses interviews to learn how the system operate and they may allow a decision to be made about the merit of a system proposal, nor do they present user views about current operation. Analyst uses interviews to learn these details. Our project Book Shop Data Base contains a search feature, for this we asked many students to find their areas of interest and heads of educational institutions, Counselors and faculties to gather all - important facts of carrier building. We have also

Page 17 of 59

gathered important facts of vacancy from agencies and companies. We have visited multiple shopping places and markets to know about user preferences.

Page 18 of 59

COST ANALYSIS

Software And Hardware Costs

For the development of this project, user is not spending any money. As this is an academic project, thus the budget for the project is Zero but not Zero. We used SQL for our project Book Shop Data Base which doesnt incur any additional cost as the user already has this application. Also there is no hardware cost as for the development of the system no hardware is required.

Personnel Costs
For the development team of the project, personnel costs are the number of hours spent by the team members. Personnel Costs are basically the efforts by the team members in term members in terms of hours spent. Number of Team Members: 4 Average number of Hours spent by each Team Member Per Weeks: 28 Hours Total Time for this project is: 1 week Therefore, the total number of man hours spent by the development Team = 4* 28 * 1 = 152

For client, the personnel cost is the time by any client representative with the development team during the development phase and the time spent for the maintenance once the system has been deployed at users software. The system

Page 19 of 59

administrator will be responsible for the maintenance of the System.

Cost Estimation using COCOMO MODEL


The basic COCOMO MODEL gives an approximate estimation of the project parameters. The basic COCOMO MODEL is given by: Effort = a1 * ( KLOC ) ^ a2 PM Tdev = b1 * ( KLOC ) ^ b2 months Where KLOC is the estimated size of the software product expressed in Kilo Lines of Code. a1, a2, b1, b2 are constant for each category of software product. Tdev is the estimated time to develop the software, expressed in person-month (PM). According to COCOMO model there are three types of Software project.
COCOMO model

Organic

SemiDetached

Embedded

We can consider our project as of Organic category as the projects deals with developing a well-understood application program, the size of our development team is considerably small.

Page 20 of 59

Estimated KLOC = 13.17 Now, for Organic Project a1 = 2.40 a2 = 1.05 b1 = 2.50 b2 = 0.38 Effort = 2.4 * ( 13.17 ) ^ 1.05 PM = 35.95 PM Tdev = 2.5 * ( 35.95 ) ^ 0.38 months = 9.75 months

Page 21 of 59

Software and Hardware Requirement Specification


Every engineered and manufactured product must be specified in some fashion. As a product becomes more complicated it will require more detailed specification. Online BookShop Data Base which is a windows based application needs to be configured in a proper manner. The database configurations must be properly worked out. It is the database that will have to ultimately scale up as and when the number of users starts increasing. This section is the introduction of the environment to the system where the system runs. There are two types of interactions, firstly at the time of design phase and secondly at the time of running the system. Following are the required specifications:

Hardware Specifications (Server Side)

The decision to acquire computer hardware or software must be handled in the same way as any other business decision. The variety of size and types of computing resources available puts a burden on the analyst who must select suitable hardware, software or services and advise the top management accordingly. There are various important factors, which should be considered prior to system selection. They are: Define system business. capabilities that make sense for the

Specify the magnitude of the problem; that is, clearly

whether selection entail a few Peripherals or a major decision concerning the main frame. Accept the competence of the in-house staff.

Page 22 of 59

Hardware and software should be considered as a package. Develop a time frame for the selection process. Provide user indoctrination.

As per the hardware requirement of our system we recommended the following to develop the web application: Processor : Video recommended Mouse device RAM HDD : : 1GB DDR RAM 160GB : intel core 2 duo : 1024 X 768, 32 bit true colors Mouse or compatible

Microsoft

Software Specification (Server Side)


The IEEE standards recognize the fact that the different projects may require their requirements to be arranged differently, that is, there is no one method that is suitable for all projects. Software selection is a critical aspect of system development. There two ways of acquiring software: custom-made or off-theshell package. Today, there is a great demand for packages because they are quite cheap. There are other benefits also. A good package can get the system running quickly. MIS personal are released for other projects.

Page 23 of 59

Home-grown software can take more time and its cost cannot be predicted. Package can be tested before purchasing it. It can be observed that price alone cannot determine the quality of software. A systematic review is crucial for selecting the desired software. Prior to selecting the software, the project team must set up criteria for selection. The criteria for software selection are:
Reliability: gives consistent results without any failure for a

specified time period.


Functionality: functions to standards. Capacity: satisfies volume requirements of the user. Flexibility: adapts to the changing needs. Usability: is user-friendly. Security: maintains integrity and prevents unauthorized user. Performance: delivers the results as expected. Serviceability: has good documentation and vendor support. Ownership: has right to modify and share use to database

package.
Minimal cost: is justified and affordable for intended application.

As per the software requirement to my system I recommend the following to develop the web application:

Operating system Framework Application Software :

: :

Windows 2003 Server .Net 3.5

Microsoft Visual Studio 2008

Page 24 of 59

Programming language Database 2008) Technology Web Server :

C#

SQL (In-Built with Visual Studio : : ASP.NET IIS 6.0

About Software:
Microsoft Visual Studio
In computing, Microsoft Visual Studio is an Integrated

Development Environment (IDE) from Microsoft. It can be used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all platforms supported by Microsoft Windows, Windows Mobile, Windows CE, .NET Framework, .NET Compact Framework and Microsoft Silverlight. Visual Studio includes a code editor supporting IntelliSense as well as code refactoring. The integrated debugger works both as a sourcelevel debugger and a machine-level debugger. Other built-in tools include a forms designer for building GUI applications, web designer, class designer, and database schema designer. It accepts plug-ins that enhance the functionality at almost every levelincluding adding support for source-control systems (like Subversion and Visual SourceSafe) and adding new toolsets like editors and visual designers for domain-specific languages or toolsets for other aspects

Page 25 of 59

of the software development lifecycle (like the Team Foundation Server client: Team Explorer). Visual Studio supports different programming languages by means of language services, which allow the code editor and debugger to support (to varying degrees) nearly any programming language, provided a language-specific service exists. Built-in languages include C/C++ (via Visual C++), VB.NET (via Visual Basic .NET), C# (via Visual C#), and F# (as of Visual Studio 2010). Support for other languages such as M, Python, and Ruby among others is available via language services installed separately. It also supports XML/XSLT, HTML/XHTML, JavaScript and CSS. Individual languagespecific versions of Visual Studio also exist which provide more limited language services to the user: Microsoft Visual Basic, Visual J#, Visual C#, and Visual C++. Microsoft provides "Express" editions of its Visual Studio 2010 components Visual Basic, Visual C#, Visual C++, and Visual Web Developer at no cost. Visual Studio 2010, 2008 and 2005 Professional Editions, along with language-specific versions (Visual Basic, C++, C#, J#) of Visual Studio 2005 are available for free to students as downloads via Microsoft's Dream Spark program. As of 2010[update] Visual Studio 2010 is in Release to Manufacturing and its 90 days trial version can be downloaded by the general public at no cost.

Operating System Windows Server 2003

In our windows based application we are using Microsoft Visual Studio 2008 as an Application Software that comes with Windows 2003. Windows Vista and Windows XP are the most widely known operating system for personal computers and, also the most flexible one to operate, so there is no reason to go for others. So we have used Windows XP as the operating system to make our application flexible.

C#

Page 26 of 59

C# (pronounced "see sharp") is a multi-paradigm programming language encompassing imperative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed by Microsoft within the .NET initiative and later approved as a standard by Ecma (ECMA-334) and ISO (ISO/IEC 23270). C# is one of the programming languages designed for the Common Language Infrastructure. C# is intended to be a simple, modern, general-purpose, objectoriented programming language. Its development team is led by Anders Hejlsberg. The most recent version is C# 4.0, which was released in April 12, 2010.

Features:
By design, C# is the programming language that most directly reflects the underlying Common Language Infrastructure (CLI). Most of its intrinsic types correspond to value-types implemented by the CLI framework. However, the language specification does not state the code generation requirements of the compiler: that is, it does not state that a C# compiler must target a Common Language Runtime, or generate Common Intermediate Language (CIL), or generate any other specific format. Theoretically, a C# compiler could generate machine code like traditional compilers of C++ or FORTRAN.

Page 27 of 59

History of C#
During the development of the .NET Framework, the class libraries were originally written using a managed code compiler system called Simple Managed C (SMC).In January 1999, Anders Hejlsberg formed a team to build a new language at the time called Cool, which stood for "C-like Object Oriented Language". Microsoft had considered keeping the name "Cool" as the final name of the language, but chose not to do so for trademark reasons. By the time the .NET project was publicly announced at the July 2000 Professional Developers Conference, the language had been renamed C#, and the class libraries and ASP.NET runtime had been ported to C#. C#'s principal designer and lead architect at Microsoft is Anders Hejlsberg, who was previously involved with the design of Turbo Pascal, Embarcadero Delphi (formerly Code Gear Delphi and Borland Delphi), and Visual J++. In interviews and technical papers he has stated that flaws in most major programming languages (e.g. C++, Java, Delphi, and Smalltalk) drove the fundamentals of the Common Language Runtime (CLR), which, in turn, drove the design of the C# programming language itself. James Gosling, who created the Java programming language in 1994, and Bill Joy, a co-founder of Sun Microsystems, the proprietor of Java, called C# an "imitation" of Java; Gosling further claimed that "[C# is] sort of Java with reliability, productivity and security deleted." Klaus Kreft and Angelika Langer (authors of a C++ streams book) stated in a blog post that "Java and C# are almost identical programming languages. Boring repetition that lacks innovation," "Hardly anybody will claim that Java or C# are revolutionary programming languages that changed the way we write programs," and "C# borrowed a lot from Java - and vice versa. Now that C# supports boxing and unboxing, we'll have a very similar feature in Java." Anders Hejlsberg has argued that C# is "not a Java clone" and is "much closer to C++" in its design.

SQL

Page 28 of 59

SQL (pronounced ess-cue-el), often referred to as Structured Query Language, is a database computer language designed for managing data in relational database management systems (RDBMS), and originally based upon relational algebra. Its scope includes data query and update, schema creation and modification, and data access control. SQL was one of the first languages for Edgar F. Codd's relational model in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks" and became the most widely used language for relational databases.

SQL Database structure:

Connected Database Architecture System

Data Provider DataReader).

(It

Includes

Connection,

DataCommand,

Network traffic is high, poor in Performance. Data is up to date 'Join' can be used to relate two tables Forward only, and Read Only Handle single table at a time Not persisted

Disconnected Database Architecture System

Data Set, Data Adapter Network traffic is low, good in Performance Data is not up to date Data Relations (a Class) can be used to relate two tables

Page 29 of 59

Scrollable Handle multiple tables at a time Persisted

System Architecture

.Net Platform Using MS Visual Studio 2008

User

Application Software

Online BookSho p Data Base

Desktop

System Architecture diagram

Page 30 of 59

In the above diagram, User request for the offline communication through the desktop, installed in the user machine. The request is forward to the application software DB through the system. The application is already deployed on desktop. The application software is responsible for handling the user request, maps it to the system which processes the request and replies back to the user. In order to process the user request, application software may consult the database and update the database as required.

Page 31 of 59

Entity Relationship Diagram (ERD)


Entity - Relationship Diagram is a pictorial or graphical representation of Database.

Some Pictorial Notations

Page 32 of 59

Strong Entity Set

Weak Entity Set

Relationship

Identifying Relationship

Simple Attribute Multi-valued Attribute Composite Attribute

Page 33 of 59

Page 34 of 59

DATA FLOW DIAGRAM (DFD)


Demacro & Jane (1978) and Sarcon (1979) introduced Data Flow Diagram (DFD) and it is important to system analysis. DFDs are very useful to understanding a system and it can effectively used for partitions during analysis. A DFD shows the flow of data through a system. The system may be an organization, a manual procedure, a software system, mechanical systems, a hardware system, or any condition of this. A DFD shows the movement of data through the different entire

transactions or Process in the systems, As the first

step, an

system can be depicted by one DFD, which gives a system overview, it is called context diagram. Data Flow Diagram (DFD) is a way of expressing system requirements in a Graphical form. A known as bubble chart and requirements identifying major transformations DFD that also will has the purpose of clarifying system

become programs in system design.

Data Flow Diagram ( DFD) symbols

Page 35 of 59

Square represents source or destination of system data also called an External entity. Arrow represents the data flow.

Circle or Bubble represents a process that transforms data from one form to another form. An Open Rectangle is a Data Store. Data Store is a place where data is held temporarily.

This represents the data Storage.

Page 36 of 59

1. 2.

LOG IN 1. REGISTER

AD

LEVEL 0 DATA FLOW DIAGRAM

1. ADD PRODUCT

2. BUY PRODUCTS

Page 37 of 59

ADMINISTRATOR

uid.pwd

0.1 LOG IN
uid.pwd USER Data Store

Category Product id Product details

1.2 Add Product

Product Details

Category Product id Product_Details Product_id Product_id Product Database

1.3 View Product


Product Details

LEVEL 1 DFD of ADMIN

Page 38 of 59

SCREENSHOTS

HOME PAGE

Page 39 of 59

LOGIN PAGE

ADMIN

Page 40 of 59

BILLING

Page 41 of 59

SYSTEM CODING
HOME PAGE
using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Linq; System.Text; System.Windows.Forms;

namespace homepage { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void HomePage_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { Form2 f2 = new Form2(); f2.Show(); this.Hide(); } private void button2_Click(object sender, EventArgs e) { Application.Exit(); }

} }

Page 42 of 59

LOGINPAGE

using using using using using using using using using

System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Linq; System.Text; System.Windows.Forms; System.Data.SqlClient;

namespace homepage { public partial class Form2 : Form { public Form2() { InitializeComponent(); } private void Form2_Load(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { Form1 f1 = new Form1(); f1.Show(); this.Hide(); } private void button1_Click(object sender, EventArgs e) { int flag=0; SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\book shop project\home page\Database1.mdf;Integrated Security=True;User Instance=True"); con.Open(); SqlCommand cmd = new SqlCommand("select * from usertable ", con); SqlDataReader dr = cmd.ExecuteReader(); while(dr.Read()) { if((textBox1.Text==dr[0].ToString()) && (textBox2.Text == dr[1].ToString())) { flag=1; break; } else {

Page 43 of 59

flag = 0; } } if (flag == 1) { Form3 f3 = new Form3(); f3.Show(); this.Hide(); } else { MessageBox.Show(" invalid userid or password"); } con.Close(); textBox1.Clear(); textBox2.Clear(); textBox1.Focus(); } private void button3_Click(object sender, EventArgs e) { Form8 f8 = new Form8(); f8.Show(); this.Hide(); } } }

Page 44 of 59

ADMIN PAGE

using using using using using using using using using

System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Linq; System.Text; System.Windows.Forms; System.Data.SqlClient;

namespace homepage { public partial class Form7 : Form { string flag; SqlConnection con; public Form7() { InitializeComponent(); con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\book shop project\home page\Database1.mdf;Integrated Security=True;User Instance=True"); } private void button2_Click(object sender, EventArgs e) { Form3 f3 = new Form3(); f3.Show(); this.Hide(); } private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox4.Text == "" || textBox5.Text == "" || textBox1.Text == "") { MessageBox.Show("any field can not be left blank"); } else { if (flag == "SCIENCE") { con.Open();

Page 45 of 59

SqlCommand cmd = new SqlCommand("insert sctable values(" + "'" + textBox1.Text + "'," + "'" + textBox2.Text + "'," + "'" + textBox3.Text + "'," + Convert.ToInt32(textBox4.Text) + "," + "'" + textBox5.Text + "'," + Convert.ToInt32(textBox6.Text) + ")", con); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("one entry has been done in science table"); } else if (flag == "ARTS") { con.Open(); SqlCommand cmd = new SqlCommand("insert artable values(" + "'" + textBox1.Text + "'," + "'" + textBox2.Text + "'," + "'" + textBox3.Text + "'," + Convert.ToInt32(textBox4.Text) + "," + "'" + textBox5.Text + "'," + Convert.ToInt32(textBox6.Text) + ")", con); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("one entry has been done in arts table"); } else if (flag == "MANAGEMENT") { con.Open(); SqlCommand cmd = new SqlCommand("insert mgmttable values(" + "'" + textBox1.Text + "'," + "'" + textBox2.Text + "'," + "'" + textBox3.Text + "'," + Convert.ToInt32(textBox4.Text) + "," + "'" + textBox5.Text + "'," + Convert.ToInt32(textBox6.Text) + ")", con); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("one entry has been done in management table"); } else if (flag == "OTHERS") { con.Open(); SqlCommand cmd = new SqlCommand("insert othertable values(" + "'" + textBox1.Text + "'," + "'" + textBox2.Text + "'," + "'" + textBox3.Text + "'," + Convert.ToInt32(textBox4.Text) + "," + "'" + textBox5.Text + "'," + Convert.ToInt32(textBox6.Text) + ")", con); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("one entry has been done in other table"); } else MessageBox.Show("you have not selected any categary"); } } private void Form7_Load(object sender, EventArgs e) { textBox1.Visible = true; comboBox1.Visible = false; } private void radioButton1_CheckedChanged(object sender, EventArgs e)

Page 46 of 59

{ }

flag = radioButton1.Text;

private void radioButton2_CheckedChanged(object sender, EventArgs e) { flag = radioButton2.Text; } private void radioButton3_CheckedChanged(object sender, EventArgs e) { flag = radioButton3.Text; } private void radioButton4_CheckedChanged(object sender, EventArgs e) { flag = radioButton4.Text; } private void button3_Click(object sender, EventArgs e) { if (button3.Text == "update") { comboBox1.Visible = true; textBox1.Visible = false; if (flag == "SCIENCE") { con.Open(); SqlCommand cmd = new SqlCommand("select BOOKID from SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) comboBox1.Items.Add(dr[0].ToString()); comboBox1.SelectedIndex = 0; button3.Text = "Save"; con.Close(); } else if (flag == "ARTS") { con.Open(); SqlCommand cmd = new SqlCommand("select BOOKID from SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) comboBox1.Items.Add(dr[0].ToString()); comboBox1.SelectedIndex = 0; button3.Text = "Save"; con.Close(); } else if (flag == "MANAGEMENT") { con.Open(); SqlCommand cmd = new SqlCommand("select BOOKID from mgmttable", con); SqlDataReader dr = cmd.ExecuteReader();

sctable", con);

artable", con);

Page 47 of 59

} else if (flag == "OTHERS") { con.Open(); SqlCommand cmd = new SqlCommand("select BOOKID from othertable", con); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) comboBox1.Items.Add(dr[0].ToString()); comboBox1.SelectedIndex = 0; button3.Text = "Save"; con.Close(); } } else if (button3.Text == "Save") { if (flag == "SCIENCE") { con.Open(); SqlCommand cmd2 = new SqlCommand("update sctable set BOOKNAME='" + textBox2.Text + "',AUTHORNAME='" + textBox3.Text + "',PRICE=" + Convert.ToInt32(textBox4.Text) + ",EDITION='" + textBox5.Text + "',QTY=" + Convert.ToInt32(textBox6.Text) + " where BOOKID='" + comboBox1.Text + "'", con); cmd2.ExecuteNonQuery(); con.Close(); } else if (flag == "ARTS") { con.Open(); SqlCommand cmd2 = new SqlCommand("update artable set BOOKNAME='" + textBox2.Text + "',AUTHORNAME='" + textBox3.Text + "',PRICE=" + Convert.ToInt32(textBox4.Text) + ",EDITION='" + textBox5.Text + "',QTY=" + Convert.ToInt32(textBox6.Text) + " where BOOKID='" + comboBox1.Text + "'", con); cmd2.ExecuteNonQuery(); con.Close(); } else if (flag == "MANAGEMENT") { con.Open(); SqlCommand cmd2 = new SqlCommand("update mgmttable set BOOKNAME='" + textBox2.Text + "',AUTHORNAME='" + textBox3.Text + "',PRICE=" + Convert.ToInt32(textBox4.Text) + ",EDITION='" + textBox5.Text + "',QTY=" + Convert.ToInt32(textBox6.Text) + " where BOOKID='" + comboBox1.Text + "'", con); cmd2.ExecuteNonQuery(); con.Close(); } else if (flag == "OTHERS") { con.Open(); SqlCommand cmd2 = new SqlCommand("update othertable set BOOKNAME='" + textBox2.Text + "',AUTHORNAME='" + textBox3.Text +

while (dr.Read()) comboBox1.Items.Add(dr[0].ToString()); comboBox1.SelectedIndex = 0; button3.Text = "Save"; con.Close();

Page 48 of 59

"',PRICE=" + Convert.ToInt32(textBox4.Text) + ",EDITION='" + textBox5.Text + "',QTY=" + Convert.ToInt32(textBox6.Text) + " where BOOKID='" + comboBox1.Text + "'", con); cmd2.ExecuteNonQuery(); con.Close(); } } } private void button4_Click(object sender, EventArgs e) { /*if (flag == "SCIENCE") { con.Open(); SqlCommand cmd2 = new SqlCommand("delete sctable where BOOKID='" + textBox2.Text + "',AUTHORNAME='" + textBox3.Text + "',PRICE=" + Convert.ToInt32(textBox4.Text) + ",EDITION='" + textBox5.Text + "',QTY=" + Convert.ToInt32(textBox6.Text) + " where BOOKID='" + comboBox1.Text + "'", con); cmd2.ExecuteNonQuery(); con.Close(); } else if (flag == "ARTS") { con.Open(); SqlCommand cmd2 = new SqlCommand("update artable set BOOKNAME='" + textBox2.Text + "',AUTHORNAME='" + textBox3.Text + "',PRICE=" + Convert.ToInt32(textBox4.Text) + ",EDITION='" + textBox5.Text + "',QTY=" + Convert.ToInt32(textBox6.Text) + " where BOOKID='" + comboBox1.Text + "'", con); cmd2.ExecuteNonQuery(); con.Close(); } else if (flag == "MANAGEMENT") { con.Open(); SqlCommand cmd2 = new SqlCommand("update mgmttable set BOOKNAME='" + textBox2.Text + "',AUTHORNAME='" + textBox3.Text + "',PRICE=" + Convert.ToInt32(textBox4.Text) + ",EDITION='" + textBox5.Text + "',QTY=" + Convert.ToInt32(textBox6.Text) + " where BOOKID='" + comboBox1.Text + "'", con); cmd2.ExecuteNonQuery(); con.Close(); }*/ } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { //con.Open(); con.Close(); if (flag == "SCIENCE") { con.Open(); SqlCommand cmd5 = new SqlCommand("select * from sctable where BOOKID=" + "'" + comboBox1.Text + "'", con); SqlDataReader dr5 = cmd5.ExecuteReader(); dr5.Read();

Page 49 of 59

} else if (flag == "ARTS") { con.Open(); SqlCommand cmd6 = new SqlCommand("select * from artable where BOOKID=" + "'" + comboBox1.Text + "'", con); SqlDataReader dr6 = cmd6.ExecuteReader(); dr6.Read(); textBox1.Text textBox2.Text textBox3.Text textBox4.Text textBox5.Text textBox6.Text con.Close(); = = = = = = dr6[0].ToString(); dr6[1].ToString(); dr6[2].ToString(); dr6[3].ToString(); dr6[4].ToString(); dr6[5].ToString();

textBox1.Text textBox2.Text textBox3.Text textBox4.Text textBox5.Text textBox6.Text con.Close();

= = = = = =

dr5[0].ToString(); dr5[1].ToString(); dr5[2].ToString(); dr5[3].ToString(); dr5[4].ToString(); dr5[5].ToString();

} else if (flag == "MANAGEMENT") { con.Open(); SqlCommand cmd7 = new SqlCommand("select * from mgmttable where BOOKID=" + "'" + comboBox1.Text + "'", con); SqlDataReader dr7 = cmd7.ExecuteReader(); dr7.Read(); textBox1.Text textBox2.Text textBox3.Text textBox4.Text textBox5.Text textBox6.Text con.Close(); = = = = = = dr7[0].ToString(); dr7[1].ToString(); dr7[2].ToString(); dr7[3].ToString(); dr7[4].ToString(); dr7[5].ToString();

} else if (flag == "OTHERS") { con.Open(); SqlCommand cmd8 = new SqlCommand("select * from othertable where BOOKID=" + "'" + comboBox1.Text + "'", con); SqlDataReader dr8 = cmd8.ExecuteReader(); dr8.Read(); textBox1.Text textBox2.Text textBox3.Text textBox4.Text textBox5.Text textBox6.Text con.Close(); = = = = = = dr8[0].ToString(); dr8[1].ToString(); dr8[2].ToString(); dr8[3].ToString(); dr8[4].ToString(); dr8[5].ToString();

} } } }

Page 50 of 59

BILLING PAGE
using using using using using using using using using System; System.Collections.Generic; System.ComponentModel; System.Data; System.Drawing; System.Linq; System.Text; System.Windows.Forms; System.Data.SqlClient;

namespace homepage { public partial class Form5 : Form { SqlConnection con,con1; string data,tab; public Form5() { InitializeComponent(); con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\book shop project\home page\Database1.mdf;Integrated Security=True;User Instance=True"); con1 = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\book shop project\home page\Database1.mdf;Integrated Security=True;User Instance=True"); } public void Call(string cat) { data = cat; } public void Call2(string cats) {

Page 51 of 59

tab = cats; } private void Form5_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'database1DataSet12.purchasetable' table. You can move, or remove it, as needed. this.purchasetableTableAdapter.Fill(this.database1DataSet12. purchasetable); con.Open(); SqlDataAdapter da = new SqlDataAdapter("select * from purchasetable", con); DataSet ds = new DataSet(); da.Fill(ds); dataGridView1.DataSource = ds.Tables[0].DefaultView; con.Close(); } private void button1_Click_1(object sender, EventArgs e) { con.Open(); SqlCommand cmd = new SqlCommand("delete from purchasetable",con); cmd.ExecuteNonQuery(); con.Close(); SqlDataAdapter da1 = new SqlDataAdapter("select * from purchasetable", con); DataSet ds1 = new DataSet(); da1.Fill(ds1); dataGridView1.DataSource = null; } private void button3_Click(object sender, EventArgs e) { int gtotal = 0; //int qt, qt2; con.Open(); SqlCommand cmd2 = new SqlCommand("select * from purchasetable", con); SqlDataReader dr = cmd2.ExecuteReader(); while (dr.Read()) { gtotal = gtotal + Convert.ToInt32(dr[4].ToString()); } textBox1.Text = gtotal.ToString(); con.Close();

} private void button4_Click(object sender, EventArgs e) { Form3 f3 = new Form3(); f3.Show(); this.Hide();

Page 52 of 59

} private void button5_Click(object sender, EventArgs e) { con.Open(); SqlCommand cmd = new SqlCommand("delete from purchasetable", con); cmd.ExecuteNonQuery(); con.Close(); SqlDataAdapter da1 = new SqlDataAdapter("select * from purchasetable", con); DataSet ds1 = new DataSet(); da1.Fill(ds1); dataGridView1.DataSource = null; Form1 f1 = new Form1(); f1.Show(); this.Hide(); } } }

TESTING
Introduction:
Till now the database design, user interface design and implementation are complete. The system now is tested for its functionality, validity and performance. In order to test the system, a wide variety of tests are conducted to make sure that the system matches the entire identified user requirement and constraints. This chapter focuses on testing the developed system using different test strategies in order to verify its correctness and user acceptance. Testing is the process of executing a program with the intent of finding an error. A good test case is one that has a high probability of finding an as yet undiscovered error. A successful test is one that uncovers an as yet undiscovered error.

Page 53 of 59

The development of software systems involves a series of production activities where opportunities for injection of human fallibility are enormous. Errors may begin to occur at the very inception of the process where the objective may be enormously or imperfectly specified, as well as in later design and development stages. Because of human inability to perform and communicate with perfection, software development is accompanied by a quality assurance activity. Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design and coding. And it needs to be done in almost every phase of product development life cycle not just before a product is handed to the customer. The following are some attributes of a good testing:
A good test has a high probability of finding an error. To

achieve this goal the tester understands the software and attempt to develop a mental picture of how the software may fail. Ideally the class of failure is probed. A good is not redundant: testing time and resource are limited. There is no point in conducting the test has the same purpose as another test. Every test should have a different purpose. A good test should be best of breed. In a group of test have a similar intent time and resource limitation may militate for the execution of only a subset of these tests. In such case the tester that has the highest likelihood of uncovering a whole class of errors should be used.

A good test should be neither too simple nor too complex: although it is sometimes possible to combine a series of tests into one test case, the possible side effects associated with this approach may mask errors. In general each test should be executed separately.

Page 54 of 59

Type of testing
Unit Testing
Unit testing focuses verification effort on the smallest unit software design the module. Using the procedural design description as a guide, important control paths are tested to uncover errors within the boundary of the module. The module interface is tested to ensure that information flows into and out of the program unit under test. The local data structure is examine to ensure that data store temporarily maintain its integrity during all step in algorithmic execution. Boundary conditions are tested to ensure that the module operates properly at boundaries established to limit or restrict processing. All independent paths (bases paths) through the control structure are exercised to ensure that all elements in the module have been executed at least once. And finally all error-handling paths are tested. Application interface of our system was unit tested at all levels of implementation, right from start of code writing, to integrating the code with other modules. Every module was tested fully to check its syntax and logical correctness. Error handling was implemented into relevant modules so that the code doesnt crash o errors.

Integration Testing
Integrated testing is a systematic technique for construction the program structures, while conducting tests to uncover errors associated with interfacing, the objective is to take unit tested modules and build a program structure that has been dictated by design. User interface of i-Admit was developed in modules. All of them were joining together to make the complete running application. While integrating these modules, integration testing was

Page 55 of 59

performed on them to verify that they meet all interfacing requirements and that they pass relevant information among themselves. In the end the complete program structure was tested to ensure interoperability of all the modules.

Page 56 of 59

LIMITATION OF THE PROJECT

We cannot still use this software as appropriate software for

bookshop management use as it does not have a sales part.


In this software bar code reader facility is not available , insertion

of new book detail into the database is time consuming.

This software will not work on Linux or Unix type operating System.

With the help of this software we cannot buy book online.

Page 57 of 59

FUTURE SCOPES

In the project Online BookShop Management System there is different scopes which can be developed in future. The scopes are mentioned below:

Here user only can order and Administrator can only see the

order. But in future accounts part can also be added. In future administrator can add the vendor part. Administrator can generate the stock report. Administrator can manage the sales part.

Page 58 of 59

BIBLIOGRAPHY
During the development of the project, I have used many resources and for that I am grateful to all the people concerned. Given below are the names of some, which I have used during development and documentation of the project

Books
1. Professional C# 2008

Authors: Christian Nagel, Bill Evjen, Jay Glynn, and Morgan Skinner 2. Head First C# by Andrew Stellman & Jennifer Greene. 3. A Beginners guide : Microsoft visual studio 2008 By Joe Mayo.

Web Sites
http://www.wikipedia.com/ http://msdn.microsoft.com http://www.freeprogrammingresources.com http://www.homeandlearn.co.uk/csharp

Page 59 of 59

You might also like