Вы находитесь на странице: 1из 53

1 INTRODUCTION

1.1 ABOUT THE PROJECT

The Shopping cart is mainly useful for who haven’t time to go to shopping, those are
just entered into this website and bought whatever they want. Even it is night or morning they
entered into this site, and chosen different items like fruits, books, toys etc.

‘Customer is our god’ mainly this website is based on this formula. After chosen
items he bought into Pay pal process like VISA or MASTER credit cards or any Debit cards
are accepted in this website. Customer is happily shopping at his rest place.

Once customer entered with his own username and password, at that time
automatically one shopping cart will be created, once user select an item it will add to cart. In
case user thinks the selected item is not useful for me, then deleted that item from shopping
cart.

Customer selected some items, but in his credit or debit cart haven’t that much
balance, then he was logout from the website, the selected items are stored at cart with
specific users with his allotted carts, after some days he bought those items then
automatically deleted from the cart.

1.2 MODULE DESCRIPTION

This project is divided into 9 modules:


1. Registration Module
2. Products Browse Module
3. Shipping & Billing Module
4. Payment Module
5. Admin User Management Module
6. Admin Catalog Management Module
7. Admin Order Management Module
1. Registration Module
In this module contains the new user registration. If the new user can register their
details by this module. By the userID, username , password , HintquestionID, Answer,
Address, mail id, phone number and so on. In these details are stored into the database.
After stored this details the user can login into the account.

2. Products Browse Module


In this module the user can search the details of the various products. If we can search the
products using the product ID, and Product name. After we selecting the product all the
details are displayed below.
Following information are maintained :
1. Product ID
2. Category ID
3. Product name
4. Product Description
5. Price

3. Shipping & Billing Module


The Ecommerce Plus templates currently support the following shipping methods:
Flat rate shipping:
If you select flat rate shipping you can enter 2 shipping costs in the product admin
section. One is for the cost to ship one of an item, and the second is the cost to ship the
second and subsequent instance of an item.
Weight base shipping:
Shipping is calculated by product weight according to the shipping zone to easily
facilitate national and international shipping. If weight based shipping is selected, then the
country zone can be set in the countries admin panel, and new zones can be edited by
following the Edit Postal Zones link in the main admin panel.
Payment Module
While buying products on E-Shop, it is extremely important that you select the right
payment method for yourself. E-Shop offers an array of payment options, both online and
offline , which are made available to you by the seller. Different payment methods have
innumerable advantages and every option can work differently for different buyers.
Before you buy an item, always make sure that the seller’s payment methods will work fro
you.
Payment Methods:
1. Online Payment Methods
Online Bank Transfer
Credit Card
Debit Card
Cash Card
2. Offline Payment Methods
Paisa pay Cash on Delivery

4. Admin User Management Module


User accounts management module maintain the information about all the customers
like address, contact no, their previous product choices etc. This information is very useful
for successful ecommerce market.

5. Admin Catalog Management Module


Catalog Browsing designed from the ground up to be flexible feature rich and
customizable. Keyword Searching, Reviews nd Ratings, Tiered ?Navigation and Random
Featured Items make sure that it is easy for your customers to find the right product for their
needs.
 Pricing by price list and discount level
 Contract pricing
 Generic Content block to create category landing pages
 Multi – Tier Navigation

6. Admin Order Management Module


 View, edit, create and fulfill orders from admin panel
 Create one or multiple invoices, shipments and credit memos per order to allow for
split fulfillment
 Print invoices and packing slips
 Email Notifications of Orders
2 SYSTEM ENVIRONMENT

2.1 HARDWARE SPECIFICATION

 Pentium-IV (Processor)
 256 MB Ram
 512 KB Cache Memory
 Hard disk 10 GB
 Microsoft Compatible 101 or more Key Board

2.2 SOFTWARE SPECIFICATION


Front End : VB.NET 2.0

Back End : SQL SERVER 2005

Operating System : WINDOWS XP

2.3 ABOUT THE SOFTWARE

VB.Net

Visual Basic .NET (VB.NET) is an object-oriented computer programming language


implemented on the .NET Framework. Although it is an evolution of classic Visual Basic
language, it is not backwards-compatible with VB6, and any code written in the old version
does not compile under VB.NET.

