Sunteți pe pagina 1din 44

PROJECT REPORT

ON
**BOOK STORE MANAGEMENT SYSTEM**

Submitted in partial fulfillment of 5th semester of Computer Science & Engg.

Institute of Engineering and Emerging Technologies


Baddi (Himachal Pradesh)
Himachal Pradesh University, Shimla

Submitted To:-

Miss. Roshi Saxena


(Lect.CSE)

Submitted by:-

ADITI SHARMA (10508)

1
CONTENTS

INTRODUCTION
ACKNOWLEDGEMENT
TOOLS/ENVIRONMENT USED
ABOUT THE PROJECT
REQUIREMENT ANALYSIS
SYSTEM ANALYSIS AND DESIGN
SYSTEM DESIGN
IMPLEMENTATION
SYSTEM TESTING
VALIDATIONS PERFORMED
SNAPSHOTS
CODING
BIBLIOGRAPHY

2
INTRODUCTION
The present era is the era of Information Technology. This branch of science plays
a vital and significant role in catering to education, information, recreation &
what not? Information Technology is instructive as well. It is an instrument of
bringing us to a realm of technology. It has entirely revolutionized the vista of
modern world. It has made the modern life easier, softer, better, happier and more
prosperous. It has given us the safest & the most concrete means of instruction i.e.
Computer, Internet, E-mail, E-commerce, Website and a lifeline for most of our
problems.
I.T affords us of whatever we could not dream of. All these devices under I.T have
drastically changed communication that
Now links the world within the twinkling of an eye. It gives us the exact approach.
It provides calculations to a fault. Errorless
Results are procured in the quickest manner. Internet & computer are now of
paramount significance.
A Book Store management system is that system that manages the information and
records of the books. In this project I discuss about the various information about
all the steps which are used in book stores for maintaining all types of books and
records.
This project Book Store Management System NEW TECH BOOK STORE
is developed to enhance the working of Book Stores. The workload of handling of
large Ledger Books, Registers, Customer records and Stock Register will now be
reduced. All the information required by the hospital staff will be just a mouse
click away.

3
ACKNOWLEDGEMENT

There is always a sense of gratitude which one expresses to others for their helpful
and needy services they render during all phases of life .I would like to do it as I
really wish to express my gratitude towards all those who have been helpful to me
in getting this mighty task of Project Report.

Finally, I would like to Thanks faculty of NIIT SOLAN for their cooperation to
develop this project.

4
TOOL/ENVIRONMENT

Front End : Visual studio 2005


Back End : SQL Server 2005
Operating system : Windows XP Service Pack 3

5
ABOUT THE PROJECT

FUNCTIONALITY OF MY PROJECT

This project has been developed to ease up the various tasks that take place while
maintaining the books like the list of all books available, list of all customers, no.
books available, and no. of repeated customers and the highly demanded books.

All in all, I have tried to make the projects working as simple and user-friendly as
possible.

EXISTING SYSTEM

Currently, book stores are maintained through manual system means there is
manual entry for each of the record which is maintained in the stores. If a user
wants to add new customer in the list he has to see the occupancy status us of that
customer and then add the customer. They perform manual search for the data
which is difficult job, so in order to solve these problems we introduce the
computerized book store system.

6
REQUIREMENT ANALYSIS
Introduction

Software Requirement specification

The software requirement specification is produced at the culmination of the


analysis task. The function and performance allocated to software as part of system
engineering are refined by establishing a complete information description, a
detailed functional description, a representation of system behavior, an indication
of performance requirement and design constraints appropriate validation criteria,
and other information pertinent to requirement.
The introduction to software requirement specification states the goals and
objectives of the software, describing it in the context of the computer based
system. The information description provides a detailed description of the problem
that the software must solve. Information content, flow and structure are
documented.
A description of each function required to solve the problem is presented in
the functional description. Validation Criteria is probably the most important and
ironically the most often neglected section of the software requirement
specification.

User Requirements

The user requires a record system that should store person data. The system should
prepare to check the number of records of the person. The person data are person
id, person name, person mobile number and persons Email id.

Terminology Definition

This section gives a definition and explanation of some of the terms used in the
project:

Persons Data: -

This is the person's information in the world. It consists of the persons id,
persons name, persons mobile number and persons Email id.

7
Software Requirements

The following are the software requirements for the project:

Platform: Microsoft Windows 7.


Visual Studio 2005

Hardware Requirements

The following are the hardware requirements for the project:

Processor : Pentium IV or higher


RAM: 256 MB or higher
Hard Disk Drive : 20 GB
CD ROM: 42X or higher
Monitor: 15 color
Keyboard: Standard 110 keys
Mouse or similar pointing device

