Under Guidance of
Mr. Viki N. Patel(MCA)
2015
CERTIFICATE OF ORIGINALITY
....
Date:..
Date:
Name, Designation
of the student
Enrolment No
ACKNOWLEGEMENT
I have taken efforts in this project. However, it would not have been possible without the
kind support and help of many individuals and organizations. I would like to extend my
sincere thanks to all of them.
I am highly indebted to Mr. Viki N Patel for their guidance and constant supervision as
well as for providing necessary information regarding the project & also for their support
in completing the project.
I would like to express my gratitude towards my parents & member of ONLINE BOOK
STORE for their kind co-operation and encouragement which help me in completion of
this project. I would like to express my special gratitude and thanks to industry persons
for giving me such attention and time.
My thanks and appreciations also go to my colleague in developing the project and
people who have willingly helped me out with their abilities.
PLACE : VADODARA
(TRULY YOURS)
Index
Title
Chapter 1: Title of Project
Chapter 2: Introduction & Objective of the project
Chapter 3: Project Category
Chapter 4: Feasibility Study
4.1 Technical & System Feasibility
4.2 Economic Feasibility
4.3 Legal Feasibility
4.4 Operational Feasibility
4.5 Schedule Feasibility
Chapter 5 : System Requirement Specification
5.1 Scope Of the Solution
5.2 Software Requirement Specification
5.3 System engineering Paradigm
Chapter 6 : Requirement of Analysis
6.1 Data Flow Diagram
6.2 ER Diagram
Chapter 7 : Process Logic
Chapter 8: Data Structure
Chapter 9: Data Model / Schema Diagram
Chapter 10: Input / Output (Screen Shot)
Chapter 11: Coding
11.1 Coding
[1]
Title Of Project
Online Book Store
[2]
Introduction & Objective of
the Project
Introduction:-
Online Book Store is a ecommerce website for bookstore which provides online
books shopping for user customers and customers can view the orders and the status
of the order using login dashboards. This website has option of administrator who can
add books, view orders and update the status of the orders which customers can see
through his login order page.
Using the system users or customers can view the stores available books
and can place orders through shopping cart. On checkout time user can register or
existing user can use their existing credentials proceed the checkout. There will be
different payment options to choose to place the orders. Using login section, Customers
can view placed orders and the status of the orders whether it is delivered or still
processing from admin side.
This system has administration section where admin can access all orders,
add/view/edit books to the shopping portal. As of now, the system offers only cash on
delivery and DD/Chq. on delivery options.
Background :Online Book Store: An ecommerce website for bookstore is based on B2C project. This
project has been composed on three major strands: Data collection from customer,
administrative process for delivery and revision of report. This online store is mainly a
shopping cart for customers and real time inventory control for admin with administration
panel. Admin has proper report on orders and inventory.
As per the follow-up to the project after the implementing multiple online-payment
options through Google Checkout, PayPal and etc.
Objective: Proposed online Book Store Management system provides very easy
of buying Books.
process
10
[3]
Project Category
11
Project Category:
Internet / Intranet / RDBMS
12
[4]
Feasibility Study
13
Feasibility Study :The feasibility study of Online- Book-Store the TELOS model which stand for
Technical, Economic, Legal, Operational and Schedule feasibility was adopted. The
feasibility study should answer the following questions:
1. Technical and system Feasibility: does the technology exist to implement the
proposed system? Is it a practical proposition?
2. Economic Feasibility: is the system cost-effective? Do benefits outweigh costs?
3. Legal Feasibility: is there any conflict between the proposed system and legal
requirements?
4. Operational Feasibility: are the current work practices and procedures
adequate to support the new system?
5. Schedule Feasibility: can the system be developed in time?
4.1 Technical and System Feasibility :The assessment is based on an outline design of system requirements in terms of Input,
Processes, Output, Fields, Programs, and Procedures. This can be quantified in terms
of volumes of data, trends, frequency of updating, etc. in order to estimate whether the
new system will perform adequately or not.
The following questions had been taken consider for the technical feasibility study for
Online Book Store.
A brief description of the business to assess more possible factor/s which could
affect the study
The part of the business being examined
The human and economic factor
The possible solutions to the problems
To implement Online Book Store, commonly available technologies and platforms may
be used and no new technology or platform is required. The networking is likely to fairly
simple and single vendor may implement the whole system. The user and admin is
required Broadband Internet connectivity with at least 60 Kbps speed with minimum
system and browser software as client-side.
14
4.2 Economic Feasibility :Economic analysis is the most frequently used method for evaluating the effectiveness
of a new system. More commonly known as cost/benefit analysis, the procedure is to
determine the benefits and savings that are expected from a candidate system and
compare them with costs. If benefits outweigh costs, then the decision is made to
design and implement the system. An entrepreneur must accurately weigh the cost
versus benefits before taking an action.
Cost-based study: A broadband infrastructure is already available in all the branches.
Use of Internet based network would thus minimize the expenses as no separate WAN
will be required. Open source technology could easily be adopted to further minimize
the cost of software. The client computers would merely be ordinary PCs connected to
the Internet, which all the formations already have. The only thing required would be a
database server, which is likely to cost not more than Rs.2 Lake, and is quite affordable.
The benefits derived from the system far outweigh the cost.
Time-based study: Installation of the entire application is have two parts. Front-end
installation which needs to be add the files in server which may take more then half and
hour and installing the database structure in the MICROSOFT SQL database which
may require 10 minutes.
Thus, the Online Book Store is economically feasible.
4.3 Legal Feasibility :Using this feasible study, we determine whether the proposed system conflicts with
legal requirements.
1. All the user data and privacy will be safe. Our system have secured password
algorithm to secure user data such as password, email and personal information.
2. At any time user can delete/remove their account from our application, which will
remove entire data of the user.
3. Email addresses are not been used for any other purpose except the Online
Book Store application.
4. Spam emails are not been sent to users email address only promotional emails
will be sent to users email that too agreed users only.
Thus, the Online Book Store is economically feasible.
15
4.4 Operational Feasibility :Operational feasibility is a measure of how well a proposed system solves the problems,
and takes advantage of the opportunities identified during scope definition and how it
satisfies the requirements identified in the requirements analysis phase of system
development.
All the data is stored in database, user can track their data using users panel. After
checkout ordered books will be sent from admin to users delivery address and payment
slip will be provided directly and the amount/cash will be collected directly as per the
system.
Thus, the Online Book Store is economically feasible.
16
4.5 Schedule Feasibility :Using SDLC approach the estimated project duration is 20 weeks approx. which comes
to 5 months. It has been planned in a modular manner and one module may be
developed more or less in parallel to another. Further, object orientation and code-reuse
will be adopted during the development process. It is estimated that about 5 man
months will be required to develop and implement the system, given the technology.
Thus, it is feasible to complete the project as per the required schedule.
Nature of Feasibility
Whether Feasible
Reason
Technical Feasibility
Economic Feasibility
Legal Feasibility
Operational Feasibility
Schedule Feasibility
17
[5]
Software Requirement
Specification (SRS)
18
5.1 Scope of the solution :Online Book Store is a web based online store portal, which sells books online. This
system requires web application which includes shopping cart, members management
and administration section. Vendors who are also selling books can use this application
to sell their books through Online Book Store.
This application deal with three types of users
Vendors
Buyer
Super user/Administrator
Online Book Store allows user to view/browse the list of books and the user can add
their books to shopping cart. Using the shopping cart section, user can purchase books
online. When user is purchasing books through Online Book Store, user will be asked
to enter their details with username and password. Once user purchased books
successfully through Online Book Store application, My account section for user will be
created. User can login his/her my account section using the username/password.
Purchase books online
In users my account system contains the order history of the particular customer.
Using the login section, member/user can add books to wish-list which store the
books details in the members my account section to purchase afterwards.
Vendors who are selling books through can add their books details using vendors
login/account section. After admin review, the details will be displayed in the Online
Book-Store application. When user purchase the vendors books, the details will be
immediately sent to vendors. Vendors will deliver the books to user/customers. Vendors
section contains many other features such as
Books management Add, view and delete books details
Order management View purchased books and set status of the order
Super user is the administrator of the site who has the access to view or edit or delete
the entire system.
19
5.2 Software Requirements Specifications :Frond end: ASP.NET - ASP.NET is a widely used general-purpose scripting language
that is especially suited for Web development and can be embedded into HTML.
Back end: Microsoft SQL - Microsoft SQL Enterprise Server software is the most
reliable, secure and up-to-date version of Microsoft SQL for cost-effectively delivering Ecommerce, Online Transaction Processing (OLTP), and multi-terabyte Data
Warehousing applications. It is a fully integrated transaction-safe, ACID compliant
database with full commit, rollback, and crash recovery and row level locking
capabilities. Microsoft SQL delivers the ease of use, scalability, and performance that
has made Microsoft SQL the world's most popular open source database.
Web Server: Asp.Net Server - The Asp.Net HTTP Server Project is a collaborative
software development effort aimed at creating a robust, commercial-grade and freelyavailable source code implementation of an HTTP (Web) server. The project is jointly
managed by a group of volunteers located around the world, using the Internet and the
Web to communicate, plan, and develop the server and its related
documentation.ASP.NET - ASP.NET is a widely used general-purpose scripting
language that is especially suited for Web development and can be embedded into
HTML.
SOFTWARE REQUIREMENTS(RECOMMENDED) AT SERVER SIDE
Web Browser
Server Requirements
:
:
:
:
Windows OS
INTEL I-3 2.9 GHZ
4GB DDR3
250 GB
:
:
:
20
:
:
:
Any browser, which is XHTML 1.0 compatible like Microsoft Internet 6.0.
Any hardware which support above said browser.
5.3 Software Engineering Paradigm :As the application domains of software are becoming complicated and design of big
software without a systematic approach is virtually impossible, the field of software
engineering is increasingly gaining importance. It is now developing like an industry.
The waterfall model provides a systematic and sequential approach to software
development and is better than the build and fix approach. But the requirements should
be available at the time of commencement of the project. There is no method to judge
the problems of software in between different phases.
The waterfall model with feedback is as follows:
21
Requirement Analysis
System Design
Coding
Testing
Maintenance
22
[6]
Requirement of Analysis
23
Place Order
Make Payment
Customer
Get Book,
Bill,Receipt
Online
Book Store
Management
System
Get Payment
Dispetch Order
Admin
24
Admin
1.0
Admin
Customer
2.0
Get Books
Get Reports
3.0
Purchase
Make the Payment
the P
u
Deta blisher
ils
se
rch etails
u
P
he ook D
t
B
nd
Se sher
bli
the
Pu Send etails
lier D
Supp
Send
the
Book Purchse
Deta
ils
4.0
Print The reports
Reports
Get Report
Book
Book Sales
Get Book
Admin
Sales
s
Sale
e
h
t
Send Details
Book
Send
Supplier
Customer
se
rch
u
P
the port
d
n Re
Se
r
Orde
e
h
t
Send ports
Re
Se
Paym nd the
ent R
epor
t
Publisher
Supplier
Purchase
Order
Payment
25
Customer
Send the customer details
Customer
1.1
Customer
Details
Deliver To Customeer
Book
Search
Get the
data
G
Pu et th
bl
e
De icatio
tai
ls n
Order of
books
1.3
Order
Order
Payment
Publication
Order Status
1.5
1.4
Dispatch
Payment
Payment
Deatils
Payment
26
Admin
Book
Admin
Send the customer details
2.1
Table
Selection
Customer
Confirm to User
Table
Manage
Ge
Get the
data
tP
ub
lica
tio
et
Correct the
data
Book
nd
Publication
us
ls
tat
ils
ai
r S Deta
et
ta
de
t
rd
da t Or
en
er Ge aym
tP
et
de
or
ata
rd
2.3
Ge
DataEntry
Order
Deatils
Validate
the Data
Order
Order Status
2.5
2.4
Validation
Payment
Storage
Store Payment data
Store Order Status data
Store Order data
27
us
4.1
Get C
Report
Selection
Get C
ata
Categories
Ge gories De
tails
tB
oo
kD
Ge
eta
tP
ils
ub
lica
Book
tio
nD
ata
et
Prepare Report
Datat
tail Customer
r de
tome
et
D
Order Details
us
Order
4.3
tails
nt De
ayme
tat
rS
Get P
Finally report
Check & Print
rde
tO
Ge
ata
rD
rde
Report
Prepration
Publication
ls
ai
to
4.2
Ge
er
rd
Admin
Order Status
Report
Print
Payment
28
6.2 ER Diagram :-
Cust_Id
Purchse_Id
Email_Id
Fill
Customer
Cust_Nm
Cust_Id
Register Details
1
Order_Id
Area
Address
Totquantity
Cust_Nm
Address
Area
Email_Id
M
Make
Order
Slip_No
Cust_Id
Book_Id
Order Details
Sup_Id
Book_Nm
Price
TotAmount
Sup_Nm
ContactPers
on_Nm
Book_Id
Payment
Book
M
M
ChequeDate
Bank_Nm
1
Supply
Supplier
M
Address
Searchkey
Contact_No
Email_Id
Publish
By
Receipt
Pub_Id
Pub_Nm
1
Purchase
Publisher
Id
Price
1
Admin
AdminName
Usertype
Address
Contact_No
Order_Id
Order_date
UserNM
Generates
Description
Order
Totquantity
Stock_Id
29
[7]
Process Logic
30
31
Step 1:
Start
step 2: Enter your Choice(Add/Modify/Delete)
BookAdd();
Enter Book_Id
Enter Book_Nm
Enter Search_Keyword
Search Image
Select Category_Id
Enter Status
Option:-
Validate data
Store data
Book Modify();
Search Book_Id
Option:Update record
Store data
Book Delete();
Search Book_Id
Delete the record.
Do u Want to Delete?
step 3: Stop.
Validate data
Store data
Order Modify();
Search Order_Id
Option:-
Update record
Store data
Order Delete();
Search Order_Id
Delete the record.
Do u Want to Delete?
step 3: Stop.
32
Step 1:
Start
step 2: Enter your Choice(Add/Modify/Delete)
PaymentAdd();
Enter Slip_No
Enter Payment_type
Enter TotPayment
Enter Bank_Nm
Enter Branch_Nm
Enter Date_Of_Payment
Enter Cheque_No
Enter Cheque_Date
Enter Cust_Id
Enter Courier_Id
Enter Book_Id
Option:-
Validate data
Store data
Payment Modify();
Search Slip_No
Option:-
Update record
Store data
Payment Delete();
Search Slip_No
Delete the record.
Do u Want to Delete?
step 3: Stop.
Validate data
Store data
Publication Modify();
Search Pub_Id
Update record
Store data
33
Option:-
Publication Delete();
Search Pub_Id
Delete the record.
Do u Want to Delete?
step 3: Stop.
34
Step 1:
Start
step 2: Enter your Choice(Add/Modify/Delete)
SupplierAdd();
Enter Sup_Id
Enter Sup_Nm
Enter ContactPerson_Nm
Enter Address
Enter Contact_No
Enter Mobile_No
Enter Email_Id
Enter Gender
Enter Country_Id
Enter State_Id
Enter City_Id
Enter Zipcode
Option:-
Validate data
Store data
Supplier Modify();
Search Sup_Id
Option:-
Update record
Store data
Supplier Delete();
Search Sup_Id
Delete the record.
Do u Want to Delete?
step 3: Stop.
35
Login();
Enter UserName
Enter Password
End
step 4: Stop.
36
[8]
Data Structure
37
1.Admin:
FieldName
Id
User_Nm
Password
User_type
Email_Id
First_Nm
Middle_Nm
Last_Nm
Contact_No
Address
Gender
Country_Id
State_Id
City_Id
ZipCode
Size
10
30
18
20
50
20
20
20
12
50
10
10
10
10
10
DataType
Numeric
Varchar
Varchar
Varchar
Varchar
Varchar
Varchar
Varchar
Numeric
Varchar
Char
Numeric
Numeric
Numeric
Numeric
Validation
PrimaryKey
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Foreignkey
Foreignkey
Foreignkey
Not null
DatType
Numeric
Varchar
Numeric
Varchar
Numeric
Numeric
Validation
PrimaryKey
Not null
Not null
Not Null
Foreign Key
Not null
Size
10
30
30
DataType
Numeric
Varchar
Varchar
Validation
PrimaryKey
Not null
Not null
Size
10
30
10
DataType
Numeric
Varchar
Numeric
Validation
PrimaryKey
Not null
Foreignkey
2.Book:
FieldName
Book_Id
Book_Nm
Search_Keyword
Image
Cate_Id
Status
Size
10
30
10
50
10
10
3.Category:
FieldName
Cate_Id
Cate_Nm
Description
4.City:
FieldName
City_Id
City_Nm
State_Id
38
5.Country:
FieldName
Country_Id
Country_Nm
Country_Alias
Size
10
30
15
DataType
Numeric
Varchar
Varchar
Validation
PrimaryKey
Not null
Not null
Size
10
30
10
10
30
30
DataType
Numeric
Varchar
Date
Date
Varchar
Varchar
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
Size
10
20
20
20
12
50
50
10
10
10
10
10
10
Datatype
Numeric
Varchar
Varchar
Varchar
Numeric
Varchar
Varchar
Numeric
Numeric
Numeric
Numeric
Date
Numeric
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
Not null
Foreignkey
Foreignkey
Foreignkey
Not null
Not null
Not null
Size
10
10
10
30
30
Datatype
Numeric
Numeric
Date
Varchar
Varchar
Validation
Primarykey
Foreignkey
Not null
Not null
Not null
Size
10
10
30
10
10
Datatype
Numeric
Date
Varchar
Numeric
Numeric
Validation
Primarykey
Not null
Not null
Not null
Foreignkey
6.Courier:
FieldName
Courier_Id
Courier_Nm
Delivery_date
Receiving_date
Source
Destination
7.Customer:
Fieldname
Cust_Id
First_Nm
Middle_Nm
Last_Nm
Contact_No.
Email_Id
Address
Country_Id
State_Id
City_Id
Zipcode
Date_of_purchase
Status
8.Delivery_Status:
Fieldname
Status_Id
Courier_Id
Date_Of_Purchase
Source
Destination
9.Order Master:
39
Fieldname
Order_Id
Order_date
Description
Totquantity
Stock_Id
10.Order_Detail:
Fieldname
Order_Id
Book_id
Totquantity
Price
TotAmount
Size
10
10
10
10
10
Datatype
Numeric
Numeric
Numeric
Numeric
Numeric
Validation
Foreignkey
Foreignkey
Not null
Not null
Not null
Size
10
10
10
30
30
10
10
20
10
10
10
Datatype
Numeric
Varchar
Numeric
Varchar
Varchar
Date
Date
Varchar
Numeric
Numeric
Numeric
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Foreignkey
Foreignkey
Foreignkey
Size
10
30
10
50
20
10
Datatype
Numeric
Varchar
Numeric
Varchar
Varchar
Numeric
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
11.Payment:
Fieldname
Slip_No
Payment_type
Totpayment
Bank_Name
Branch_Name
Date_Of_Payment
Cheque_date
Cheque_No
Cust_Id
Courier_Id
Book_Id
12.Publication:
Fieldname
Pub_Id
Pub_Nm
Price
Address
Email_Id
Contact_No
13.Purchase:
Fieldname
Pur_Id
Pur_Nm
Order_Id
Totpayment
Totquantity
Cust_Id
Sup_Id
Date_Of_Purchase
Size
10
30
10
10
10
10
10
10
Datatype
Numeric
Varchar
Numeric
Numeric
Numeric
Numeric
Numeric
Date
Validation
Primarykey
Not null
Foreignkey
Not null
Not null
Foreignkey
Foreignkey
Not null
40
14.Purchase_Detail:
Fieldname
Trans_Id
Pur_Id
Book_Id
Quantity
Price
Size
10
10
10
10
10
Datatype
Numeric
Numeric
Numeric
Numeric
Numeric
Validation
Primarykey
Foreignkey
Foreignkey
Not null
Not null
Size
10
30
10
Datatype
Numeric
Varchar
Numeric
Validation
Primarykey
Not null
Foreignkey
Size
10
10
10
Datatype
Numeric
Numeric
Numeric
Validation
Primarykey
Foreignkey
Not null
Size
10
30
30
10
Datatype
Numeric
Varchar
Varchar
Numeric
Validation
Primarykey
Not null
Not null
Foreignkey
15.State:
Fieldname
State_Id
State_Nm
Country_Id
16.Stock:
Fieldname
Stock_Id
Book_Id
Totquantity
17.Subject:
Fieldname
Sub_Id
Sub_Nm
Author_Nm
Pub_Id
18.Supplier:
Fieldname
Sup_Id
Sup_Nm
Contactperson_Nm
Address
Contact_No
Mobile_No
Email_Id
Gender
Country_Id
State_Id
City_Id
Zipcode
Size
10
30
30
50
10
10
30
10
10
10
10
10
Datatype
Numeric
Varchar
Varchar
Varchar
Numeric
Numeric
Varchar
Char
Numeric
Numeric
Numeric
Numeric
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Foreignkey
Foreignkey
Foreignkey
Not null
41
[9]
Data Model / Schema Diagram
42
State
PK,I3
State_Id
State_Nm
FK1,I2,I1 Country_Id
Customer
Courier
PK,I5
PK Courier_Id
City
Cust_Id
PK,I1
First_Nm
Middle_Nm
Last_Nm
Contact_No
I6
Email_Id
Address
Gender
FK2,I4,I3 Country_Id
FK3,I8,I7 State_Id
FK1,I1,I2 City_ID
Purchase_Date
Courier_Nm
Delivery_Date
Receiving_Date
Source
Destination
Payment
Stock
PK,I2
Stock_Id
FK1,I1 Book_Id
Totquantity
Order
PK,I1
Order_Id
PK
Slip_No
Payment_Type
TotPayment
Bank_Nm
Branch_Nm
Date_Of_Payment
Cheque_Date
Cheque_No
FK3,I6,I5 Cust_Id
FK2,I4,I3 Courier_Id
FK1,I2,I1 Book_Id
Delivery_Status
PK,I4
Status_Id
I1
Courier_Id
Date_Of_Purchase
Source
Destination
FK1,I3,I2 Cust_Id
Order_Date
Description
Totquantity
FK1,I3,I2 Stock_Id
City_Id
City_Nm
FK1,I3,I2 State_Id
Publication
PK,I6
Admin
PK,I6
Id
User_Nm
Password
User_type
I5
Email_Id
First_Nm
Middle_Nm
Last_Nm
Contact_No
Address
Gender
FK2,I4,I3 Country_Id
FK3,I8,I7 State_Id
FK1,I2,I1 City_Id
I9
Zipcode
Pub_Id
Pub_Nm
Price
Address
I5
Email_Id
Contact_No
Mobile_No
FK2,I4,I3 Country_Id
FK3,I8,I7 State_Id
FK1,I2,I1 City_Id
I9
Zipcode
Supplier
PK,I5 Sup_Id
Subject
PK,I3
Sub_Id
Sub_Nm
Author_Nm
FK1,I2,I1 Pub_Id
I3
I2
I4
I1
I6
Sup_Nm
ContactPerson_Nm
Address
Contact_No
Mobile_No
Email_Id
Gender
Country_Id
State_Id
City_Id
Zipcode
Purchase
Order_Detail
PK,I5
Pur_Id
Category
FK2,I4,I3 Order_Id
FK1,I2,I1 Book_Id
Totquantity
Price
TotAmount
Pur_Nm
FK2,I4,I3 Order_Id
TotPayment
Totquantity
FK1,I2,I1 Cust_Id
FK3,I7,I6 Sup_Id
Date_Of_Purchase
PK,I1 Cate_Id
Cate_Nm
Description
Purchase_Details
PK,I5
Trans_Id
FK2,I4,I3 Pur_Id
FK1,I2,I1 Book_Id
Quantity
Price
43
[10]
Input / Output
(Screen Shot)
44
Login page
Welcome page
45
Forgote password
Change password
46
Book (save)
Book (update)
47
Book (delete)
Category ( save)
48
Category(delete)
Category(Update)
49
Country (save)
Country (update)
50
City(save)
City(update)
51
city (delete)
Stock(save)
52
stock(update)
Stock(delete)
53
Courier (save)
Courier (update)
54
Courier (delete)
55
56
57
58
59
Payment (save)
Payment (update)
60
Payment (delete)
Publication( save)
61
Publication (update)
Publication (delete)
62
63
State (save)
64
State (update)
State (delete)
65
Subject (save)
Subject (update)
66
Subject( delete)
Supplier (save)
67
Supplier( update)
Supplier (delete)
68
69
Book detail
70
[11]
Coding
71
using
using
using
using
using
using
using
using
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Data.SqlClient;
LeeGunn.Web.UI.MessageBox;
publicpartialclassAdmin_login : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
con.Open();
Txtpswd.TextMode = TextBoxMode.Password;
}
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
72
}
red.Close();
cmd.Dispose();
73
}
protectedvoid LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("book.aspx");
}
protectedvoid LinkButton2_Click(object sender, EventArgs e)
{
Response.Redirect("Category.aspx");
}
protectedvoid LinkButton3_Click(object sender, EventArgs e)
{
Response.Redirect("Country.aspx");
}
protectedvoid LinkButton4_Click(object sender, EventArgs e)
{
Response.Redirect("Customer.aspx");
}
protectedvoid LinkButton5_Click(object sender, EventArgs e)
{
Response.Redirect("OrderMaster.aspx");
}
protectedvoid LinkButton6_Click(object sender, EventArgs e)
{
Response.Redirect("publication.aspx");
}
protectedvoid LinkButton7_Click(object sender, EventArgs e)
{
Response.Redirect("state.aspx");
}
protectedvoid LinkButton8_Click(object sender, EventArgs e)
{
Response.Redirect("city.aspx");
}
protectedvoid LinkButton9_Click(object sender, EventArgs e)
{
Response.Redirect("Subject.aspx");
}
protectedvoid LinkButton10_Click(object sender, EventArgs e)
{
Response.Redirect("Supplier.aspx");
}
protectedvoid LinkButton11_Click(object sender, EventArgs e)
{
Response.Redirect("Purchase.aspx");
}
protectedvoid lbncourier_Click(object sender, EventArgs e)
{
Response.Redirect("Courier.aspx");
}
protectedvoid lbndelstatus_Click(object sender, EventArgs e)
{
Response.Redirect("Deliverystatus.aspx");
}
protectedvoid lbnodrdetl_Click(object sender, EventArgs e)
{
Response.Redirect("OrederDetail.aspx");
}
protectedvoid lbnpymnt_Click(object sender, EventArgs e)
{
Response.Redirect("Payment.aspx");
}
protectedvoid lbnprchsdetl_Click(object sender, EventArgs e)
{
Response.Redirect("PurchseDetail.aspx");
}
}
Forgote password coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.Net.Mail;
using System.Data;
publicpartialclassAdmin_forgotpassword : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
// con.Open();
bindadmin();
// clear();
}
}
74
protectedvoid opneconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid bindadmin()
{
SqlCommand cmd = newSqlCommand("SP_Readadmin", con);
cmd.CommandType = CommandType.StoredProcedure;
opneconn();
drpscrtquesn.DataSource = cmd.ExecuteReader();
drpscrtquesn.DataTextField = "Secret_question";
drpscrtquesn.DataBind();
closeconn();
}
protectedvoid btnsbmit_Click(object sender, EventArgs e)
{
}
protectedvoid btnback_Click(object sender, EventArgs e)
{
Response.Redirect("loginpage.aspx");
}
protectedvoid btnsbmit_Click1(object sender, EventArgs e)
{
try
{
DataSet ds = newDataSet();
{
con.Open();
SqlCommand cmd = newSqlCommand("select * from Admin where User_name='" + Txtusrnm.Text + "' and
Secret_question='" + drpscrtquesn.SelectedValue + "'", con);
SqlDataAdapter da = newSqlDataAdapter(cmd);
da.Fill(ds);
con.Close();
}
if (ds.Tables[0].Rows.Count > 0)
{
MailMessage Msg = newMailMessage();
Msg.From = newMailAddress(Txtusrnm.Text);
Msg.To.Add(Txtusrnm.Text);
Msg.Subject = "Your Password Details";
Msg.Body = "Hi, <br/>Please check your Login Detailss<br/><br/>Your Username: " +
ds.Tables[0].Rows[0]["UserName"] + "<br/><br/>Your Password: " + ds.Tables[0].Rows[0]["Password"]
+ "<br/><br/>";
Msg.IsBodyHtml = true;
SmtpClient smtp = newSmtpClient();
smtp.Host = "smtp.gmail.com";
smtp.Port = 587;
smtp.Credentials = new System.Net.NetworkCredential("jinendra_shah@gmail.com",
"094386099");
smtp.EnableSsl = true;
smtp.Send(Msg);
lblmsg.Text = "Your Password Details Sent to your mail";
Txtusrnm.Text = "";
}
else
{
lblmsg.Text = "The Email you entered not exists.";
}
catch (Exception ex)
75
{
Console.WriteLine("{0} Exception caught.", ex);
}
}
}
Change password coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
publicpartialclassAdmin_changepassword : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
con.Open();
}
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
string strg = "select count(*) from Admin where User_name='" + Txtusrnm.Text + "' and Password='"
+ Txtpswd.Text + "'";
SqlCommand cmd = newSqlCommand(strg, con);
if (Convert.ToString(cmd.ExecuteScalar()) == "0")
{
Label1.Text = "Wrong User Name and Pass ";
}
else
{
if (Txtnewpswd.Text == Txtcnfrmpswd.Text)
{
string strgs = "Update Admin set Password='" + Txtcnfrmpswd.Text + "' where User_name='" +
Txtusrnm.Text + "'";
SqlCommand cmds = newSqlCommand(strgs, con);
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
cmds.ExecuteNonQuery();
Label2.Text = "your password is changed";
con.Close();
}
76
}
}
Book coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
using System.IO;
publicpartialclassAdmin_BOOK : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
Bindgrid();
bindcategory();
}
}
publicvoid bindcategory()
{
SqlCommand cmd = newSqlCommand("SP_ReadCategorys", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConn();
drpcatenm.DataSource = cmd.ExecuteReader();
drpcatenm.DataTextField = "Cate_name";
drpcatenm.DataValueField = "Cate_id";
drpcatenm.DataBind();
CloseConn();
}
protectedvoid Bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_ReadBooks", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConn();
GridView1.DataSource = cmd.ExecuteReader();
GridView1.DataBind();
CloseConn();
}
77
protectedvoid OpenConn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid CloseConn()
{
con.Close();
}
protectedvoid Save_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
string filenames1 = System.IO.Path.GetFileName(FileUpload1.FileName.ToString());
FileUpload1.SaveAs(Server.MapPath("~/Images/" +filenames1.ToString()));
SqlCommand cmd = newSqlCommand("SP_InsertBooks", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConn();
SqlParameter prm = newSqlParameter("@BOOKNAME", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtbooknm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@SEARCHKEYWORD", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtserachkeywrd.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@IMAGENAME", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = FileUpload1.FileName.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@CATEGORYID", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpcatenm.SelectedValue.ToString();
cmd.Parameters.Add(prm);
string Stat = "";
if (Active.Checked)
Stat = "Yes";
else
Stat = "No.";
cmd.ExecuteNonQuery();
CloseConn();
MessageBox.Show("Data has been saved");
Bindgrid();
}
}
78
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
else
{
try
{
string filenames1 = System.IO.Path.GetFileName(FileUpload1.FileName.ToString());
FileUpload1.SaveAs(Server.MapPath("~/Images/" + filenames1.ToString()));
SqlCommand cmd = newSqlCommand("SP_updatebooks", con);
cmd.CommandType = CommandType.StoredProcedure;
OpenConn();
SqlParameter prm = newSqlParameter("@BOOKNAME", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtbooknm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@SEARCHKEYWORD", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtserachkeywrd.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@IMAGENAME", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = FileUpload1.FileName.ToString();
cmd.Parameters.Add(prm);
79
cmd.ExecuteNonQuery();
CloseConn();
MessageBox.Show("Data updated");
Bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Book_id"] = id;
}
btnsave.Text = "Update";
CloseConn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
80
cmd.Parameters.Add(prm);
OpenConn();
cmd.ExecuteNonQuery();
cmd.Dispose();
MessageBox.Show("Data deleted");
Bindgrid();
CloseConn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
Bindgrid();
}
}
protectedvoid GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button lnkedit = (Button)e.Row.FindControl("lnkedit");
lnkedit.CommandArgument = e.Row.RowIndex.ToString();
Button lnkdelete = (Button)e.Row.FindControl("lnkdelete");
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
Txtbooknm.Text = "";
Txtserachkeywrd.Text = "";
drpcatenm.SelectedIndex = 0;
drppubnm.SelectedIndex = 0;
Active.Text = "";
Txtsub.Text = "";
Txtauthrnm.Text = "";
}
}
Category coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
81
publicpartialclassAdmin_Category : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
}
}
publicvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_ReadCategorys", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
GridView1.DataSource = cmd.ExecuteReader();
GridView1.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
SqlCommand cmd = newSqlCommand("SP_Categorys", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@categoryname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcatnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@description", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtdscptn.Text;
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updateCategorys", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
82
prm.Value = Txtdscptn.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@categoryid ", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = ViewState["Cate_id"].ToString();
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data updated");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Cate_id"] = id;
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtcatnm.Text = red["Cate_name"].ToString();
Txtdscptn.Text = red["Description"].ToString();
}
btnsave.Text = "Updated";
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
83
prm.Direction = ParameterDirection.Input;
prm.Value = id.ToString();
cmd.Parameters.Add(prm);
openconn();
cmd.ExecuteNonQuery();
cmd.Dispose();
MessageBox.Show("Data deleted");
bindgrid();
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
bindgrid();
}
}
protectedvoid GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button lnkedit = (Button)e.Row.FindControl("lnkedit");
lnkedit.CommandArgument = e.Row.RowIndex.ToString();
Button lnkdelete = (Button)e.Row.FindControl("lnkdelete");
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
}
84
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
}
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("Sp_Readcountry", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_country.DataSource = cmd.ExecuteReader();
Grid_country.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
SqlCommand cmd = newSqlCommand("Sp_Insertcountry", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@countryname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcntrynm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@countryalias", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcntryalias.Text;
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Country Registered");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("Sp_updatecountry", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
85
GridViewCommandEventArgs e)
ViewState["Country_id"] = id;
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtcntrynm.Text = red["Country_name"].ToString();
Txtcntryalias.Text = red["Country_alias"].ToString();
}
btnsave.Text = "Update";
closeconn();
86
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter prm = newSqlParameter("@countryid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = id.ToString();
cmd.Parameters.Add(prm);
openconn();
cmd.ExecuteNonQuery();
cmd.Dispose();
bindgrid();
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
bindgrid();
}
}
protectedvoid Grid_country_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button lnkedit = (Button)e.Row.FindControl("lnkedit");
lnkedit.CommandArgument = e.Row.RowIndex.ToString();
Button lnkdelete = (Button)e.Row.FindControl("lnkdelete");
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
Txtcntrynm.Text = "";
Txtcntryalias.Text = "";
}
}
City coding c#
using
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Collections;
System.Configuration;
System.Data;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.Data.SqlClient;
LeeGunn.Web.UI.MessageBox;
87
publicpartialclassAdmin_City : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
bindstate();
}
}
publicvoid bindstate()
{
SqlCommand cmd = newSqlCommand("SP_ReadState", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpstatenm.DataSource = cmd.ExecuteReader();
// drpstatenm.DataTextField = "State_name";
drpstatenm.DataValueField = "State_id";
drpstatenm.DataBind();
closeconn();
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_ReadCity", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_City.DataSource = cmd.ExecuteReader();
Grid_City.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
SqlCommand cmd = newSqlCommand("Sp_insertcity", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@cityname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcitynm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@stateid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpstatenm.Text;
cmd.Parameters.Add(prm);
closeconn();
MessageBox.Show("Data Saved");
88
cmd.ExecuteNonQuery();
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updateCity", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@cityname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcitynm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@stateid ", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpstatenm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@cityid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = ViewState["City_id"].ToString();
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("CITY Update");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid Grid_City_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["City_id"] = id;
89
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtcitynm.Text = red["City_name"].ToString();
drpstatenm.SelectedItem.Text = red["State_id"].ToString();
}
btnsave.Text = "Updated";
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
using System;
using System.Collections;
90
Stock coding c#
using
using
using
using
using
using
using
using
using
using
using
using
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.Data.SqlClient;
LeeGunn.Web.UI.MessageBox;
publicpartialclassAdmin_stock : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
bindbook();
91
}
protectedvoid bindbook()
{
SqlCommand cmd = newSqlCommand("SP_ReadBooks", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpbooknm.DataSource = cmd.ExecuteReader();
drpbooknm.DataTextField = "Book_name";
drpbooknm.DataValueField = "Book_id";
drpbooknm.DataBind();
closeconn();
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_Readstock", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_stock.DataSource = cmd.ExecuteReader();
Grid_stock.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
SqlCommand cmd = newSqlCommand("SP_Insertstock", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@bookid", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = drpbooknm.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@totalquantity", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txttotqun.Text;
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("data saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updatestock", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@bookid", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = drpbooknm.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@totalquantity", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txttotqun.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@stockid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = ViewState["Stock_id"].ToString();
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("data updated");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
92
}
}
protectedvoid Grid_stock_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Stock_id"] = id;
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
drpbooknm.SelectedItem.Text = red["Book_id"].ToString();
Txttotqun.Text = red["Tot_quantity"].ToString();
}
btnsave.Text = "Update";
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
93
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
drpbooknm.SelectedIndex = 0;
Txttotqun.Text = "";
}
}
Courier coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
publicpartialclassCourier : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
}
}
publicvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("Sp_ReadCourier", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_courier.DataSource = cmd.ExecuteReader();
Grid_courier.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
94
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updatecourier", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
95
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data updated");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid Grid_courier_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Courier_id"] = id;
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtcouriernm.Text = red["Courier_name"].ToString();
Txtdlvrydt.Text = red["Delivery_date"].ToString();
Txtrecvngdt.Text = red["Receiving_date"].ToString();
Txtsource.Text = red["Source"].ToString();
Txtdstntn.Text = red["Destination"].ToString();
}
btnsave.Text = "Updated";
closeconn();
96
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter prm = newSqlParameter("@courierid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = id.ToString();
cmd.Parameters.Add(prm);
openconn();
cmd.ExecuteNonQuery();
cmd.Dispose();
MessageBox.Show("Data deleted");
bindgrid();
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
bindgrid();
}
}
protectedvoid Grid_courier_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button lnkedit = (Button)e.Row.FindControl("lnkedit");
lnkedit.CommandArgument = e.Row.RowIndex.ToString();
Button lnkdelete = (Button)e.Row.FindControl("lnkdelete");
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
Txtcouriernm.Text = "";
Txtdlvrydt.Text = "";
Txtrecvngdt.Text = "";
Txtdstntn.Text = "";
Txtsource.Text = "";
}
}
delivery status coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
97
publicpartialclassAdmin_Customer : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
bindcountry();
bindstate();
bindcity();
}
}
publicvoid bindcountry()
{
SqlCommand cmd = newSqlCommand("Sp_Readcountry", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpcntry.DataSource = cmd.ExecuteReader();
drpcntry.DataTextField = "Country_name";
drpcntry.DataValueField = "Country_id";
drpcntry.DataBind();
closeconn();
}
publicvoid bindstate()
{
SqlCommand cmd = newSqlCommand("SP_ReadState", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpstate.DataSource = cmd.ExecuteReader();
drpstate.DataTextField = "State_name";
drpstate.DataValueField = "State_id";
drpstate.DataBind();
closeconn();
}
publicvoid bindcity()
{
SqlCommand cmd = newSqlCommand("SP_ReadCity", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpcity.DataSource = cmd.ExecuteReader();
drpcity.DataTextField = "City_name";
drpcity.DataValueField = "City_id";
drpcity.DataBind();
closeconn();
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_Readcoustomers", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_customer.DataSource = cmd.ExecuteReader();
Grid_customer.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
if (btnsave.Text == "Save")
{
98
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = newSqlCommand("SP_Insertcoustomers", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@firstname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtfstnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@middlename", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtmdlnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@lastname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtlastnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@contectno", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcntcno.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@emailid", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtemailid.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@address", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtadd.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@countryid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpcntry.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@stateid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpstate.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@cityid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpcity.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@zipcode", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtzipcode.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@dateofpurchase", SqlDbType.DateTime);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtdop.Text;
cmd.Parameters.Add(prm);
string Stat = "";
if (Active.Checked)
Stat = "Yes";
else
Stat = "No.";
99
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updatecoustomers", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@firstname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtfstnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@middlename", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtmdlnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@lastname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtlastnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@contectno", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcntcno.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@emailid", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtemailid.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@address", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtadd.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@countryid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpcntry.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@stateid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpstate.SelectedValue.ToString();
cmd.Parameters.Add(prm);
100
cmd.Parameters.Add(prm);
prm = newSqlParameter("@dateofpurchase", SqlDbType.DateTime);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtdop.Text;
cmd.Parameters.Add(prm);
string Stat = "";
if (Active.Checked)
Stat = "Yes";
else
Stat = "No.";
prm = newSqlParameter("@status", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Stat;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@customerid ", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = ViewState["Cust_id"].ToString();
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Customer updated");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
Txtfstnm.Text = "";
Txtmdlnm.Text = "";
Txtlastnm.Text = "";
Txtcntcno.Text = "";
Txtemailid.Text = "";
Txtadd.Text = "";
drpcntry.SelectedIndex = 0;
drpstate.SelectedIndex = 0;
drpcity.SelectedIndex = 0;
Txtzipcode.Text = "";
Txtdop.Text = "";
Active.Text = "";
}
protectedvoid Grid_customer_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Cust_id"] = id;
101
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtfstnm.Text = red["First_name"].ToString();
Txtmdlnm.Text = red["Middle_name"].ToString();
Txtlastnm.Text = red["Last_name"].ToString();
Txtcntcno.Text = red["Contect_no"].ToString();
Txtemailid.Text = red["Email_id"].ToString();
Txtadd.Text = red["Address"].ToString();
drpcntry.SelectedItem.Text = red["Country_id"].ToString();
drpstate.SelectedItem.Text = red["State_id"].ToString();
drpcity.SelectedItem.Text = red["City_id"].ToString();
Txtzipcode.Text = red["Zip_code"].ToString();
Txtdop.Text = red["Date_of_purchase"].ToString();
}
btnsave.Text = "Update";
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
}
protectedvoid Grid_customer_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button lnkedit = (Button)e.Row.FindControl("lnkedit");
lnkedit.CommandArgument = e.Row.RowIndex.ToString();
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
102
}
}
}
Order Master coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
publicpartialclassAdmin_OrderMaster : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
}
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_Readordermaster", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_ordrmaster.DataSource = cmd.ExecuteReader();
Grid_ordrmaster.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
103
prm.Direction = ParameterDirection.Input;
prm.Value = Txtordrdt.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@description", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtdscpsn.Text;
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("OrderMaster register");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updateordermaster", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@orderdate", SqlDbType.DateTime);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtordrdt.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@description", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtdscpsn.Text;
cmd.Parameters.Add(prm);
104
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("OrderMaster update");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
Txtordrdt.Text = "";
Txtdscpsn.Text = "";
Txttotqun.Text = "";
drpstocknm.SelectedIndex = 0;
}
protectedvoid Grid_ordrmaster_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Order_id"] = id;
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtordrdt.Text = red["Order_date"].ToString();
Txtdscpsn.Text = red["Description"].ToString();
Txttotqun.Text = red["Tot_quntity"].ToString();
drpstocknm.SelectedItem.Text = red["Stock_id"].ToString();
}
btnsave.Text = "Update";
closeconn();
105
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter prm = newSqlParameter("@orderid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = id.ToString();
cmd.Parameters.Add(prm);
openconn();
cmd.ExecuteNonQuery();
cmd.Dispose();
bindgrid();
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid Grid_ordrmaster_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button lnkedit = (Button)e.Row.FindControl("lnkedit");
lnkedit.CommandArgument = e.Row.RowIndex.ToString();
Button lnkdelete = (Button)e.Row.FindControl("lnkdelete");
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
}
Order detail coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
publicpartialclassOrederDetail : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
bindbook();
}
106
}
protectedvoid bindbook()
{
SqlCommand cmd = newSqlCommand("SP_ReadBooks", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpbooknm.DataSource = cmd.ExecuteReader();
drpbooknm.DataTextField = "Book_name";
drpbooknm.DataValueField = "Book_id";
drpbooknm.DataBind();
closeconn();
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_Readorderdetail", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_orderdetail.DataSource = cmd.ExecuteReader();
Grid_orderdetail.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
107
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updateorderdetail", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data updated");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid Grid_orderdetail_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Order_id"] = id;
108
cmd.Parameters.Add(prm);
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
drpbooknm.SelectedItem.Text = red["Book_id"].ToString();
Txttotqun.Text = red["Tot_quantity"].ToString();
Txtprice.Text = red["Price"].ToString();
Txttotamnt.Text = red["Total_amount"].ToString();
}
btnsave.Text = "Updated";
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
109
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
drpbooknm.SelectedIndex = 0;
Txttotqun.Text = "";
Txtprice.Text = "";
Txttotamnt.Text = "";
}
}
Payment coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
publicpartialclassPayment : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
bindcustomer();
bindcourier();
bindbook();
}
110
}
protectedvoid bindcustomer()
{
SqlCommand cmd = newSqlCommand("SP_Readcoustomers", con);
cmd.CommandType = CommandType.StoredProcedure;
opneconn();
drpcstmrnm.DataSource = cmd.ExecuteReader();
drpcstmrnm.DataTextField = "Cust_id";
drpcstmrnm.DataBind();
closeconn();
}
protectedvoid bindcourier()
{
SqlCommand cmd = newSqlCommand("Sp_ReadCourier", con);
cmd.CommandType = CommandType.StoredProcedure;
opneconn();
drpcouriernm.DataSource = cmd.ExecuteReader();
drpcouriernm.DataTextField = "Courier_name";
drpcouriernm.DataValueField = "Courier_id";
drpcouriernm.DataBind();
closeconn();
}
protectedvoid bindbook()
{
SqlCommand cmd = newSqlCommand("SP_ReadBooks", con);
cmd.CommandType = CommandType.StoredProcedure;
opneconn();
drpbooknm.DataSource = cmd.ExecuteReader();
drpbooknm.DataTextField = "Book_name";
drpbooknm.DataValueField = "Book_id";
drpbooknm.DataBind();
closeconn();
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_Readpayment", con);
cmd.CommandType = CommandType.StoredProcedure;
opneconn();
Grid_payment.DataSource = cmd.ExecuteReader();
Grid_payment.DataBind();
closeconn();
}
protectedvoid opneconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
111
prm.Direction = ParameterDirection.Input;
prm.Value = drpcouriernm.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@bookid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpbooknm.SelectedValue.ToString();
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updatepayment", con);
cmd.CommandType = CommandType.StoredProcedure;
opneconn();
112
}
}
}
protectedvoid Grid_payment_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Slip_no"] = id;
opneconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtpymnttyp.Text = red["payment_type"].ToString();
TxtTotpymnt.Text = red["Total_payment"].ToString();
Txtbanknm.Text = red["Bank_name"].ToString();
Txtbrnchnm.Text = red["Branch_name"].ToString();
Txtdop.Text = red["Date_of_payment"].ToString();
Txtchqdt.Text = red["Cheque_date"].ToString();
Txtchqno.Text = red["Cheque_No"].ToString();
drpcstmrnm.SelectedItem.Text = red["Cust_Id"].ToString();
drpcouriernm.SelectedItem.Text = red["Courier_id"].ToString();
drpbooknm.SelectedItem.Text = red["Book_id"].ToString();
113
}
btnsave.Text = "Updated";
closeconn();
114
publication coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using
using
using
using
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Data.SqlClient;
LeeGunn.Web.UI.MessageBox;
publicpartialclassAdmin_Publication : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
bindcategory();
}
}
protectedvoid bindcategory()
{
SqlCommand cmd = newSqlCommand("SP_ReadCategorys", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpcatnm.DataSource = cmd.ExecuteReader();
drpcatnm.DataTextField = "Cate_name";
drpcatnm.DataValueField = "Cate_id";
drpcatnm.DataBind();
closeconn();
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_Readpublication", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_publication.DataSource = cmd.ExecuteReader();
Grid_publication.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
SqlCommand cmd = newSqlCommand("SP_Insertpublication", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
115
prm.Direction = ParameterDirection.Input;
prm.Value = Txtpublctnnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@price", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtprice.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@address", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtadd.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@emailid", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtemailid.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@contectno", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcntcno.Text;
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updatepublication", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
116
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data updated");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
drpcatnm.SelectedIndex = 0;
Txtpublctnnm.Text = "";
Txtprice.Text = "";
Txtadd.Text = "";
Txtemailid.Text = "";
Txtcntcno.Text = "";
}
protectedvoid Grid_publication_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Pub_id"] = id;
117
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
drpcatnm.SelectedItem.Text = red["cate_id"].ToString();
Txtpublctnnm.Text = red["Pub_name"].ToString();
Txtprice.Text = red["price"].ToString();
Txtadd.Text = red["Address"].ToString();
Txtemailid.Text = red["Email_id"].ToString();
Txtcntcno.Text = red["Contect_no"].ToString();
btnsave.Text = "Updated";
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
118
publicpartialclassAdmin_Purchase : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindorder();
bindcustomer();
bindsupplier();
bindgrid();
}
}
publicvoid bindorder()
{
SqlCommand cmd = newSqlCommand("SP_Readordermaster", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpordernm.DataSource = cmd.ExecuteReader();
drpordernm.DataValueField = "Order_id";
drpordernm.DataBind();
closeconn();
}
publicvoid bindcustomer()
{
SqlCommand cmd = newSqlCommand("SP_Readcoustomers", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpcstmrnm.DataSource = cmd.ExecuteReader();
drpcstmrnm.DataValueField = "Cust_id";
drpcstmrnm.DataBind();
closeconn();
}
publicvoid bindsupplier()
{
SqlCommand cmd = newSqlCommand("SP_Readsupplier", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpsplrnm.DataSource = cmd.ExecuteReader();
//drpsplrnm.DataTextField = "Sup_name";
drpsplrnm.DataValueField = "Sup_id";
drpsplrnm.DataBind();
closeconn();
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_Readpurchase", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_purchase.DataSource = cmd.ExecuteReader();
Grid_purchase.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
119
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
SqlCommand cmd = newSqlCommand("SP_Insertpurchase");
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@purchasename", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtprchsnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@orderid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpordernm.SelectedValue.ToString();
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updatepurchase");
cmd.CommandType = CommandType.StoredProcedure;
openconn();
120
}
}
}
121
ViewState["Pur_id"] = id;
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtprchsnm.Text = red["Pur_name"].ToString();
drpsplrnm.SelectedItem.Text = red["Order_id"].ToString();
Txttotpymnt.Text = red["Tot_payment"].ToString();
Txttotqun.Text = red["Tot_quantity"].ToString();
drpcstmrnm.SelectedItem.Text = red["Cus_id"].ToString();
drpsplrnm.SelectedItem.Text = red["Sup_id"].ToString();
Txtdop.Text = red["Date_Of_purchase"].ToString();
}
btnsave.Text = "Update";
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
}
122
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
Txtprchsnm.Text = "";
drpordernm.SelectedIndex = 0;
Txttotpymnt.Text = "";
Txttotqun.Text = "";
drpcstmrnm.SelectedIndex = 0;
drpsplrnm.SelectedIndex = 0;
Txtdop.Text = "";
}
}
state coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
publicpartialclassAdmin_state : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
bindcountry();
}
123
}
publicvoid bindcountry()
{
SqlCommand cmd = newSqlCommand("Sp_Readcountry", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpcntrynm.DataSource = cmd.ExecuteReader();
drpcntrynm.DataTextField = "Country_name";
drpcntrynm.DataValueField = "Country_id";
drpcntrynm.DataBind();
closeconn();
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_ReadState", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_state.DataSource = cmd.ExecuteReader();
Grid_state.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data Saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updateState", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@statename", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtstatenm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@countryid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpcntrynm.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@stateid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = ViewState["State_id"].ToString();
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
124
closeconn();
MessageBox.Show("Data updated");
bindgrid();
ViewState["State_id"] = id;
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtstatenm.Text = red["State_name"].ToString();
drpcntrynm.SelectedItem.Text = red["Country_id"].ToString();
}
btnsave.Text = "Updated";
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
125
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
bindgrid();
}
}
protectedvoid Grid_state_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button lnkedit = (Button)e.Row.FindControl("lnkedit");
lnkedit.CommandArgument = e.Row.RowIndex.ToString();
Button lnkdelete = (Button)e.Row.FindControl("lnkdelete");
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
}
Subject coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
publicpartialclassAdmin_Subject : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
bindgrid();
bindpublication();
}
}
protectedvoid bindpublication()
{
SqlCommand cmd = newSqlCommand("SP_Readpublication", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drppubnm.DataSource = cmd.ExecuteReader();
drppubnm.DataValueField = "Pub_id";
drppubnm.DataBind();
closeconn();
126
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_Readsubject", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_subject.DataSource = cmd.ExecuteReader();
Grid_subject.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
SqlCommand cmd = newSqlCommand("SP_Insertsubject", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@subjectname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtsubnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@authorname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtauthrnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@publicationid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drppubnm.SelectedValue.ToString();
cmd.Parameters.Add(prm);
cmd.ExecuteNonQuery();
closeconn();
MessageBox.Show("Data Saved");
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
else
{
try
{
SqlCommand cmd = newSqlCommand("SP_updatesubject", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@subjectname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtsubnm.Text;
cmd.Parameters.Add(prm);
127
ViewState["Sub_id"] = id;
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtsubnm.Text = red["Sub_name"].ToString();
Txtauthrnm.Text = red["Author_name"].ToString();
drppubnm.SelectedItem.Text = red["Pub_id"].ToString();
}
btnsave.Text = "Updated";
closeconn();
128
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
}
protectedvoid Grid_subject_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button lnkedit = (Button)e.Row.FindControl("lnkedit");
lnkedit.CommandArgument = e.Row.RowIndex.ToString();
Button lnkdelete = (Button)e.Row.FindControl("lnkdelete");
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
Txtsubnm.Text = "";
Txtauthrnm.Text = "";
drppubnm.SelectedIndex = 0;
btnsave.Text = "Save";
}
}
Supplier coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using LeeGunn.Web.UI.MessageBox;
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
129
publicpartialclassAdmin_Supplier : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bindgrid();
bindcountry();
bindstate();
bindcity();
}
}
protectedvoid bindcountry()
{
SqlCommand cmd = newSqlCommand("Sp_Readcountry", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpcntry.DataSource = cmd.ExecuteReader();
drpcntry.DataTextField = "Country_name";
drpcntry.DataValueField = "Country_id";
drpcntry.DataBind();
closeconn();
130
}
protectedvoid bindstate()
{
SqlCommand cmd = newSqlCommand("SP_ReadState", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpstate.DataSource = cmd.ExecuteReader();
drpstate.DataTextField = "State_name";
drpstate.DataValueField = "State_id";
drpstate.DataBind();
closeconn();
}
protectedvoid bindcity()
{
SqlCommand cmd = newSqlCommand("SP_ReadCity", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
drpcity.DataSource = cmd.ExecuteReader();
drpcity.DataTextField = "City_name";
drpcity.DataValueField = "City_id";
drpcity.DataBind();
closeconn();
}
protectedvoid bindgrid()
{
SqlCommand cmd = newSqlCommand("SP_Readsupplier", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
Grid_supplier.DataSource = cmd.ExecuteReader();
Grid_supplier.DataBind();
closeconn();
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid btnsave_Click(object sender, EventArgs e)
{
if (btnsave.Text == "Save")
{
try
{
else
{
131
}
}
try
{
SqlCommand cmd = newSqlCommand("SP_updatesupplier", con);
cmd.CommandType = CommandType.StoredProcedure;
openconn();
SqlParameter prm = newSqlParameter("@suppliername", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtsplrnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@contectpersonname", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcntctprsnnm.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@address", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtadd.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@contectno", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtcntctno.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@mobileno", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtmobno.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@emailid", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtemailid.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@gender", SqlDbType.VarChar);
prm.Direction = ParameterDirection.Input;
prm.Value = RadioButtonList1.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@countryid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpcntry.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@stateid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpstate.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@cityid", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = drpcity.SelectedValue.ToString();
cmd.Parameters.Add(prm);
prm = newSqlParameter("@zipcode", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = Txtzipcode.Text;
cmd.Parameters.Add(prm);
prm = newSqlParameter("@supplierid ", SqlDbType.Int);
prm.Direction = ParameterDirection.Input;
prm.Value = ViewState["Sup_id"].ToString();
cmd.Parameters.Add(prm);
closeconn();
MessageBox.Show("Data updated");
132
cmd.ExecuteNonQuery();
bindgrid();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
}
protectedvoid Grid_supplier_RowCommand(object sender, GridViewCommandEventArgs e)
{
int id = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Edits")
{
try
{
ViewState["Sup_id"] = id;
openconn();
SqlDataReader red;
red = cmd.ExecuteReader();
while (red.Read())
{
Txtsplrnm.Text = red["Sup_name"].ToString();
Txtcntctprsnnm.Text = red["ContectPerson_name"].ToString();
Txtadd.Text = red["Address"].ToString();
Txtcntctno.Text = red["Contect_no"].ToString();
Txtmobno.Text = red["Mobile_no"].ToString();
Txtemailid.Text = red["Email_id"].ToString();
RadioButtonList1.Text = red["Gender"].ToString();
drpcntry.SelectedItem.Text = red["Country_id"].ToString();
drpstate.SelectedItem.Text = red["State_id"].ToString();
drpcity.SelectedItem.Text = red["City_id"].ToString();
Txtzipcode.Text = red["Zip_code"].ToString();
}
btnsave.Text = "Updated";
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
if (e.CommandName == "Deletes")
{
try
{
133
cmd.Parameters.Add(prm);
openconn();
cmd.ExecuteNonQuery();
cmd.Dispose();
MessageBox.Show("Data deleted");
bindgrid();
closeconn();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
bindgrid();
}
}
protectedvoid Grid_supplier_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Button lnkedit = (Button)e.Row.FindControl("lnkedit");
lnkedit.CommandArgument = e.Row.RowIndex.ToString();
Button lnkdelete = (Button)e.Row.FindControl("lnkdelete");
lnkdelete.CommandArgument = e.Row.RowIndex.ToString();
}
}
protectedvoid btnreset_Click(object sender, EventArgs e)
{
Txtsplrnm.Text = "";
Txtcntctprsnnm.Text = "";
Txtadd.Text = "";
Txtcntctno.Text = "";
Txtmobno.Text = "";
Txtemailid.Text = "";
RadioButtonList1.Text = "";
drpcntry.SelectedIndex = 0;
drpstate.SelectedIndex = 0;
drpcity.SelectedIndex = 0;
Txtzipcode.Text = "";
}
}
Subcategory coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
134
publicpartialclassclient_welcome : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
string strg = "select Cate_id, Cate_name from Category";
SqlCommand cmd = newSqlCommand(strg, con);
openconn();
SqlDataReader dr = cmd.ExecuteReader();
DataList1.DataSource = dr;
DataList1.DataBind();
dr.Close();
cmd.Dispose();
closeconn();
}
}
protectedvoid openconn()
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid DataList1_SelectedIndexChanged(object sender, EventArgs e)
{
}
protectedvoid DataList1_SelectedIndexChanged1(object sender, EventArgs e)
{
Response.Redirect("Category.aspx");
}
protectedvoid DataList1_ItemCreated(object sender, DataListItemEventArgs e)
{
}
protectedvoid DataList1_ItemCommand(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "view")
{
Label category = (Label)e.Item.FindControl("lblid");
string query = "";
query += "CategoryId=" + category.Text + "";
Response.Redirect("Publication.aspx?Category=" + category.Text);
}
}
}
bookPublicatin detail coding c#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
135
publicpartialclassclient_subcategory : System.Web.UI.Page
{
publicstaticSqlConnection con;
publicstaticString str1;
protectedvoid Page_Load(object sender, EventArgs e)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
str1 = Convert.ToString(Request.QueryString["Category"]);
136
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
str1 = Request.QueryString["Publication"].ToString();
string
strg
=
"select
b.Book_id,b.Book_name,b.ImageName,b.Pub_id,b.Status
,c.Cate_id,c.Cate_name,p.Pub_id,p.price
from
Book
b,Category
c,Publication
p
where
c.Cate_id=p.cate_id and b.Cat_id=c.Cate_id and b.Cat_id='" + str1 + "'";
SqlCommand cmd = newSqlCommand(strg, con);
opneconn();
SqlDataReader dr = cmd.ExecuteReader();
DataList2.DataSource = dr;
DataList2.DataBind();
dr.Close();
cmd.Dispose();
closeconn();
}
}
protectedvoid opneconn()
{
if (con.State == System.Data.ConnectionState.Open)
{
con.Close();
}
con.Open();
}
protectedvoid closeconn()
{
con.Close();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
// Response.Redirect("OrderDetail.aspx");
}
protectedvoid DataList2_ItemCommand(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "View")
{
Label publication = (Label)e.Item.FindControl("lblpublicationid");
string query="";
query += "publicationid=" + publication.Text + "";
Response.Redirect("OrderDetail.aspx?publicationid=" + publication.Text);
}
}
protectedvoid DataList2_SelectedIndexChanged(object sender, EventArgs e)
{
// Response.Redirect("OrderDetail.aspx");
}
}
publicpartialclassAdmin_Bookwisereport : System.Web.UI.Page
{
publicstaticSqlConnection con;
137
}
}
138
publicpartialclassCategorywisereport : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
con.Open();
bindtempcategory();
protectedvoid bindtempcategory()
{
SqlCommand cmd;
cmd = newSqlCommand("select Serial_no,Category_Name from tempcategory", con);
cmd.CommandType = CommandType.Text;
SqlDataReader red = cmd.ExecuteReader();
drpcatnm.DataSource = red;
drpcatnm.DataTextField = "Category_Name";
drpcatnm.DataBind();
red.Close();
cmd.Dispose();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
SqlCommand
cmd
=
newSqlCommand("Select
Category_Name,Quantity,price,Tot_quantity
tempcategory where Category_Name='" + drpcatnm.SelectedItem.Text + "'", con);
SqlDataReader red = cmd.ExecuteReader();
GridView1.DataSource = red;
GridView1.DataBind();
red.Close();
cmd.Dispose();
}
}
from
System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.Data.SqlClient;
publicpartialclassAdmin_Dailyreport : System.Web.UI.Page
{
publicstaticSqlConnection con;
protectedvoid Page_Load(object sender, EventArgs e)
{
con
=
newSqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["myproject_con"].ToS
tring());
con.Open();
}
protectedvoid Button1_Click(object sender, EventArgs e)
{
SqlCommand cmd = newSqlCommand("Select * from OrderMaster where Order_date='" + Txtordrdt.Text +
"'", con);
SqlDataReader red = cmd.ExecuteReader();
GridView1.DataSource = red;
GridView1.DataBind();
red.Close();
cmd.Dispose();
}
}
139
11.2 Code Efficiency :Efficiency is the amount of computing resources and code required by a program to
perform its functions. Efficient codes are required for the better performance of the
system. Efficient coding makes a system robust. A method is robust if it does not fail
even if it receives improper parameters. Robustness against internal bugs may be trade
off against efficiency.
The need for efficiency arises due to the cost of consideration. If some resources are
scarce and expensive, it is desirable that those resources should be used efficiently. In
the computer system the resources the most often considered for efficiency are
processor time and less memory. This coding for the system has been started after
completing the design phase, because all software methodologies emphasize the
importance of first designing then coding. The codes that construct this system are
structured, modular, efficient, and require less amount of computing resources.
All functions of this system are understandable since the functions are small and
coherent. Functions and variables are meaningful variable names to increase the
readability and avoided abbreviations that may confuse the users.
In order to execute the database queries faster used the following methods. During the
retrieval of data from the database using SELECT statement all the known conditions
are specified in the WHERE clause.
If we want to find the maximum, minimum, sum and average value or the count of a
database column, use a Select list with aggregate functions instead of computing the
aggregates within the program. The RDBMS is responsible for aggregated
computations instead of transferring large amount of data to the application. Overall
network, application server and database load is also considerably less. Simplicity and
clarity are the main properties of the coding.
140
usage of that code, at least he/she has to look out onto most of the
probabilistic events or conditions or specifications that can occurr.
The most usage of any function can also be cleared prior to making
them, then only one can develop the general purpose code which
can be said as optimization of code. So ultimately code must be
reusable.
141
[12]
Testing
142
143
all else fails) gracefully terminate an affected application and save the error information
to a log file.
Create a set of erroneous transactions and enter them into the application
system then find out whether the system is able to identify the problems.
Using iterative testing enters transactions and trap errors. Correct them. Then
enter transactions with errors, which were not present in the system earlier.
In programming, a development error is one that can be prevented. Such an error can
occur in syntax or logic. Syntax errors, which are typographical mistakes or improper
use of special characters, are handled by rigorous proofreading.
A run-time error takes place during the execution of a program, and usually happens
because of adverse system parameters or invalid input data. An example is the lack of
sufficient memory to run an application or a memory conflict with another program. On
the Internet, run-time errors can result from electrical noise, various forms of malware or
an exceptionally heavy demand on a server. Run-time errors can be resolved, or their
impact minimized, by the use of error handler programs, by vigilance on the part of
network and server administrators, and by reasonable security countermeasures on the
part of Internet users.
White Box
144
White box testing is a security testing method that can be used to validate whether code
implementation follows intended design, to validate implemented security functionality,
and to uncover exploitable vulnerabilities.
White box testing requires knowing what makes software secure or insecure, how to
think like an attacker, and how to use different testing tools and techniques. The first
step in white box testing is to comprehend and analyze source code, so knowing what
makes software secure is a fundamental requirement. Second, to create tests that
exploit software, a tester must think like an attacker. Third, to perform testing effectively,
testers need to know the different tools and techniques available for white box testing.
The three requirements do not work in isolation, but together.
Unit testing
In computer programming, unit testing is a procedure used to validate that individual
units of source code are working properly. A unit is the smallest testable part of an
application. In procedural programming a unit may be an individual program, function,
procedure, etc., while in object-oriented programming, the smallest unit is a method;
which may belong to a base/super class, abstract class or derived/child class.
Ideally, each test case is independent from the others; mock objects and test harnesses
can be used to assist testing a module in isolation. Unit testing is typically done by
developers and not by Software testers or end-users.
Performance Testing
System performance is generally assessed in terms of response time and throughput
rates under differing processing and configuration conditions. To attack the performance
problems, there are several questions should be asked first:
How much application logic should be remotely executed?
How much updating should be done to the database server over the network
from the client workstation?
How much data should be sent to each in each transaction?
Performance testing can verify that a system meets the specifications claimed by its
manufacturer or vendor. The process can compare two or more devices or programs in
terms of parameters such as speed, data transfer rate, bandwidth, throughput,
efficiency or reliability.
Slow data transfer rate may be inherent in hardware but can also result from softwarerelated problems, such as:
Too many applications running at the same time
A corrupted file in a Web browser
A security exploit
Heavy-handed antivirus software
The existence of active malware on the hard disk.
Effective performance testing can quickly identify the nature or location of a softwarerelated performance problem.
145
TC-01
:
:
:
Procedure
Expected
Outcome
TC-02
:
:
:
Procedure
Unit Test
Add new user information to the database.
Add New User option from the home page
accessible by the user.
1. Input user information such as Uesr name, type,
address, contact no, email etc
2. Click on Submit button. 3. A confirm message
will appear. Click Ok button to store
the entered user information in the database.
The information relating to the newly added user
should be displayed in the User Information page
by the admin.
Unit Test
Display book information
Homepage
1. Check books
homepage.
and
categories
section
in
146
TC-03
:
:
:
Procedure
Expected
Outcome
TC-04
:
:
:
Procedure
1.
2.
3.
4.
Expected
Outcome
Unit Test
Login/User registration
Login page
1. Create test user account
2. Login using the same test account
credential
3. Use mismatched credentials for test the
validation
1. If the user credentials are match with DB,
redirects to user account page
2. If test account user credentials are wrong,
output invalid message
3. For registration, all input values should be
validated such as phone no, email id should be in
format
Unit Test
Shopping cart
Main page, shopping cart page
Click on Add to Cart button
Add more products/books to cart
Open the cart page and test
Check the top box which displays number of
books added to cart and quantity
147
Test Reports
Test Case
Date
No
Pass/Fail
Comments
TC-01
12-Jan-13
PASS
TC-02
23-Jan-13
PASS
PASS
PASS
TC-03
TC-04
25-jan-13
1-Feb-13
148
[13]
Validation Checks
149
Security Mechanism:
To Valid means totally accepted so validation checks indicate, to check
whether the entered data is totally acceptable or not before actual insertion into the
database.
1.
All text fields that integers, as inputs will be validated so that only the digits
are allowed.
2.
All text fields that take inputs as alphanumeric will be validated, so that only
alphabets are taken as parameters for input.
3.
All fields that are mapped to primary key, will be validated so that the data is not
stored as NULL
in the required fields.
Before storing the data, all fields that take in NULL are store values as NULL.
6.
All Date field values are stored as dd-mmm-yyyy format and will be
consistent through the system.
7.
8.
9.
150
[14]
Cost Estimation
151
Cost Estimation
Estimation is an integral part of the software development process and should not be
taken lightly. A well-planned and well-estimated project is likely to be completed in time.
Incomplete and inaccurate documentation may pose serious hurdles to the success of a
software project. Software estimation is an important part of the software development
process. Underestimating software project and under staffing it often leads to low quality
deliverables, and the project misses the target deadline to customer dissatisfaction and
loss of credibility to the company. The cost of a project is derived not only from the
estimates of effort and size but from other parameters such as hardware, travel
expenses, telecommunication costs, training cost etc. Should also be taken into
account. The cost estimation of Oline Book Store as follows:
Cost
Development Cost
20,000.00 /-
21,000.00 /-
Broadband Connection
600.00 /- Per
Months
Training Cost
7,000.00 /-
Total Cost
38,600.00 /-
152
[15]
Reports
153
Report
154
155
Daily Report
156
[16]
Number of Modules
157
2) Search:
A search by keyword option is provided to the user using a textbox .The keyword to
be entered should be the book title.
3) Advanced Search:
Advanced search helps the user to search for a book based on Title, Author,
Category and price range. All the books which match the particular search criteria and
their total count
will be displayed. From here the user can select a book and add to
the shopping cart.
4) Book Description:
If the user would like to know details about a book he can click on the title from
where he will be directed to a Book description page. It includes the notes on the book
content and also a link to Amazon.com to get the book review.
5) User Voting:
The user can give rating to a book based on his interest. He can rate it by giving
a score of five as Excellent, four for very good, three for good, two for regular and one
for deficient. The final rating of a book will depend on all the individual user rating.
6) Shopping Cart:
158
The user can manage a shopping cart which will include all the books he
selected. The user can edit, delete and update his shopping cart. A final shopping cart
summary is displayed which includes all the items the user selected and the final total
cost.
8) Administration:
The Administrator will be provided with special functionalities like
- Add or delete a book category
- Add or delete a member
- Manage member orders.
- Add or delete a Credit Card type.
159
[17]
Charts & Schedules
160
161
Gantt Chart
1 weeks
1 weeks
5 week
8 weeks
3 weeks
1 week
week
PRELIMINARY
INVESTIGATION &
FEASIBILITY
STUDY
ANALYSIS
Feasibility Study
DESIGNING
Verification
Menu Design
Data Base Design
CODING
TESTING
Unit Testing
Combined Module
Testing
IMPLEMENTATION
162
Schedules:-
Early Start
Late Start
Early Start
Duration
Analysis
Early Finish
Slack
Late Finish
Duration
Early Finish
Feasibility Study
Late Start
Slack
Late Finish
Early Start
Duration
Early Finish
Late Start
Slack
Late Finish
Early Start
Duration
Early Finish
Requirement Spec
Late Start
Slack
Late Finish
Early Start
Duration
Early Finish
Late Start
Early Start
Late Start
Design
Slack
Late Finish
Duration
Early Finish
Coding
Slack
Late Finish
Analysis(50 Days)
01-OCT-2014
Actual Start
20-NOV-2014
Actual Finish
21-NOV-2014
Actual Start
15-DEC-2014
Actual Finish
15-DEC-2014
Actual Start
30-DEC-2014
Actual Finish
01-JAN-2015
Actual Start
03-JAN-2015
Actual Finish
Design(30 Days)
04-JAN-2015
Actual Start
04-FEB-2015
Actual Finish
Coding(32 Days)
06-FEB-2015
Actual Start
08-MAR-2015
Actual Finish
163
[18]
Tools & Platform Used In
Project
164
Hardware Specification:
C.P.U.:
2.1 GHz
Monitor:
CRT/TFT/LED
RAM:
2 GB and higher
Processor:
Intel- I-3 and higher
Hard disk:
120 GB and higher
CDROM:
CD/DVD writer and USB
Keyboard
Mouse
165
2. Software Specification :
Asp.Net: (code behind C#)
166
[19]
Future Scope of the Project
167
Future Scope Of The Project: Just Now my system does not support Mobile Computing.
My system does not provide the SMS alert system.
Does not provide the soft copy of Book in computing system.
Limitation of Book system does not provide online reading or downloading the
books.
Does not provide online Banking transaction on A/c System.
168
[20]
References & Bibliography
169
http://msdn.microsoft.com
Help for Microsoft Code
5
http://codeproject.com
Help for C# Code
IEEE
Std
1016-1998
:
IEEE
Software Engineering Standards Committee
Recommended practice for Software
of the IEEE Society
Design Descriptions
IEEE Std 829-1998 : IEEE Standard for Software Engineering Standards Committee
Software Test Documentation
of the IEEE Society
IEEE Std 1016-1998 : IEEE Standard for Software Engineering Standards Committee
Software Unit Testing
of the IEEE Society
10
IEEE Std 1063-2001 : IEEE Standard for Software Engineering Standards Committee
Software User Documentation
of the IEEE Society
170
[21]
Synopsis
171
Synopsis
2015
172
Index
Chapter 1:Title of Project
Chapter 2:Introduction & Objective of the project
Chapter 3: Project Category
Chapter 4: Requirement of Analysis
4.1 Data Flow Diagram
4.2 ER Diagram
4.3 Data Model Diagram
Chapter 5: Number of Modules
Chapter 6: Data Structure
Chapter 7: Process Logic
Chapter 8: Types of Output/Report Generation
Chapter 9: Security Mechanism
Chapter 10: Tools & Platform used in Project
Chapter 11: Future Scope of the Project
173
174
Introduction:-
Online Book Store is a ecommerce website for bookstore which provides online
books shopping for user customers and customers can view the orders and the status
of the order using login dashboards. This website has option of administrator who can
add books, view orders and update the status of the orders which customers can see
through his login order page.
Using the system users or customers can view the stores available books
and can place orders through shopping cart. On checkout time user can register or
existing user can use their existing credentials proceed the checkout. There will be
different payment options to choose to place the orders. Using login section, Customers
can view placed orders and the status of the orders whether it is delivered or still
processing from admin side.
This system has administration section where admin can access all orders,
add/view/edit books to the shopping portal. As of now, the system offers only cash on
delivery and DD/Cheque on delivery options.
Background :Online Book Store: An ecommerce website for bookstore is based on B2C project. This
project has been composed on three major strands: Data collection from customer,
administrative process for delivery and revision of report. This online store is mainly a
shopping cart for customers and real time inventory control for admin with administration
panel. Admin has proper report on orders and inventory.
As per the follow-up to the project after the implementing multiple online-payment
options through Google Checkout, PayPal and etc.
175
Objective: Proposed online Book Store Management system provides very easy
of buying Books.
process
176
177
Place Order
Make Payment
Customer
Get Book,
Bill,Receipt
Online
Book Store
Management
System
Get Payment
Dispetch Order
Admin
178
Admin
1.0
Admin
Customer
2.0
Get Books
Get Reports
3.0
Purchase
Make the Payment
the P
u
Deta blisher
ils
se
rch etails
u
P D
the ook
d
B
n
Se sher
i
bl
the
Pu Send etails
lier D
Supp
Send
the
Book Purchse
Deta
ils
4.0
Print The reports
Reports
Get Report
Book
Book Sales
Get Book
Admin
Sales
les
e Sa
h
t
d
ils
Sen
Deta
Book
Send
Supplier
Customer
e
hs
c
r
Pu
he ort
t
nd Rep
Se
der
e Or
h
t
d
Sen ports
Re
Se
Paym nd the
ent R
epor
t
Publisher
Supplier
Purchase
Order
Payment
179
Customer
Send the customer details
Customer
1.1
Customer
Details
Deliver To Customeer
Book
Search
Get the
data
G
Pu et th
bli
e
De catio
tai
ls n
Order of
books
1.3
Order
Order
Payment
Publication
Order Status
1.5
1.4
Dispatch
Payment
Payment
Deatils
Payment
180
Admin
Book
Admin
Send the customer details
2.1
Table
Selection
Customer
Confirm to User
Table
Manage
Ge
Get the
data
tP
ub
lica
tio
et
Correct the
data
Book
nd
Publication
us
ls
tat
ils
ai
r S Deta
et
ta
de
t
rd
da t Or
en
er Ge aym
tP
et
de
or
ata
rd
2.3
Ge
DataEntry
Order
Deatils
Validate
the Data
Order
Order Status
2.5
2.4
Validation
Payment
Storage
Store Payment data
Store Order Status data
Store Order data
181
us
4.1
Get C
Report
Selection
Get C
ata
Categories
Ge gories De
tails
tB
oo
kD
Ge
eta
tP
ils
ub
lica
Book
tio
nD
ata
et
Prepare Report
Datat
tail Customer
r de
tome
et
Order Details
us
tat
rS
tails
nt De
ayme
4.3
Get P
Finally report
Check & Print
rde
tO
Ge
ata
rD
rde
Report
Prepration
Publication
ls
ai
to
4.2
Ge
er
rd
Admin
Order
Order Status
Report
Print
Payment
182
4.2 ER Diagram
Cust_Id
Purchse_Id
Email_Id
Customer
Cust_Nm
Cust_Id
Fill
Register Details
1
Order_Id
Area
Address
Totquantity
Cust_Nm
Address
Area
Email_Id
M
Order
Make
Slip_No
Cust_Id
Book_Id
Order Details
Sup_Id
Book_Nm
Price
TotAmount
Sup_Nm
ContactPers
on_Nm
Book_Id
M
M
Book
Payment
M
ChequeDate
Bank_Nm
1
Supplier
Supply
M
Address
Searchkey
Contact_No
Email_Id
Publish
By
Receipt
Pub_Id
Pub_Nm
1
Purchase
Publisher
Price
Id
1
Admin
AdminName
Usertype
Address
Contact_No
Order_Id
Order_date
UserNM
Generates
Description
Order
Totquantity
Stock_Id
183
State
PK,I3
State_Id
State_Nm
FK1,I2,I1 Country_Id
Courier
Customer
PK Courier_Id
PK,I5
City
Cust_Id
PK,I1
Courier_Nm
Delivery_Date
Receiving_Date
Source
Destination
Payment
Stock
PK,I2
Stock_Id
FK1,I1 Book_Id
Totquantity
Order
PK,I1
Order_Id
First_Nm
Middle_Nm
Last_Nm
Contact_No
I6
Email_Id
Address
Gender
FK2,I4,I3 Country_Id
FK3,I8,I7 State_Id
FK1,I1,I2 City_ID
Purchase_Date
PK
Slip_No
Payment_Type
TotPayment
Bank_Nm
Branch_Nm
Date_Of_Payment
Cheque_Date
Cheque_No
FK3,I6,I5 Cust_Id
FK2,I4,I3 Courier_Id
FK1,I2,I1 Book_Id
Delivery_Status
PK,I4
Status_Id
I1
Courier_Id
Date_Of_Purchase
Source
Destination
FK1,I3,I2 Cust_Id
Order_Date
Description
Totquantity
FK1,I3,I2 Stock_Id
Order_Detail
City_Id
City_Nm
FK1,I3,I2 State_Id
Publication
PK,I6
Admin
PK,I6
Id
User_Nm
Password
User_type
I5
Email_Id
First_Nm
Middle_Nm
Last_Nm
Contact_No
Address
Gender
FK2,I4,I3 Country_Id
FK3,I8,I7 State_Id
FK1,I2,I1 City_Id
I9
Zipcode
Pub_Id
Pub_Nm
Price
Address
I5
Email_Id
Contact_No
Mobile_No
FK2,I4,I3 Country_Id
FK3,I8,I7 State_Id
FK1,I2,I1 City_Id
I9
Zipcode
Supplier
PK,I5 Sup_Id
Subject
PK,I3
Sub_Id
Sub_Nm
Author_Nm
FK1,I2,I1 Pub_Id
I3
I2
I4
I1
I6
Sup_Nm
ContactPerson_Nm
Address
Contact_No
Mobile_No
Email_Id
Gender
Country_Id
State_Id
City_Id
Zipcode
Purchase
PK,I5
Pur_Id
Category
FK2,I4,I3 Order_Id
FK1,I2,I1 Book_Id
Totquantity
Price
TotAmount
Pur_Nm
FK2,I4,I3 Order_Id
TotPayment
Totquantity
FK1,I2,I1 Cust_Id
FK3,I7,I6 Sup_Id
Date_Of_Purchase
PK,I1 Cate_Id
Cate_Nm
Description
Purchase_Details
PK,I5
Trans_Id
FK2,I4,I3 Pur_Id
FK1,I2,I1 Book_Id
Quantity
Price
184
2) Search:
A search by keyword option is provided to the user using a textbox .The keyword to
be entered should be the book title.
3) Advanced Search:
Advanced search helps the user to search for a book based on Title, Author,
Category and price range. All the books which match the particular search criteria and
their total count
will be displayed. From here the user can select a book and add to
the shopping cart.
4) Book Description:
If the user would like to know details about a book he can click on the title from
where he will be directed to a Book description page. It includes the notes on the book
content and also a link to Amazon.com to get the book review.
5) User Voting:
The user can give rating to a book based on his interest. He can rate it by giving
a score of five as Excellent, four for very good, three for good, two for regular and one
for deficient. The final rating of a book will depend on all the individual user rating.
6) Shopping Cart:
185
The user can manage a shopping cart which will include all the books he
selected. The user can edit, delete and update his shopping cart. A final shopping cart
summary is displayed which includes all the items the user selected and the final total
cost.
8) Administration:
The Administrator will be provided with special functionalities like
- Add or delete a book category
- Add or delete a member
- Manage member orders.
- Add or delete a Credit Card type.
186
1.Admin:
FieldName
Id
User_Nm
Password
User_type
Email_Id
First_Nm
Middle_Nm
Last_Nm
Contact_No
Address
Gender
Country_Id
State_Id
City_Id
ZipCode
Size
10
30
18
20
50
20
20
20
12
50
10
10
10
10
10
DataType
Numeric
Varchar
Varchar
Varchar
Varchar
Varchar
Varchar
Varchar
Numeric
Varchar
Char
Numeric
Numeric
Numeric
Numeric
Validation
PrimaryKey
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Foreignkey
Foreignkey
Foreignkey
Not null
2.Book:
FieldName
Book_Id
Book_Nm
Search_Keyword
Image
Cate_Id
Status
Size
10
30
10
50
10
10
DatType
Numeric
Varchar
Numeric
Varchar
Numeric
Numeric
Validation
PrimaryKey
Not null
Not null
Not Null
Foreign Key
Not null
3.Category:
FieldName
Cate_Id
Cate_Nm
Description
Size
10
30
30
DataType
Numeric
Varchar
Varchar
Validation
PrimaryKey
Not null
Not null
Size
10
30
10
DataType
Numeric
Varchar
Numeric
Validation
PrimaryKey
Not null
Foreignkey
Size
10
30
15
DataType
Numeric
Varchar
Varchar
Validation
PrimaryKey
Not null
Not null
4.City:
FieldName
City_Id
City_Nm
State_Id
5.Country:
187
FieldName
Country_Id
Country_Nm
Country_Alias
6.Courier:
FieldName
Courier_Id
Courier_Nm
Delivery_date
Receiving_date
Source
Destination
Size
10
30
10
10
30
30
DataType
Numeric
Varchar
Date
Date
Varchar
Varchar
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
Datatype
Numeric
Varchar
Varchar
Varchar
Numeric
Varchar
Varchar
Numeric
Numeric
Numeric
Numeric
Date
Numeric
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
Not null
Foreignkey
Foreignkey
Foreignkey
Not null
Not null
Not null
Datatype
Numeric
Numeric
Date
Varchar
Varchar
Validation
Primarykey
Foreignkey
Not null
Not null
Not null
7.Customer:
Fieldname
Cust_Id
First_Nm
Middle_Nm
Last_Nm
Contact_No.
Email_Id
Address
Country_Id
State_Id
City_Id
Zipcode
Date_of_purchase
Status
Size
10
20
20
20
12
50
50
10
10
10
10
10
10
8.Delivery_Status:
Fieldname
Status_Id
Courier_Id
Date_Of_Purchase
Source
Destination
Size
10
10
10
30
30
9.Order Master:
Fieldname
Order_Id
Order_date
Description
Totquantity
Stock_Id
Size
10
10
30
10
10
Datatype
Numeric
Date
Varchar
Numeric
Numeric
Validation
Primarykey
Not null
Not null
Not null
Foreignkey
188
10.Order_Detail:
Fieldname
Order_Id
Book_id
Totquantity
Price
TotAmount
Size
10
10
10
10
10
Datatype
Numeric
Numeric
Numeric
Numeric
Numeric
Validation
Foreignkey
Foreignkey
Not null
Not null
Not null
11.Payment:
Fieldname
Slip_No
Payment_type
Totpayment
Bank_Name
Branch_Name
Date_Of_Payment
Cheque_date
Cheque_No
Cust_Id
Courier_Id
Book_Id
Size
10
10
10
30
30
10
10
20
10
10
10
Datatype
Numeric
Varchar
Numeric
Varchar
Varchar
Date
Date
Varchar
Numeric
Numeric
Numeric
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Foreignkey
Foreignkey
Foreignkey
12.Publication:
Fieldname
Pub_Id
Pub_Nm
Price
Address
Email_Id
Contact_No
Size
10
30
10
50
20
10
Datatype
Numeric
Varchar
Numeric
Varchar
Varchar
Numeric
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
13.Purchase:
Size
10
30
10
10
10
10
10
10
Datatype
Numeric
Varchar
Numeric
Numeric
Numeric
Numeric
Numeric
Date
Validation
Primarykey
Not null
Foreignkey
Not null
Not null
Foreignkey
Foreignkey
Not null
189
Fieldname
Pur_Id
Pur_Nm
Order_Id
Totpayment
Totquantity
Cust_Id
Sup_Id
Date_Of_Purchase
14.Purchase_Detail:
Fieldname
Trans_Id
Pur_Id
Book_Id
Quantity
Price
Size
10
10
10
10
10
Datatype
Numeric
Numeric
Numeric
Numeric
Numeric
Validation
Primarykey
Foreignkey
Foreignkey
Not null
Not null
Size
10
30
10
Datatype
Numeric
Varchar
Numeric
Validation
Primarykey
Not null
Foreignkey
Size
10
10
10
Datatype
Numeric
Numeric
Numeric
Validation
Primarykey
Foreignkey
Not null
Size
10
30
30
10
Datatype
Numeric
Varchar
Varchar
Numeric
Validation
Primarykey
Not null
Not null
Foreignkey
15.State:
Fieldname
State_Id
State_Nm
Country_Id
16.Stock:
Fieldname
Stock_Id
Book_Id
Totquantity
17.Subject:
Fieldname
Sub_Id
Sub_Nm
Author_Nm
Pub_Id
18.Supplier:
Size
10
30
30
50
10
10
30
10
10
10
10
10
Datatype
Numeric
Varchar
Varchar
Varchar
Numeric
Numeric
Varchar
Char
Numeric
Numeric
Numeric
Numeric
Validation
Primarykey
Not null
Not null
Not null
Not null
Not null
Not null
Not null
Foreignkey
Foreignkey
Foreignkey
Not null
190
Fieldname
Sup_Id
Sup_Nm
Contactperson_Nm
Address
Contact_No
Mobile_No
Email_Id
Gender
Country_Id
State_Id
City_Id
Zipcode
191
Validate data
Store data
Book Modify();
Search Book_Id
Option:Update record
Store data
Book Delete();
Search Book_Id
Delete the record.
Do u Want to Delete?
step 3: Stop.
Validate data
Store data
192
Order Modify();
Search Order_Id
Option:-
Update record
Store data
Order Delete();
Search Order_Id
Delete the record.
Do u Want to Delete?
step 3: Stop.
Validate data
Store data
Payment Modify();
Search Slip_No
Option:-
Update record
Store data
Payment Delete();
Search Slip_No
Delete the record.
Do u Want to Delete?
step 3: Stop.
193
Validate data
Store data
Publication Modify();
Search Pub_Id
Option:-
Update record
Store data
Publication Delete();
Search Pub_Id
Delete the record.
Do u Want to Delete?
step 3: Stop.
Purchase Modify();
194
Step 1:
Start
step 2: Enter your Choice(Add/Modify/Delete)
PurchaseAdd();
Enter Pur_Id
Enter Pur_Nm
Enter Order_Id
Enter Totpayment
Enter Totquantity
Enter Sup_Id
Enter Date_of_Purchase
Option:Validate data
Store data
Search Pur_Id
Option:Update record
Store data
Purchase Delete();
Search Pur_Id
Delete the record.
Do u Want to Delete?
step 3: Stop.
Validate data
Store data
Supplier Modify();
Search Sup_Id
Option:-
Update record
Store data
Supplier Delete();
Search Sup_Id
Delete the record.
Do u Want to Delete?
step 3: Stop.
195
Step 1: Start
Step 2: Display the Home Page.
Step 3: If (User is not Register) then;
Client Register();
Enter Id
Enter User_Nm
Enter Password
Enter User_type
Enter Email_Id
Enter First_Nm
Enter Middle_Nm
Enter Last_Nm
Enter Contact_No
Enter Address
Enter Gender
Enter Country_Id
Enter State_Id
Enter City_Id
Enter ZipCode
Option:-Validate data
Store data
else
Login();
Enter UserName
Enter Password
End
step 4: Stop.
196
Step 1: Start
Step 2: Show the Book Menu
Step 3: Display The Book Name
Step 4: Search the Book
Step 5: Add the Cart
Step 6: Place the Order
Step 7: Paid the Amount
Step 8: Stop.
197
198
Report Generation
Book Wise Report
Category Wise Report
Category Wise Most Popular Report
Daily Report
Month Wise Report
Receipt
All text fields that integers, as inputs will be validated so that only the digits
are allowed.
2.
All text fields that take inputs as alphanumeric will be validated, so that only
alphabets are taken as parameters for input.
3.
All fields that are mapped to primary key, will be validated so that the data is not
stored as NULL
in the required fields.
Before storing the data, all fields that take in NULL are store values as NULL.
6.
All Date field values are stored as dd-mmm-yyyy format and will be
consistent through the system.
7.
8.
9.
199
Hardware Specification:
C.P.U.:
2.1 GHz
Monitor:
CRT/TFT/LED
RAM:
2 GB and higher
Processor:
Core 2 duo and higher
Hard disk:
120 GB and higher
CDROM:
CD/DVD writer and USB
Keyboard
Mouse
2. Software Specification :
Front End :Asp.Net: (code behind C#)
200
201