Like all other .NET languages, VB.NET has complete support for object-oriented
concepts. Everything in VB.NET is an object, including all of the primitive types (Short,
Integer, Long, String, Boolean, etc.) and user-defined types, events, and even assemblies. All
objects inherits from the base class Object.

VB.NET is implemented by Microsoft's .NET framework. Therefore, it has full access


to all the libraries in the .Net Framework. It's also possible to run VB.NET programs on
Mono, the open-source alternative to .NET, not only under Windows, but even Linux or Mac
OSX.

The following reasons make VB.Net a widely used professional language:

 Modern, general purpose.


 Object oriented.
 Component oriented.
 Easy to learn.
 Structured language.
 It produces efficient programs.
 It can be compiled on a variety of computer platforms.
 Part of .Net Framework.

Strong Programming Features VB.Net

VB.Net has numerous strong programming features that make it endearing to multitude of
programmers worldwide. Let us mention some of these features:

 Boolean Conditions
 Automatic Garbage Collection
 Standard Library
 Assembly Versioning
 Properties and Events
 Delegates and Events Management
 Easy-to-use Generics
 Indexers
 Conditional Compilation
 Simple Multithreading

We have already mentioned that VB.Net is part of .Net framework and used for
writing .Net applications. Therefore before discussing the available tools for running a
VB.Net program, let us understand how VB.Net relates to the .Net framework.
The .Net Framework

The .Net framework is a revolutionary platform that helps you to write the following
types of applications:

 Windows applications
 Web applications
 Web services

The .Net framework applications are multi-platform applications. The framework has
been designed in such a way that it can be used from any of the following languages: Visual
Basic, C#, C++, Jscript, and COBOL, etc.

All these languages can access the framework as well as communicate with each other.

The .Net framework consists of an enormous library of codes used by the client
languages like VB.Net. These languages use object-oriented methodology.

Following are some of the components of the .Net framework:

 Common Language Runtime (CLR)


 The .Net Framework Class Library
 Common Language Specification
 Common Type System
 Metadata and Assemblies
 Windows Forms
 ASP.Net and ASP.Net AJAX
 ADO.Net
 Windows Workflow Foundation (WF)
 Windows Presentation Foundation
 Windows Communication Foundation (WCF)
 LINQ

For the jobs each of these components perform, please see ASP.Net - Introduction,
and for details of each component, please consult Microsoft's documentation.
Integrated Development Environment (IDE) For VB.Net

Microsoft provides the following development tools for VB.Net programming:

 Visual Studio 2010 (VS)


 Visual Basic 2010 Express (VBE)
 Visual Web Developer

The last two are free. Using these tools, you can write all kinds of VB.Net programs
from simple command-line applications to more complex applications. Visual Basic Express
and Visual Web Developer Express edition are trimmed down versions of Visual Studio and
has the same look and feel. They retain most features of Visual Studio. In this tutorial, we
have used Visual Basic 2010 Express and Visual Web Developer (for the web programming
chapter).

MS SQL Server 2005

Microsoft SQL Server is a Structured Query Language (SQL) based, client/server


relational database. Each of these terms describes a fundamental part of the architecture of
SQL Server.

SQL Server 2005 is the successor to SQL Server 2000. It included native support for
managing XML data, in addition to relational data. ). SQL Server 2005 added some
extensions to the T-SQL language to allow embedding XQuery queries in T-SQL. In
addition, it also defines a new extension to XQuery, called XML DML that allows query-
based modifications to XML data. SQL Server 2005 also allows a database server to be
exposed over web services using TDS packets encapsulated within SOAP (protocol) requests.
When the data is accessed over web services, results are returned as XML.

SQL Server 2005 has also been enhanced with new indexing algorithms and better
error recovery systems. Data pages are check summed for better error resiliency, and
optimistic concurrency support has been added for better performance. Permissions and
access control have been made more granular and the query processor handles concurrent
execution of queries in a more efficient way.SQL Server is a comprehensive, integrated end-
to-end data solution that empowers users across your organization by providing them with a
secure, reliable, and productive platform for enterprise data and business intelligence (BI)
applications. SQL Server 2005 delivers powerful, familiar tools to Information Technology
professionals as well as to information workers, reducing the complexity of creating,
deploying, managing, and using enterprise data and analytical applications on platforms
ranging from mobile devices to enterprise data systems.