8
SYSTEM ANALYSIS AND DESIGN

Introduction

Software design is the first of the three technical activities design, code
generation and test that are required to build and verify the software. Each activity
transforms information in a manner that ultimately results in validated computer
software.
The design task produces a data design, an architectural design, an interface design
and component design.
The design of an information system produces the details that clearly describe how
a system will meet the requirements identified during system analysis. The system
design process is not a step-by step adherence of clear procedure and guidelines.
When I started working on system design, I faced different type of problems; many
of these are due to constraints imposed by the requirements of the system or
limitations of hardware and software available. Some times it was quite difficult to
enumerate the complexity of the problems and solutions thereof since the variety
of likely problems is so great and no solution are exactly similar however the
following consideration I kept in mind during design phase.

Design Objectives:-

The primary objective of the design is to deliver the requirements as


specified in the requirement specification. Following are the some of the
objectives, which I kept in mind.

Practicality:
The system is quite stable and can be operated by the people with average
intelligence.

Efficiency:
We tried to involve accuracy, timeliness and comprehensiveness of the system
output.

Cost:
It is desirable to aim for the system with a minimum cost subject to the condition
that it must satisfy the entire requirements.

9
Flexibility:
We have tried that the system should be modified depending on the changing
needs of the user. Such modifications should entail extensive reconstructing or
recreation of software. It should also be portable to different computer systems.

Security:
This is very important aspect which I followed in this designing phase and tried to
cover the areas of hardware reliability, fallback procedures, and physical security
of data.

Constraints:-

These are following constraints:

Software
Budget
Time scale
Interface with other system.

3.4 Operations:-

Throughout the design phase I considered and specify the requirement of


each of these operational areas.

Data preparation
Data validation
Processing
Output Handling
Action on output

E-R Diagrams

In software engineering, an entity-relationship model (ERM) is an abstract


and conceptual representation of data. Entity-relationship modeling is a database

10
modeling method, used to produce a type of conceptual schema or semantic data
model of a system, often a
relational database, and its requirements in a top-down fashion. Diagrams created
by this process are called entity-relationship diagrams, ER diagrams, or ERDs.
ERDs Symbols:

11
ER DIAGRAM

OVERVIEW:

12
COMPLETE:

Bid
uname
b_name
Password

b_price

BUYS Books
Customers

Has

bid

Orders
incdate
b_price

ccc b_name
uname

ccn

13
SYSTEM DESIGN
Introduction

System Design is the process of developing specifications for a candidate system


that meet the criteria established in the system analysis. Major step in system
design is the preparation of the input forms and the output reports in a form
applicable to the user.
The main objective of the system design is to make the system user friendly.
System design involves various stages as:
Data Entry
Data Correction
Data Deletion
Processing
Report Generation
System design is the creative act of invention, developing new inputs, a
database, offline files, procedures and output for processing business to meet an
organization objective. System design builds information gathered during the
system analysis.

Characteristics of a well Designed System:

In the designing of an efficient and effective system it is of great importance


to consider the human factor and equipment that will be used. System analyst must
evaluate the capabilities and limitations of the personal and corresponding factors
of the equipment itself.

The characteristics associated with effective system operations are:-

Accessibility
Decision Making Ability
Economy
Flexibility
Reliability
Simplicity
Success is a new system pivots on its acceptance or non-acceptance by
the organization.

14
Personnel:-

If the persons working on the current operating system are convinced that
the new system will not benefit them, then the new system is in serious trouble. To
overcome this resistance participation by operating personal during all phases of
the changeover is necessary because they constitute the organization, which must
use alive in with newly designed system. An effective system produces information
at the lowest cost pertinent and timely for making decision.

Linked List:-

Linked list is a very common data structure often used to store similar data
in memory. While the elements of an array occupy contiguous memory locations,
those of linked list are not constrained to be stored in adjacent locations. The
individual elements are stored, but still bound together. The order of the element is
maintained by explicit links between them.

Code Design

When large volumes of data being handled, it is important that the item be
identified, stored or selected easily and quickly. To accomplish this, each data item
must have unique identification and must be related to other items of the same
type. Codes can provide brief identification of each item, which replace longer
description that would be more awkward to store and manipulate.

Common types of codes are:


Sequences codes
Significant Digit code
Alphabetic code
Self Checking code

Validation Checks

A common problem with computer system is that it is very easy to put


incorrect data into them. So the input data is validated to minimize errors and data
entry. For certain data specific code has been given and validations are done which
enable the user to enter the required data and correct them if they have entered