Features & Benefits:

 Complete data management and analysis platform for medium businesses and
larger departments
 SQL Server Management Studio
 Database Mirroring
 SQL Management Objects
 Database Mirroring
 Failover Clustering
3 SYSTEM STUDY

3.1 EXISTING SYSTEM

The Existing system is used only for storing the data into paper. Customer
information and Supplier information are not clear with this system. What kind of news paper
and the delivery system are not clear with the existing system. If we search any data’s like
customer or supplier details can’t easy by the existing system. In the existing system cant
store more amount of information.

3.1.1 Disadvantages of Existing System

 It is limited to a single system.


 It is less user-friendly.
 It is having lots of manual work (Manual system does not mean that you are working with
pen and paper, it also include working on spread sheets and other simple software's).
 The present system is very less secure.
 It is unable to generate different kinds of report.
 User must go to shop and order products.
 It is difficult to identify the required product.
 Description of the product obtained only on manually.
 Accuracy not guaranteed.
 Not in reach of distant users.
3.2 PROPOSED SYSTEM

This system is intended to manage the delivery of newspapers and magazines in some
small town or area of a larger town. It is intended for use by newsagents who are only casual
users of computer systems and should run on a PC or similar hardware.

3.2.1 Advantages of Proposed System

The development of the new system contains the following activities, which try to automate
the entire process keeping in view of the database integration approach.
 To debug the existing system, remove procedures those cause data redundancy, make
navigational sequence proper. To provide information about audits on different level
and also to reflect the current work status depending on organization/auditor or date.
Required to build strong password mechanism.

 User friendliness is provided in the application with various controls.

 The system makes the overall project management much easier and flexible.

 It can be accessed over the Internet.

 Various classes have been used to provide file upload and mail features.

 There is no risk of data mismanagement at any level while the project development is
under process.

 Report generation feature is provided using Crystal Reports to generate different


kinds of reports like bar graphs, pie charts and table type charts etc.

 It provides high level of security using different protocols like https etc.
4 SYSTEM DESIGN

4.1 DARTA FLOW DIAGRAM

Basic data flow diagram symbols are

A “Square” defines a source (originator) or destination of a system data.

An “Arrow” identifies data in flow. It is pipeline through which information


flows.

An “Oval” represents a process that transforms incoming data flow(s) into


outgoing data flow(s).

An “Magnetic disk” represents a data store.

DFD Diagrams:
Context Level (0th Level) Diagram:

ADMINISTR Data Input Stage


Data Storage
ATOR
Administrator

Data Out Put Stage

Data Out Put Stage UI Screens

User
User Data Out Put Stage

Reports
Shopping Cart
Login DFD
Login Master

Enter User User Home


Open Login
Name and Check User Page
form
Password

verification

Admin Details Data Flow:

1st Level DFD Diagram:

Order
Login User Master

Open Form()
Manage Manage Order
1.0.0 Users 1.0.4

1.0.2

Enter Login
Details Manage Manage
Prodects Country
1.0.1
1.0.3 1.0.5

Products
Verifies Validates
Data Data

Manage
Country
Manage
1.0.6 State
Manage
Log out
1.0.7 Catagory

Coutry

State
Catagory
2nd Level DFD For Manage Product

Product
Products Products

Manage
Product Update
Delete Product
Product Log out
1.0.3.1
1.0.3.5
1.0.3.3

Add
Product View Product

1.0.3.2 1.0.3.4

Product
Verifies Validates
Data Data

2nd Level DFD For Manage Orders

Order
Order Order

Manage
order Delete View Order
Order Log out
1.0.4.1 1.0.4.4
1.0.4.3

Place
Order View Status

1.0.4.2 1.0.4.5

Order
Verifies Validates
Data Data
User Activities DFD

Cart
Account Products

Open Form()
Order Products View Cart
2.0.0 Log out
2.0.4
2.0.2

Manage
Account View Product

2.0.1 2.0.3

Product
Verifies Validates
Data Data

DFD for new user registration

Enter Enter
New First Name Last Name
User 3.0.2
Registrati 3.0.4
on Enter
Enter DOB
3.0.0 Middle Name
3.0.5
Generate 3.0.3 Verifies
User Id Verifies
3.0.1

Verifies Enter
Verifies
EmailId
Enter
RD
3.0.8
Enter
3.0.6
Contact No
Enter
Address User Master
3.0.9
3.0.7
4.1.1 Entity Relationship Diagram
4.2 DATABASE DESIGN

Table:
tblAddress

Table: tblAdminMenu

Table: tblAttributes
Table: tblBrands

Table: tblCategories

Table:tblCustomer

Table: tblFeaturedProducts
Table: tblHotSellingProducts

Table: tblNewlyAddedProducts

Table: tblOfferedProducts

Table: tblOrderDetails
Table: tblOrders

Table: tblOrderStatus

Table: tblPageContent
Table: tblProducts

Table: tblShoppingCart

Table:tblUser
4.3 INPUT DESIGN
Input design is one of the most expensive phases of the operation of computerized
system and is often the major problem of a system. Input design is a part of overall design,
which requires careful attribute. Inaccurate input data are the most common cause of
errors in data processing. T h e g o a l o f designing input data is to make data entry as
easy, logical and free from errors. In the system design phase input data are collected
and organized in to groups of similar data.

Input design is the process of converting user-oriented input to a computer based


format. Input design is a part of overall system design, which requires very careful attention.
Often the collection of input data is the most expensive part of the system. The main
objectives of the input design are …
1. Produce cost effective method of input
2. Achieve highest possible level of accuracy
3. Ensure that the input is acceptable to and understood by the staff.
The goal of designing input data is to make enter easy, logical and free from errors as
possible. The entering data entry operators need to know the allocated space for each field;
field sequence and which must match with that in the source document. The format in which
the data fields are entered should be given in the input form .Here data entry is online; it
makes use of processor that accepts commands and data from the operator through a key
board. The input required is analyzed by the processor. It is then accepted or rejected. Input
stages include the following processes
 Data Recording
 Data Transcription
 Data Conversion
 Data Verification
 Data Control
 Data Transmission
 Data Correction

One of the aims of the system analyst must be to select data capture method and
devices, which reduce the number of stages so as to reduce both the changes of errors and the
cost .Input types, can be characterized as.
 External
 Internal
 Operational
 Computerized
 Interactive

Input files can exist in document form before being input to the computer. Input
design is rather complex since it involves procedures for capturing data as well as inputting it
to the computer.

4.4 OUTPUT DESIGN

Output design generally refers to the results and information that are generated by the
system for many end-users; output is the main reason for developing the system and the basis
on which they evaluate the usefulness of the application.
Computer output is the most important and direct source of information to the user.
Output design is very important phase because the output will be in an interactive manner.
The output will be in such away that the user can see it from the screen and can take a hard
copy from the printer. Efficient, Major form of the output is a hard copy from the printer.
Outputs from computer systems are required primarily to communicate the results
of processing to users. They are also used to provide a permanent copy of these result for
latter consultation .
Computer output is the most important and direct source of information to the users.
Designing computer output should proceed in an organized well throughout the manner. The
right output must be available for the people who find the system easy o use.
The outputs have been defined during the logical design stage. If not, they should
defined at the beginning of the output designing terms of types of output connect, format,
response etc,
Various types of outputs are
 External outputs
 Internal outputs
 Operational outputs
 Interactive outputs
 Turn around outputs
All screens are informative and interactive in such a way that the user can full fill his
requirements through asking queries.
5 SYSTEM TESTING AND IMPLEMENTATION

5.1 SYSTEM TESTING


Is the menu bar displayed in the appropriate contested some system related features
included either in menus or tools? Do pull –Down menu operation and Tool-bars work
properly? Are all menu function and pull down sub function properly listed ?; Is it possible to
invoke each menu function using a logical assumptions that if all parts of the system are
correct, the goal will be successfully achieved .? In adequate testing or non-testing will leads
to errors that may appear few months later.
This create two problem
1. Time delay between the cause and appearance of the problem.
2. The effect of the system errors on files and records within the system
The purpose of the system testing is to consider all the likely variations to which it
will be suggested and push the systems to limits. The testing process focuses on the logical
intervals of the software ensuring that all statements have been tested and on functional
interval is conducting tests to uncover errors and ensure that defined input will produce actual
results that agree with the required results. Program level testing, modules level testing
integrated and carried out.
There are two major type of testing they are
1) White Box Testing.
2) Black Box Testing.
WHITE BOX TESTING
White box sometimes called “Glass box testing” is a test case design uses the control
structure of the procedural design to drive test case.
Using white box testing methods, the following tests were made on the system
A) All independent paths within a module have been exercised once. In our system,
ensuring that case was selected and executed checked all case structures. The bugs that were
prevailing in some part of the code where fixed
b) All logical decisions were checked for the truth and falsity of the values.

BLACK BOX TESTING


Black box testing focuses on the functional requirements of the software. This is black
box testing enables the software engineering to derive a set of input conditions that will fully
exercise all functional requirements for a program.
Black box testing is not an alternative to white box testing rather it is complementary
approach that is likely to uncover a different class of errors that white box methods like..
1) Interface errors
2) Performance in data structure
3) Performance errors
4) Initializing and termination errors.
Introduction
The most important phase in system development life cycle is system testing. The
number and nature of errors in a newly designed system depends on the system specifications
and the time frame given for the design.
A newly designed system should have all the subsystems working together, but in
reality each subsystems work independently. During this phase, all the subsystems are
gathered into one pool and tested to determine whether it meets the user requirements.
Testing is done at two level -Testing of individual modules and testing the entire
system. During the system testing, the system is used experimentally to ensure that the
software will run according to the specifications and in the way the user expects. Each test
case is designed with the intent of finding errors in the way the system will process it.
Testing plays a very critical role in determining the reliability and efficiency of
software and hence is a very important stage in software development. Software testing is
done at different levels. They are the unit testing and system testing which comprises of
integration testing and acceptance testing.
Types Of Testing
Unit Testing
This is the first level of testing. The different modules are tested against the
specifications produced during the integration. This is done to test the internal logic of each
module. Those resulting from the interaction between modules are initially avoided. The
input received and output generated is also tested to see whether it falls in the expected range
of values. Unit testing is performed from the bottom up, starting with the smallest and lowest
modules and proceeding one at a time.