15
wrong codes. If you put incorrect data into the computer system then you will get
incorrect results out of it. Processing incorrect inputs will produce incorrect
outputs. This lead to the acronym GIGO (Garbage in Garbage out).

Sometimes incorrect data can actually cause a computer system to stop work
temporarily. People who develop computer system software go to a lot of trouble
to make it difficult for incorrect data to be entered. The two main techniques for
this purpose are:
o Verification
o Validation

Verification:

A verification check ensures that data items are correctly transferred into
computer from the medium that it was originally stored on. Verification checks are
usually used to check that a data entry worker has correctly typed information
written on a data collection form into a computer.

Methods of Verification:-

On-Screen prompts: After a user has entered some data it is redisplayed on the
screen. The user is prompted to read the data and confirm that it has been entered
correctly. If the user has entered any data incorrectly he should response that the
data is inaccurate and retypes the incorrect parts.

Dual Inputs: This method is used when data is entered through the keyboard.
The data to be entered is typed in twice by two different operations. The two copies
of data are been compared, any differences are detected, and the operators will be
prompted to retype the sections that differ until both copies agree. When the two
copies agree the computer assumes that the data has been entered correctly.

Validation:

A validation check is an automatic check made by computer to ensure that


any data entered into the computer is sensible. A validation check does not make
sure that data has been entered correctly. It only ensures that data is sensible. For
this reason validation checks are not usually as effective as verification checks.
They can however be carried out automatically by the computer and therefore
require less work by the computer operators making them cheaper to use.

16
Methods of validation:-

There are many different methods of validation. The most appropriate


method to use will depend upon what data is being entered. The most common
methods are:
Presence Checks
Type Checks
Length Checks
Format Checks

Data Dictionary

In our DFD, we give names to data flows, processes, and data stores.
Although the names are descriptive of the data, they do not give details. So
the following the DFD, our interest is to build some structured place to
keep details of the contents of data flow, processes and data store. A data
dictionary is a structured repository of data about data. It is a set of rigorous
definition of all DFD data element and data structure.

Input Design

The input design is the link between the information system and the
user. It comprises developing specification and procedure for data preparation and
those steps that are necessary to put transaction data into a usable form for
processing data entry. The design of inputs focuses on controlling the amount of
inputs required, controlling errors, avoiding delay, avoiding extra steps and
keeping the process simple.

The system needs the following information for the processing:


Information regarding Project Details
Information regarding Project Design Details

Output Design

In output design, emphasis is given on producing a hard copy of the


information required as the output on the CRT screen in some predefined manner.
Computer output is the most important and direct source of information to the use.
Output design is a process that involves designing necessary outputs that should be

17
given to various users according to their requirements. Efficient, intelligent output
design should improve the systems relationship with the user and help in decision
making.

18
IMPLEMENTATION

Implementation is the stage in the project where the theoretical


design is turned into the working system and is giving confidence to
the new system for the users i.e. will work efficiently and effectively.
It involves careful planning, investigation of the current system and its
constraints on implementation, design of method to achieve the change
over, an evaluation, of change over methods. The implementation
process begins with preparing a plan for the implementation for the
system. According to this plan , the activities are to be carried out ,
discussions may regarding the equipment have to be acquired to
implement the new system.

Implementation is the final and important phase. The most critical


stage is in achieving a successful new system and in giving the users
confidence that the new system will work and be effective. The
system can be implemented only after thorough testing is done and if
it found to be working according to the specification.
At the beginning of the development phase a preliminary
implementation plan is created to schedule and manage the many
different activities that must be integrated into plan. The
implementation plan is updated throughout the development phase,
culminating in a changeover plan for operation phase. The major
elements of implementation plan are test plan, training plan, equipment
installation plan and a conversion plan.

There are three types of implementation:-


Implementation of a computer system to replace a manual system.
Implementation of a new computer system to replace an existing
system.
Implementation of a modified application to replace an existing
one, using the same computer.

19
In this project, implementation of a computer system to replace a manual
system is done.

5.2 Technical issues encountered

Some of the technical issues and questions I encountered with the


following:

How to choose the language platform.


How the program saves data
How errors are detected and the error messages that should appear
What happens when we try overwriting data that already exists on
the list?
Is the software user friendly?
Is the Graphic User Interface elegant?
The platform the software should run on?

5.3 Software development practices adopted

We used simple designs which were as simple as the current


functionality allowed by the system.

We first began with very simple design which is incrementally


improved.

Continuous integration was also used where each code was compiled run
and tested before adding to the system after which the system must meet
all the criteria.