The units in a system are the modules and routines that are assembled and integrated
to perform a specific function. The programs are tested for correctness of logic applied and
detection of errors in coding. Each of the modules was tested and errors are rectified. They
were then found to function properly.
Integration Testing
In integration testing, the tested modules are combined into sub-systems, which are
then tested. The goal of integration testing to check whether the modules can be integrated
properly emphasizing on the interfaces between modules. The different modules were linked
together and integration testing done on them.

Validation Testing
The objective of the validation test is to tell the user about the validity and reliability
of the system. It verifies whether the system operates as specified and the integrity of
important data is maintained. User motivation is very important for the successful
performance of the system.
All the modules were tested individually using both test data and live data. After each
module was ascertained that it was working correctly and it had been "integrated" with the
system. Again the system was tested as a whole. We hold the system tested with different
types of users. The System Design, Data Flow Diagrams, procedures etc. were well
documented so that the system can be easily maintained and upgraded by any computer
professional at a later
System Testing
The integration of each module in the system is checked during this level of testing.
The objective of system testing is to check if the software meets its requirements. System
testing is done to uncover errors that were not found in earlier tests. This includes forced
system failures and validation of total system as the user in the operational environment
implements it. Under this testing, low volumes of transactions are generally based on live
data. This volume is increased until the maximum level for each transactions type is reached.
The total system is also tested for recovery after various major failures to ensure that no data
are lost during the breakdown.

5.2 SYSTEM IMPLEMENTATION

Implementation is the stage where the theoretical design is turned into a working
system. The most crucial stage in achieving a new successful system and in giving
confidence on the new system for the users that it will work efficiently and effectively.
The system can be implemented only after thorough testing is done and if it is found
to work according to the specification.

It involves careful planning, investigation of the current system and its constraints on
implementation, design of methods to achieve the change over and an evaluation of change
over methods a part from planning. Two major tasks of preparing the implementation are
education and training of the users and testing of the system.

The more complex the system being implemented, the more involved will be the
systems analysis and design effort required just for implementation.
The implementation phase comprises of several activities. The required hardware
and software acquisition is carried out. The system may require some software to be
developed. For this, programs are written and tested. The user then changes over to his new
fully tested system and the old system is discontinue
6 CONCLUSION

The following conclusions can be deduced from the development of the project. News
paper proclamination monitoring system of the entire system improves the efficiency. It
provides a friendly graphical user interface which proves to be better when compared to the
existing system. It gives appropriate access to the authorized users depending on their
permissions. It effectively overcomes the delay in communications. Updating of information
becomes so easier. System security, data security and reliability are the striking features. The
System has adequate scope for modification in future if it is necessary.
This application avoids the manual work and the problems concern with it. It is an
easy way to obtain the information regarding the various products information that is present
in the Super markets.
7 SCOPE FOR FUTURE ENHANCEMENT

It is a System project. With this project the details about the product will be given to
the customers in detail with in a short span of time. Queries regarding the product or the
services will also be clarified. It provides more knowledge about the various technologies.
In future to b e developed into web based application. In various place agency to
access the application and monitoring the news paper system.
BIBLIOGRAPHY

 FOR .NET INSTALLATION


www.support.mircosoft.com
 FOR DEPLOYMENT AND PACKING ON SERVER
www.developer.com
www.15seconds.com
 FOR SQL
www.msdn.microsoft.com
 FOR ASP.NET
www.msdn.microsoft.com/net/quickstart/aspplus/default.com
www.asp.net
www.fmexpense.com/quickstart/aspplus/default.com
www.asptoday.com
www.aspfree.com
www.4guysfromrolla.com/index.aspx
APPENDIX

(A) SCREEN SHOTS

Fig A.1 Home Page


Fig A.2 Login Page
Fig A.3 Welcome Page
Fig A.4 Home Page
Fig A.5 Home Page
Fig A.6 Home Page
Fig A.7 Home Page
Fig A.8 Home Page
Fig A.9 Home Page
Fig A.10 Home Page
Fig A.11 Home Page
Fig A.12 Home Page
Fig A.13 Home Page
Fig A.14 Home Page
Fig A.15 Home Page
Fig A.16 Home Page
Fig A.17 Home Page

(B) SAMPLE CODING


Payment Form;
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 ShoppingCart.BL;

public partial class Payment_UcPayment : System.Web.UI.UserControl


{
int OrderNo;

double carttotal, taxamt;


protected void Page_Load(object sender, EventArgs e)
{

string SessionId;
SessionId = Session["sessionId"].ToString();
for (int i = 1; i <= 12; i++)
{
ddlMonth.Items.Add(i.ToString());
}
for (int j = 2007; j <= 2099; j++)
{ ddlyear.Items.Add(j.ToString()); }
carttotal =
Int32.Parse(ProductController.GetCartTotal(SessionId).ToString());
taxamt = 0.085 * ProductController.GetCartTotal(SessionId);

txtcamount.Text = "$ " +


ProductController.GetCartTotal(SessionId).ToString();
txttamount.Text = "$" + (0.085 *
Int32.Parse(ProductController.GetCartTotal(SessionId).ToString()));
txtnamount.Text = "$"+(carttotal + taxamt+10).ToString();
}
protected void txtcamount_TextChanged(object sender, EventArgs e)
{

}
protected void btnpay_Click(object sender, EventArgs e)
{
int i;
string a;

a = Session["sessionid"].ToString();
if (Session["UserName"] != null)
{
i =
ProductController.GetIdFromtblUserAccount(Session["UserName"].ToString());
OrderNo = ProductController.insertorder(i,
float.Parse(carttotal.ToString()), float.Parse(taxamt.ToString()),
float.Parse((carttotal + taxamt + 10).ToString()),
Int32.Parse(Session["shipid"].ToString()),
Int32.Parse(Session["billid"].ToString()), a,
Request["Billfname"].ToString());
btnpay.Enabled = false;
Response.Redirect("/Shopping/Thanks
page/frmThanks.aspx?orderno=" + OrderNo);
}
else
{

OrderNo =
ProductController.insertorder(int.Parse(Request["Custid"].ToString()),
float.Parse(carttotal.ToString()), float.Parse(taxamt.ToString()),
float.Parse((carttotal + taxamt + 10).ToString()),
Int32.Parse(Session["shipid"].ToString()),
Int32.Parse(Session["billid"].ToString()), a,
Request["Billfname"].ToString());
Response.Redirect("/Shopping/Thanks page/frmThanks.aspx?orderno="
+ OrderNo);
}
}
public int orderno
{
get
{
return OrderNo;
}
}

New User Form

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 ShoppingCart.BL;
using System.Data.SqlClient;

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


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

}
protected void btnSignin_Click(object sender, EventArgs e)
{
string s,l;
int IdRole = 0;
SqlDataReader dr = ProductController.GetLogin(txtUserName.Text,
txtPwd.Text);
if (dr != null)
{
if (dr.Read())
{
s = dr["FName"].ToString();
l = dr["LName"].ToString();
Session["Username"] = txtUserName.Text;
Object obj =
ProductController.GetRoleByUsername(txtUserName.Text.Trim());
if (obj != null)
{
IdRole = Convert.ToInt32(obj.ToString());
}

//FormsAuthentication.RedirectFromLoginPage(txtUserName.Text.Trim(),false);
if (IdRole == 8)
Response.Redirect("~/Admin/frmAdmin.aspx");
else

Response.Redirect("/Shopping/MyAccount/frmMyAccount.aspx?u=" +
Session["Username"]);
}
else
{
lblError.Text="not a valid user";
}
}
}
}