We also made sure to code according to coding standards, the


development codes were consistent and had the same style through out.

20
SYSTEM TESTING

The purpose of system testing is to identify and correct errors in the software
product. Testing is an important element of software quality assurance and
represents the ultimate review of specification, design and coding. The increasing
visibility of the software as system element and the cost associated with a software
failure are motivating factors for well planned and thorough testing.
System testing was conducted in order to detect errors and for comparing
then the final system with the requirement specification reports that is weather the
system meets requirements. During the process of testing the software was
executed with the set of test cases and the output of programs for the test cases was
evaluated to determine if the program is performing as it was expected to. There
are three phases of testing:
1 Unit testing
2 Integration testing
3 System testing

Unit Testing

Unit testing is the process of taking a module and running it in isolation from
rest of software product by using prepared test cases and comparing the actual
results with the results predicted by the specifications and design of the module.
Unit testing was conducted first. Different modules of his software were tested
against the specifications produced during design of the modules. Verification of
the code produced during the coding phase was done. Each module was tested
separately.
Unit testing focuses verification effort on the smallest unit of software
design module. This uncovers errors within the boundary of a module. Unit testing
is actually white box testing, both the external things as well as the internal codes
are tested. In testing, the interfaces are tested in order to ensure the proper flow of
data in and out of the module. The boundary testing is done to ensure that the
module keeps the limit of it. All independent paths are tested to ensure that all
statements are tested at least once. At last the error path is also tested.

Integration Testing

21
Integration testing addresses the issues associated with the dual problems of
verification and program construction. It is done to verify how the modules inter-
operate with one another. Integration testing is done basically to validate the
design.
The purpose of unit testing is to determine that each independent module is
correctly implemented. This gives little chance to determine that the interface
between modules is also correct, and for this reason integration testing must be
performed. One specific target of integration testing is the interface: Whether
parameters match on both sides as two type, permissible ranges, meaning and
utilization.

System Testing

After unit and integration testing, system testing was conducted. Here the
entire software system was tested. The reference document used for this process
was requirement document and the goal was to see if the software meets its
requirements.
System testing includes the thorough testing of the product. System testing
involves unit testing, integration testing, acceptance testing. Careful planning and
scheduling are required to ensure that modules will be available for integration into
the evolving software product when needed. A test plant has the following steps:

Prepare test plan


Specify conditions for user acceptance testing
Prepare test data for program testing
Prepare test data for transaction path testing
Plan user testing
Compile /Assemble program
Prepare job performance aids
Prepare operational documents

22
VALIDATIONS PERFORMED

We have performed some validations for name, and telephone no in various forms
and those are:

If the user will try to save entry having digits in textbox provided for name then an
error message will be display and the message will be invalid data.

If user will try to enter characters in textbox provided for telephone no then error
message will be displayed and message will be invalid data.

And also an error message is displayed whenever user leaves any field blank in any
form and tries to save that entry.

23
24
HOME PAGE:

25
LOGIN PAGE:

26
REGISTERATION PAGE:

27
Validations Performed:

28
CATEGORY OF BOOKS:

29
PAGE ILLUSTRATING COMPUTER SECTION:

30
SCIENCE PAGE:

31
NOVELS SECTION:

32
33
LOGIN PAGE:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{
bool msg;
lblmsg.Visible = true;
AuthenticationClass a = new AuthenticationClass();
msg = a.FunAuthentication(txtname.Text, txtpassword.Text);
if (msg == true)
Response.Redirect("upage.aspx?
uname="+System.Web.HttpUtility.UrlEncode(txtname.Text));
else
lblmsg.Text = "Invalid Username and Password";

}
WEB CONFIG FILE:
34
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
35
-->
</system.web>
</configuration>

36
REGISTRATION PAGE:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class registration : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void btnsubmit_Click(object sender, EventArgs e)
{
string sFname = txtfname.Text;
string sLname = txtlname.Text;
string sUname = txtuname.Text;
string sPw = txtpassword.Text;
string sCpw = txtcpassword.Text;
string sAdd = txtaddress.Text;
string sCity = txtcity.Text;
string sState = ddlstate.Text;
int iPcode = Convert.ToInt32(txtpcode.Text);
/*int iTno = Convert.ToInt32(txttelno.Text);*/
SqlConnection conn = new SqlConnection(@"Data Source=ADITI-
PC\SQLEXPRESS;Initial Catalog=a;Integrated Security=True");
SqlDataAdapter dAd = new SqlDataAdapter("inus", conn);
dAd.SelectCommand.CommandType = CommandType.StoredProcedure;

dAd.SelectCommand.Parameters.Add("f_name", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["f_name"].Value = sFname;

37
dAd.SelectCommand.Parameters["f_name"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("l_name", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["l_name"].Value = sLname;
dAd.SelectCommand.Parameters["l_name"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("uname", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["uname"].Value = sUname;
dAd.SelectCommand.Parameters["uname"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("pw", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["pw"].Value = sPw;
dAd.SelectCommand.Parameters["pw"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("cpw", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["cpw"].Value = sCpw;
dAd.SelectCommand.Parameters["cpw"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("address", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["address"].Value = sAdd;
dAd.SelectCommand.Parameters["address"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("city", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["city"].Value = sCity;
dAd.SelectCommand.Parameters["city"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("state", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["state"].Value = sState;
dAd.SelectCommand.Parameters["state"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("p_code", SqlDbType.Int);
dAd.SelectCommand.Parameters["p_code"].Value = iPcode;
38
dAd.SelectCommand.Parameters["p_code"].Direction =
ParameterDirection.Input;

DataSet dSet = new DataSet();

dAd.Fill(dSet);

if (this.IsPostBack)
{
Response.Redirect("rd.aspx?
uname="+System.Web.HttpUtility.UrlEncode(txtuname.Text));
}
}
}

39
SHOPPING CART:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string strcid = Request.QueryString["uname"];
TextBox1.Text = strcid;
TextBox1.Enabled = false;
}
protected void Button1_Click(object sender, EventArgs e)
{

string suname = TextBox1.Text;


string sbid = ddlbi.Text;
string sccc = txtccc.Text;
string sccn = txtccn.Text;
SqlConnection conn = new SqlConnection(@"Data Source=ADITI-
PC\SQLEXPRESS;Initial Catalog=a;Integrated Security=True");
SqlDataAdapter dAd = new SqlDataAdapter("ord", conn);
dAd.SelectCommand.CommandType = CommandType.StoredProcedure;

dAd.SelectCommand.Parameters.Add("uname", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["uname"].Value = suname;
dAd.SelectCommand.Parameters["uname"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("bid", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["bid"].Value = sbid;
40
dAd.SelectCommand.Parameters["bid"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("ccc", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["ccc"].Value = sccc;
dAd.SelectCommand.Parameters["ccc"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("ccn", SqlDbType.VarChar);
dAd.SelectCommand.Parameters["ccn"].Value = sccn;
dAd.SelectCommand.Parameters["ccn"].Direction =
ParameterDirection.Input;

dAd.SelectCommand.Parameters.Add("idate", SqlDbType.NChar);
dAd.SelectCommand.Parameters["idate"].Value =
System.DateTime.Today.ToString(); ;
dAd.SelectCommand.Parameters["idate"].Direction =
ParameterDirection.Input;

DataSet ds = new DataSet();


dAd.Fill(ds);
Response.Redirect("order2.aspx?
uname="+System.Web.HttpUtility.UrlEncode(TextBox1.Text));
}

41
ORDERS PAGE:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class order2 : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection myconn;
myconn = new SqlConnection(@"Data Source=ADITI-
PC\SQLEXPRESS;Initial Catalog=a;Integrated Security=True");
string strcid = Request.QueryString["uname"];
SqlDataAdapter orderdet = new SqlDataAdapter("select
order1.*,compl.b_name,compl.b_price from order1,compl where
order1.uname=@uname and order1.bid=compl.bid and idate=@idate", myconn);
orderdet.SelectCommand.Parameters.Add(new
SqlParameter("@uname",SqlDbType.VarChar,50));
orderdet.SelectCommand.Parameters.Add(new
SqlParameter("@idate",SqlDbType.NChar,10));
orderdet.SelectCommand.Parameters["@uname"].Value=strcid;

orderdet.SelectCommand.Parameters["@idate"].Value=System.DateTime.Today.T
oString();
DataSet ds=new DataSet();
orderdet.Fill(ds);
dgorderdetail.DataSource=ds;
dgorderdetail.DataBind();

42
protected void dgorderdetail_SelectedIndexChanged(object sender, EventArgs
e)
{

}
protected void LinkButton1_Click(object sender, EventArgs e)
{
string strcid = Request.QueryString["uname"];
Response.Redirect("cart2.aspx?uname=" +
System.Web.HttpUtility.UrlEncode(strcid));
}
}

43
BIBLIOGRAPHY
Books:

Microsoft.NET Framework 3.5-Windows forms application development.


Microsoft Visual C# Express Edition

Websites:
o msdn.microsoft.com
o www.google.com

44

S-ar putea să vă placă și