Shipping And Billing Form;

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 ShoppingCart.BL;
using System.Data.SqlClient;

public partial class Payment_ucShipping : System.Web.UI.UserControl


{
protected void Page_Load(object sender, EventArgs e)
{
string s = "";
ListItem li = null;
if (!IsPostBack)
{
country();
state();
city();

if (Session["UserName"] != null)
{
s = Session["UserName"].ToString();
SqlDataReader dr = ProductController.getAccountDetails(s);
if (dr.HasRows)
{
if (dr.Read())
{

txtfname.Text = dr["Fname"].ToString();
txtlname.Text = dr["Lname"].ToString();
txtContact.Text = dr["ContactNo"].ToString();
txtEmail.Text = dr["EmailID"].ToString();
txtaddr.Text = dr["Address"].ToString();
rdbtn.Text = dr["Gender"].ToString();

li=ddlCountry.Items.FindByValue(dr["CountryID"].ToString());
if (li != null)
li.Selected = true;
li =
ddlState.Items.FindByValue(dr["StateID"].ToString());
if (li != null)
li.Selected = true;

li=ddlCity.Items.FindByText(dr["CityID"].ToString());
if (li != null)
li.Selected = true;
}
}
}

}
}
private void state()
{
DataSet dsState = ProductController.getAllStatedetails();
BindDDL(ddlState, dsState, "Name", "ID");
BindDDL(ddlstate1, dsState, "Name", "ID");
}
private void country()
{
DataSet dsCountry = ProductController.getCountrydetails();
BindDDL(ddlCountry, dsCountry, "Name", "ID");
BindDDL(ddlcountry1, dsCountry, "Name", "ID");
}
private void BindDDL(DropDownList ddl, DataSet ds, string txtField,
string valField)
{
ddl.DataSource = ds;
ddl.DataTextField = txtField;
ddl.DataValueField = valField;
ddl.DataBind();
}
private void city()
{
DataSet dscity = ProductController.getCitydetails();
BindDDL(ddlCity, dscity, "Name", "ID");
BindDDL(ddlcity1, dscity, "Name", "ID");
}

protected void btnPayment_Click(object sender, EventArgs e)


{
int custid;
int []a=new int[2];

a = ProductController.spInsertAddressV2(txtfname.Text,
txtlname.Text, txtEmail.Text, rdbtn.SelectedItem.ToString(),
txtContact.Text,
txtaddr.Text, int.Parse(ddlCountry.SelectedItem.Value),
int.Parse(ddlState.SelectedItem.Value),
int.Parse(ddlCity.SelectedItem.Value));
custid=a[1];
Session["shipid"] = a[0];
a=ProductController.spInsertAddressV2(txtfname1.Text,
txtlname1.Text, txtmail1.Text, rdbtn1.SelectedItem.ToString(),
txtno1.Text, txtaddr1.Text,
int.Parse(ddlcountry1.SelectedItem.Value),
int.Parse(ddlstate1.SelectedItem.Value),
int.Parse(ddlcity1.SelectedItem.Value));
Session["billid"] = a[0];
Response.Redirect("/Shopping/Payment/frmPayment.aspx?Billfname=" +
txtfname.Text + "&custid=" + custid);
}

protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs


e)
{
DataSet dsState =
ProductController.getAllStatesByCountryID(int.Parse(ddlCountry.SelectedValu
e));
BindDDL(ddlState, dsState, "Name", "ID");
DataSet dsCity =
ProductController.getCitydetailsByStateID(int.Parse(ddlState.SelectedValue)
);
BindDDL(ddlCity, dsCity, "Name", "ID");
}
protected void ddlState_SelectedIndexChanged1(object sender, EventArgs
e)
{
DataSet dscity =
ProductController.getCitydetailsByStateID(int.Parse(ddlState.SelectedValue)
);
BindDDL(ddlCity, dscity, "Name", "ID");
}
protected void chkEditShip_CheckedChanged(object sender, EventArgs e)
{
if (chkEditShip.Checked == true)
{
txtfname.Enabled = true;
txtlname.Enabled = true;
txtContact.Enabled = true;
txtEmail.Enabled = true;
txtaddr.Enabled = true;
rdbtn.Enabled = true;
ddlCountry.Enabled = true;
ddlState.Enabled = true;
ddlCity.Enabled = true;
}

else
{
txtfname.Enabled =false;
txtlname.Enabled = false;
txtContact.Enabled = false;
txtEmail.Enabled = false;
txtaddr.Enabled = false;
rdbtn.Enabled = false;
ddlCountry.Enabled = false;
ddlState.Enabled = false;
ddlCity.Enabled = false;
}

}
protected void chkEditBiling_CheckedChanged(object sender, EventArgs e)
{
if (chkEditBiling.Checked == true)
{
ListItem li = null;
txtfname1.Enabled = false; txtfname1.Text = txtfname.Text;
txtlname1.Enabled = false; txtlname1.Text = txtlname.Text;
txtno1.Enabled = false; txtno1.Text = txtContact.Text;
txtmail1.Enabled = false; txtmail1.Text = txtEmail.Text;
txtaddr1.Enabled = false; txtaddr1.Text = txtaddr.Text;
ddlcountry1.Enabled = false;

rdbtn1.Items.FindByValue(rdbtn.SelectedValue.ToString()).Selected=true;

li=ddlcountry1.Items.FindByValue(ddlCountry.SelectedValue.ToString());
if (li != null)
{
ddlcountry1.ClearSelection();
li.Selected = true;
}
ddlstate1.Enabled = false;
li =
ddlstate1.Items.FindByValue(ddlState.SelectedValue.ToString());
if (li != null)
{
ddlstate1.ClearSelection();
li.Selected = true;
}
ddlcity1.Enabled = false;
li =
ddlcity1.Items.FindByValue(ddlCity.SelectedValue.ToString());
if (li != null)
{
ddlcity1.ClearSelection();
li.Selected = true;
}
}
else
{
txtfname1.Enabled =true;
txtlname1.Enabled =true;
txtno1.Enabled = true;
txtmail1.Enabled = true;
txtaddr1.Enabled = true;
rdbtn1.Enabled = true;
ddlcountry1.Enabled = true;
ddlstate1.Enabled = true;
ddlcity1.Enabled = true;
}

}
protected void ddlcountry1_SelectedIndexChanged(object sender,
EventArgs e)
{
DataSet dsState =
ProductController.getAllStatesByCountryID(int.Parse(ddlcountry1.SelectedVal
ue));
BindDDL(ddlstate1, dsState, "Name", "ID");
DataSet dsCity =
ProductController.getCitydetailsByStateID(int.Parse(ddlstate1.SelectedValue
));
BindDDL(ddlcity1, dsCity, "Name", "ID");
}
protected void ddlstate1_SelectedIndexChanged(object sender, EventArgs
e)
{
ddlCity.Items.Clear();
DataSet dscity =
ProductController.getCitydetailsByStateID(int.Parse(ddlstate1.SelectedValue
));
BindDDL(ddlcity1, dscity, "Name", "ID");

}
}

Вам также может понравиться