Professional Documents
Culture Documents
PROJECT REPORT
ON
“Online Medical System”
FOR
KOKATE MEDICAL SHOP
CHICHONDIPATIL
By
Mr. THOMARE MAHESH ASHOK
In Partial Fulfillment Of
Master of Computer Application (MCA)
2019-2020
2
ACKNOWLEDGEMENT
3
ACKNOWLEDGEMENT
this project to prove my knowledge and abilities. This project not only enhanced
The completion of any project is always due to the effort from numerous
In completing this project I have been fortunate to have help, support and
encouragement from many people. I would like to acknowledge them for their co-
operation.
First, I would like to thank my internal project guide Dr. Bhakkad sir , for
his constant motivation and valuable help through the project work. express my
suggestions and advices throughout the M.C.A course. I also extend my thanks to
other Faculties for their Cooperation durimy Course. I express my deep thanks to
extended towards me. I would also like to thank my Senior, who set help has me
INDEX
Chapter Description Page
1 Introduction
1.1 Company Profile 6
1.2 Existing System & Need for the System 7
1.3 Scope of Work 8
1.4 Operating Environment 10
1.5 Detail Description of Technology Used 11
2 Proposed System
2.1 Proposed System 13
2.2 Objective of System 13
2.3 User Requirements 14
3 Analysis and Design
3.1 Use Case Diagrams 19
3.2 Activity Diagrams 23
3.3 Sequence Diagram 37
3.4 Collaboration Diagram 50
3.5 Class Diagram 61
3.6 Menu Tree/Module Hierarchy Diagram 62
3.7 Component Diagram 63
3.8 Deployment Design 64
3.9 Table Design 65
3.10 Test Procedures & Implementation 68
4 User Manual 75
5 Drawbacks & Limitations 79
6 Proposed Enhancements 80
7 Conclusion 82
8 Bibliography 84
9 Annexure 1:User Interface Screen 85
Annexure 2:Sample Example Code 97
5
6
1.INTRODUCTION
The organization of KOKATE Medical Store is establish in year 2016 which are grown in
full
organization within.
Chapter-I
INTRODUCTION
7
Existing System:
The existing Medical Store System is manual system. The main drawback of the
existing system is time consumption. There are number of records and hence a larger
This document required more storing space, more manpower and job become tedious.
The main objective of this Online Medical Shop system is to take the whole
medical store online so that it is reachable to customers 24/7. It also aims at going
towards cashless transactions. It will impart a wider visibility to the customers.
Thus boosting the business to higher levels. The medical Booking Store will be a
web based system with a very user friendly interface which indeed will make the
whole management process easy to manage and operate with zero redundancies.
Overall online medical booking store will become an efficient, highly responsive
and an extremely accurate system.
This application is for all who wants to order their medicine online that is
customer. Customer first register to website then place order for the require
medicines. The delivery boy can track the order and also gives that information to
the customers. Admin can maintain all the details about customers , medicine
stock as well as the delivery boy.
Admin:
1. Login: Admin can login to the system by entering valid credentials.
2. Maintain product: Admin can maintain product details.
3.Maintain product category: Admin can maintain product categories.
4.View customer details: Admin can view customer details.
6. Generate bill: Admin can generate bill as per customer.
7. Generate purchase order: Admin can generate purchase order.
8. Maintain supplier detail: Admin can maintain supplier’s details i.e. Admin can
add, update and delete the suppliers details from the database.
9. Maintain delivery status: Admin can maintain details of delivery status.
10. Maintain Customer details: Admin can maintain customer details i.e. Admin
can perform add, update, delete function on customer .
11.manage order: Admin can manage order details
12. View Cart: Admin can view the cart i.e. products added into the cart.
13. view feedback: Admin can view the feedback given the customer.
9
14. Change password: Admin can change the password by clicking on change
password button.
15. Forgot password: Admin can change password if He forget the password.
Customer:
1. Registration: Customer has to register his profile to the system for using it.
2. Login: Customer can login after doing registration.
3. Change password: Customer can change the password .
4. Forgot password: Customer can change the password by doing Forgot
password.
5. View product: Customer can view the products after login.
6. Search and purchase product: Customer can search a product and purchase it.
7. Select product type as per prescription: Customer select product type as per
prescription.
8. Add to cart: Customer can add product to the cart by the clicking on Add to
Cart.
9. View cart: Customer can view the products added to the cart and he can remove
any product from the cart.
10. Make payment: Customer can make payment by Cash or by using credit/debit
card.
11. Track delivery details: Customer can track the status of the delivery
12. Give feedback: Customer can give feedback for the products, for delivery, or
for the website also.
13. Cancel order: Customer can cancel order.
14. Update profile: Customer can update his profile.
Delivery boy:
1. View order: Delivery boy can view order
2. Accept order: Delivery boy can accept order.
3.Send Notification: Delivery boy can send notification to admin and customer.
4.Update delivery status: Delivery boy can update delivery status.
10
Software Requirements :
Operating system :
Windows
Operating system :
Windows
HTML-
HTML is an acronym which stands for Hyper Text Mark-up Language
which is used for creating attractive web pages and web applications.
CSS-
CSS stands for Cascading Style Sheets. It is a style sheet which is used to
describe the look and formatting of a document written in mark-up language. It
provides and additional feature to HTML.
SQL Server-
SQL server is a relational database management system. It is open-source
and free. It is very commonly used in conjunction with Asp.net to create
powerful and dynamic web forms.
ASP.NET
ASP.NET is a web application framework developed and marketed by
Microsoft
to allow programmers to build dynamic web sites. It allows you to use a full featured
programming language such as C# or VB.NET to build web applications easily.
Bootstrap
Bootstrap is the most popular HTML, CSS, and JavaScript framework for
1.1References:
Websites:
www.en.m.wikipedia.org/wiki
www.javatpoint.com
www.w3school.com
Tools:
Rational Rose Enterprise Edition 2008
Notepad++
Books:
Object Oriented Analysis and Design- Dr. Potdar Sir
12
Chapter-II
Proposed System
13
2. PROPOSED SYSTEM
to assist people making purchases. The primary goal of an The Medical shop
In manual system buy product is time consuming but with the help of site we can
There are three users can login into System, Admin ,Customer and Delivery boy :
Admin:
1. Admin can login to the system by entering valid credentials.
2. Admin can maintain product details.
3. Admin can maintain product categories.
4. Admin can view customer details.
6. Admin can generate bill as per customer.
7. Admin can generate purchase order.
8. Admin can maintain supplier’s details i.e. Admin can add, update and delete the
suppliers details from the database.
9. Admin can maintain details of delivery status.
10. Admin can maintain customer details i.e. Admin can perform add, update,
delete function on customer .
11. Admin can manage order details
12. Admin can view the cart i.e. products added into the cart.
13. Admin can view the feedback given the customer.
14. Admin can change the password by clicking on change password button.
15. Admin can change password if He forget the password.
Customer:
1. Customer has to register his profile to the system for using it.
2. Customer can login after doing registration.
3. Customer can change the password .
4. Customer can change the password by doing Forgot password.
5. Customer can view the products after login.
6 Customer can search a product and purchase it.
7. Customer select product type as per prescription.
8. Customer can add product to the cart by the clicking on Add to Cart.
15
9. Customer can view the products added to the cart and he can remove any
product from the cart.
10. Customer can make payment by Cash or by using credit/debit card.
11. Customer can track the status of the delivery .
12. Customer can give feedback for the products, for delivery, or for the website
also.
13. Customer can cancel order.
14. Customer can update his profile.
Delivery boy:
1. Delivery boy can view order.
2. Delivery boy can accept order.
3. Delivery boy can send notification to admin and customer.
4. Delivery boy can update delivery status.
16
The proposed system that we are going to develop will be used by the admin and
by many customers. Admin can manage the data of product, sales, purchases, bill,
and various customers. The online medical shop management system is developed
to enable customer to buy medicines. The database is handled by the admin only
that He can retrieve product details and manage it. Therefore, it is expected that
the database
would perform functionality all the requirements that are specified by the
university.
The performance of the system should be fast and accurate.
Online Medical shop system shall handle expected and non-expected errors in
a ways that prevent loss in information and long downtime period. Thus it
should have inbuilt error testing to identify invalid username and password.
The system should be able to handle large amount data because many products
and customers are handled.
The users of the system are Admin , Customers and delivery boy. The Admin and
the delivery boy should have more knowledge of the internals of the system and is
able to rectify the small problems that may arise due to disk crashes, power
failures and other catastrophes to maintain the system. The proper user interface,
user manual, online help and the guide to install and maintain the system must be
sufficient to educate the users on how to use the system without any problems.
The admin provides certain facilities to the users in the form of :
Backup and Recovery
Forgot Password
Data migration i.e. whenever user register for the first time then the data is
stored in the server
Data replication i.e. if the data is lost in one branch, it is still stored with the
server
Auto Recovery i.e. frequently auto saving the information
Maintaining files i.e. File Organization
The server must be maintained regularly and it has to be updated time to time.
18
Chapter III
Analysis and Design
19
Login
Maintain Product
View Product
Generate Bill
View Cust_Details
Maintain Supplier
View Feedback
Maintain Frequent_Cust
21
Registration
Login
View Product
Make Payment
Cancel Order
Send Feedback
Update Profile
22
Login
(from Usecase Diagram)
Update Profile
(from Usecase Diagram)
delivery boy
(from Usecase Diagram)
View Cust_Details
(from Usecase Diagram)
View Feedback
(from Usecase Diagram)
accept order
(from Usecase Diagram)
Cancel Order
(from Usecase Diagram)
23
Enter Username
Enter password
[If invalid]
[if valid]
Go to next page
Enter current
password
Enter new
password
[ if invalid ]
[ if valid ]
save
24
Enter Address
Enter mobile
Number
if invalid
Enter Email
Display Error
Message
[ if invalid ]
[ if valid ]
Enter Username
Ente r password
[ if invalid ]
[ if valid ]
Enter Username
Enter Security
Question
Display Error
Message
Enter answer
[ if invallid ]
[ if valid ]
Enter new
password
Display Error
Message
confirm
password
[ if invalid ]
[ if vallid ]
save
Display Cart
Make Proceed
payment
Enter Order Id
Enter Customer
Name
Display Product
Detail
Enter Delivary
Boy Name
Send
Enter order id
Enter username
[ if not found ]
[validate]
[ if found ]
Display order
Details
cancel Order
[add product]
[ update/delete product ]
Add product
name
[ if update ]
Add catagory
[ if delete ]
Add product
company Display
Displayproduct
product Display product
list
list list
Add packing
Display list
Display list
Enter product
save name Delete Supplier
Edit catagory
Enter product
company
Enter packing
save
[ if update/delete catagory
[ if add catagory ]
save Display
Display catagory list
catagory list
Select catagory
select catagory
Edit catagory
name
Delete catagory
name
save
[ update/delete supplier ]
[ if add supplier ]
Edit supplier
name
[ if update ]
Add supplier [ if delete ]
name
Display Supplier
Edit supplier list
contact Display Supplier
list
select Supplier
save
select Supplier
Edit supplier
name
save
Fetch customer
details
Dislay Details
Select payment
method
[ if credit ] [ if debit ]
Enter card
number
Enter expiration
date
[ if valid ]
Place order
Enter produt id
Enter batch
Enter expiry
date
Display Error
Message
[ if invalid ]
[ if valid ]
Enter M.R.P.
Enter quantity
Enter rate
Enter amount
Add supplier ID
save
Enter supplier
name
Enter supplier
Adress
Enter shipping
address
Enter product
name
Enter product
company
Enter packing
Enter quantity
want to continue
calculate
amount
select payment
method
[ if COD ]
cash on delivary
[ if online ]
online
Pay bill
Print purchase
order
Enter product
Search product
Display list
Add product to
cart
Select Product
Enter product Catagory
Display list
[ not found ]
[ If found ]
Display product
Fetch user Id
Enter Address
Enter mobile
Number
if inv alid
Display Error Message
[ if inv alid ]
[ if v alid ]
Enter Username
Enter password
Display Error
Message
Conf irm
[ if inv alid ]
Password
[ if v alid ]
Enter Security
Question
Enter Answer
Enter name
Enter Email
Enter Feedback
save
Display list
Display
feedback
Display Cart
Make Proceed
payment
Enter customer
name
[ if not found ]
[ if found ]
Display
customer ID
Display
customer name
Display customer
Adress
Display customer
mobile no
Enter password( )
Send Data( )
Validate( )
[If invalid]
DisplayError message
[If valid]
login sucessfully
Enter batch( )
validate( )
Save in database( )
Display appropriate mess...
Enter fullname( )
Enter Adress( )
[if valid]
Select Gender( )
Enter age( )
Enter Email( )
Send data( )
validate( )
[if invalid]
display error message
[if valid]
Enter username( )
Enter password( )
confirmed password( )
Send data( )
validate( )
[if invalid]
Display error message
[if valid]
enter security question( )
Enter answer( )
Send data( )
Update Database( )
display appropriate message
SEnd data( )
Request to cancel( )
confirmed password( )
Send Data( )
Validate( )
[If invalid]
Display error message
update database()
[If valid]
Display password updated message
Enter Email( )
Enter feedback( )
Send Details( )
[If valid]
save in database( )
Enter username( )
Enter answer( )
Send Data( )
Validate( )
[if invalid]
Display error message
[if valid]
Enter password( )
confirm password( )
Send data( )
Validate( )
[if invalid]
Display error message
[if valid]
Upadate database( )
validate( )
Display delivary details...
Details send to customer...
Send data( )
Validate( )
[if found]
Display product( )
Add product to cart...
Display product details...
if want to continue
Display products( )
Select option( )
validate( )
[if valid]
Save in database( )
Display approriate mess...
[if update
fetch product list( )
Edit packing( )
Send data( )
validate( )
[if valid]
Update database( )
[if delete]
validate( )
[if valid]
Update database( )
Display appropriate mess...
Slect option( )
validate( )
[if valid]
Save in database( )
validate( )
[if valid]
Update database( )
Display appropriate mess...
[if delete]
validate( )
[if valid]
Update database( )
Display appropriate message
validate( )
Save in database( )
Display appropriate message
validate( )
update database( )
Display approprite mess...
update database( )
Displat appropriate mess...
[if credit]
Display Details( )
validate( )
validate( )
[if valid]
place order( )
Update database()
Enter company( )
Enter packing( )
Enter quantity( )
Send data( )
[if valid]
Print P.O( )
Update database()
[if COD]
Print P.O( )
Enter product( )
Select supplier( )
if search Send data( )
validate( )
[if invalid]
display error message
[if valid]
Display product( )
if select
catagory fetch product details...
Display products( )
Select option( )
Add quantity( )
send data( )
Save in DB( )
Display Appropriate mess...
Enter adress( )
Enter mobile( )
[ifsend
invalid]
data( )
[if valid]
validate( )
display error msg
[if vaLID]
validate( )
Enter username( )
[if invalid]
Enter password( )
[if valid]password( )
confirm send data( )
validate( )
enter answer( )
send data( )
validate( )
save in database( )
Display appropriate mess...
Send data( )
Validate( )
[if invalid]
Display error message
fetch data()
[if valid]
Search product( )
Send data( )
1: Enter Username( )
2: Enter password( )
3: Send Data( )
4: Validate( )
: Logincontrol : RegistrationDB
1: Enter name( )
2: Enter Email( )
3: Enter feedback( )
: customer
: feedback boundry
5: validate( )
4: Send Details( )
7: save in database...
: feedback control
: feedbackDB
1: Enter fullname( )
2: Enter Adress( )
3: Enter mobile no( )
7: Select Gender( )
8: Enter age( )
9: Enter Email( )
13: Enter username( )
14: Enter password( )
15: confirmed password( )
19: enter security question( )
20: Enter answer( )
: customer
: Registration boundry
4: Send data( )
5: validate( ) 10: Send data( )
11: validate( ) 16: Send data( )
17: validate( ) 21: Send data( )
: RegistrationDB
: Registration control
4: Send data( )
5: validate( ) 12: Send data( )
13: validate( )
: ProductDB
: Add product control
4: Send Data( )
5: Validate( )
7: update databas...
4: Send Data( )
11: Validate( ) 10: Send data( )
5: Validate( )
13: Upadate database...
9: validate( )
3: Send data( )
8: Send data( )
5: Fetch data()
: maintain delivary control : OrderDB
2: Select option( )
3: Add product name( )
4: Add catagory( )
5: add company name( )
6: add packing( )
12: Display product list( )
13: Select Product( )
14: Edit product name( )
15: Edit catagory( )
16: Edit product company( )
17: Edit packing( )
23: Display product list( )
24: Select Product( )
25: Delete product( )
9: Save in database( )
20: Update database( )
28: Update database( )
: maintain catagory
control : ProductDB
1: select option( )
2: add supplier name( )
3: Add supplier contact( )
4: Add supplier adress( )
10: select supplier( )
11: Edir supplier name( )
12: Edit supplier contact( )
13: Edit supplier adresss( )
19: select supplier( )
20: Delete supplier( )
7: Save in database( )
16: update database( )
23: update database( )
: Payment boundry
3: Display Details( )
10: Display error mess... 1: fetch product details( )
: customer
11: [if valid]
18: Display eror mess...
19: [if valid]
: ProductDB
9: validate( )
8: Send data( )
17: validate( )
16: Send data( )
: OrderDB
: payment control
: customer
4: Display error ...
8: Display product details( )
9: if want to continue
3: Validate( )
2: Enter product( )
3: Select supplier( )
9: Display catagory list...
10: select product catagory( )
11: Display products( )
: customer
: select product
: ProductDB
: supplierDB
: customer
: update profile boundry
: RegistrationDB
: update profile control
2: Select option( )
4: Add quantity( )
8: Select Product( )
1: Display cart( )
7: Display Appropriate message
11: Display Appropriate message
5: send data( )
9: Remove Product( ) 3: fetch product details( )
6: Save in DB( )
10: Update Database( )
: ProductDB
2: Send data( )
6: Display customer details( )
3: Validate( )
5: fetch data()
: view customer control : Customer DB
61
2: Send data( )
Payment
Order_Master Pay_no(PK)
date
O_M_id(PK) Product
pay_type
P_id(FK)
O_M_id(FK) P_id(PK)
p_name
Registration U_id(FK) p_name
quantity 1
U_id(PK) p_type
amount
uname make payment() packing
U_id(FK) 1
adress c_name Purchase
o_status
mobile batch Pc_id(pk)
cart_id(FK)
email expiry date
1..* 1..*
username rate p_name
cancel order()
password S_id(FK) quantity
view order()
squestion 1 cat_id(FK) P_id(FK)
1 make order()
cart_id(FK) 0..* S_id(FK)
answer 1..*
E_no(FK)
cart_id(FK) 1 1..* view product() add order()
O_M_id(FK) 1 add product() cancel order()
1..*
delete product() update order()
Feedback Order_transection 1
registration() view P.O()
E_no(PK) O_D_id(PK) 0..* 1..*
login()
uname date
changed password() 0..1 0..*
email P_id(FK) 1
forget password() 1 1..* catagory
feedback O_M_id(FK)
update profile() cat_id
U_id(FK)
view order details() cat_name
1..*
view feedback() cat_img
1..* p_no(FK) Supplier
send feedback()
responce feedback() S_id(PK)
add catagory() s_name
delete catagory() s_adress
s_contact
0..*
P_id(FK)
Login Login
Login
View Customers
Search Product Update Delivery
Status
View Feedback
Change Delivery
Status
Database
SQL server
Server
Client
ASP.Net
Registration Table
66
Product Table
Order-transection table
Supplier table
Feedback Table
Payment table
Purchase table
Stock table
Test Cases:
1. Login:
71
Test Test case Test case Input Expected Actual Test Test Test
case name Descriptio result Result case status prio
Id n status (p/f) rity
2. Email:
3. Mobile No:
Test TCMobileNo
Case
73
ID:
Test Test Case For Mobile Number
Case
Name:
Step No. Steps to Expected Actual Pass / Remarks Defect
be Results Results Fail ID
Executed
1 Enter Invalid Invalid Pass Invalid NIL
more than Mobile Mobile Mobile
10 or less Number Number is number is
than 10 message displayed checked
digit should be
number displayed
2 Enter System Entered Pass Valid NIL
Valid should Mobile Mobile
Mobile accept number is number
Number And Displayed are
proceed checked
4. Upload Image:
Chapter-IV
USER MANUAL
4. USER MANUAL
Purpose:
The main purpose of user manual is to provide information which helps user in
A proper user manual allows user to operate the system easily and effectively The
user manual contains all the information about the new system It is prepared for
Web Services
In this module Admin can maintain product, category, supplier, delivary and view
Operations Manual
Purpose
Homepage
Chapter-V
DRAWBACK &
LIMITATIONS
80
Drawbacks &limitation
Efforts have been taken to complete this website but still it has some
drawbacks.
Limitation
81
Chapter-VII
CONCLUSION
83
7. CONCLUSION
The online medical website will help the user to buy a product online.
User can buy a product as per their requirement or as per doctor advice.
Chapter-VIII
BIBLIOGRAPHY
85
8. BIBLIOGRAPHY
Web References :-
www.google.com
w3cschool.com
Youtube .com
stackoverflow.com
1mg.com
Books References :-
3.9.2 Registration
87
3.9.2 Registration
88
3.9.3 Homepage
3.9.15 Cart
95
3.9.17 Payment
96
3.9.18 Feedback
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class home : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["cat"] != null)
{
DataList1.DataSourceID = null;
DataList1.DataSource = SqlDataSource2;
DataList1.DataBind();
}
if (Session["username"] == null)
{
Label6.Text = "Hello Guest,";
LinkButton7.Visible = true;
LinkButton6.Visible = false;
LinkButton8.Visible = false;
}
else
{
Label6.Text = "Hello " + Session["username"].ToString();
LinkButton8.Visible = true;
LinkButton7.Visible = false;
DropDownList2.Visible = true;
}
DataTable dt = new DataTable();
dt = (DataTable)Session["buyitems"];
if (dt != null)
{
Label3.Text = dt.Rows.Count.ToString();
}
else
{
Label3.Text = "0";
}
protected void ImageMap1_Click(object sender, ImageMapEventArgs e)
{
}
protected void LinkButton5_Click(object sender, EventArgs e)
{
DataList1.DataSourceID = null;
99
DataList1.DataSource = SqlDataSource1;
DataList1.DataBind();
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("home.aspx?cat=ALLOPATHY");
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
Response.Redirect("home.aspx?cat=HOMEOPATHY");
}
protected void LinkButton3_Click(object sender, EventArgs e)
{
Response.Redirect("home.aspx?cat=AYURVEDA");
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
Response.Redirect("home.aspx?cat=NUTRITION");
}
protected void Button2_Click(object sender, EventArgs e)
{
if (TextBox1.Text != "")
{
DataList1.DataSourceID = null;
DataList1.DataSource = SqlDataSource3;
DataList1.DataBind();
}
}
protected void DataList1_ItemCommand(object source,
DataListCommandEventArgs e)
{
if (e.CommandName == "addtocart")
{
}
}
protected void LinkButton7_Click(object sender, EventArgs e)
{
Response.Redirect("login.aspx");
}
protected void LinkButton6_Click(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("home.aspx");
}
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Cart.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("BuyNow.aspx?price=" + Label3.Text);
}
100
}
protected void LinkButton8_Click(object sender, EventArgs e)
{
Session.Abandon();
Response.Redirect("home.aspx");
}
}
Login.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Configuration;
using System.Data;
using System.Data.SqlClient;
}
private void clearAll()
{
TextBox1.Text = "";
TextBox2.Text = "";
}
protected void Button1_Click(object sender, EventArgs e)
{
String Constr =
WebConfigurationManager.ConnectionStrings["conString"].ConnectionString;
SqlConnection scon = new SqlConnection(Constr);
101
scon.Close();
if (uname == "admin" && pass == "admin")
{
Session["username"] = uname;
Session["buyitems"] = null;
Response.Redirect("product.aspx");
}
else if (uname == "db1" && pass == "db1" || uname == "db2" &&
pass == "db2" || uname == "db3" && pass == "db3" || uname == "db4" && pass
== "db4")
{
Session["username"] = uname;
Session["buyitems"] = null;
Response.Redirect("delivaryBoy.aspx");
}
else
{
Session["username"] = uname;
Session["buyitems"] = null;
Response.Redirect("home.aspx");
Registration.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.IO;
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
int inserted = 0;
SqlConnection mycon = new SqlConnection(@"Data
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated
Security=True;User Instance=True");
mycon.Open();
String insertSQL;
insertSQL = "Insert into
registration(f_name,l_name,mobile,email,username,password,squestion,answer)v
alues(@f_name,@l_name,@mobile,@email,@username,@password,@squestion,@answer)
";
SqlCommand cmdinsert = new SqlCommand(insertSQL, mycon);
cmdinsert.Parameters.AddWithValue("@f_name", TextBox1.Text);
cmdinsert.Parameters.AddWithValue("@l_name", TextBox2.Text);
cmdinsert.Parameters.AddWithValue("@mobile", TextBox3.Text);
cmdinsert.Parameters.AddWithValue("@email", TextBox4.Text);
cmdinsert.Parameters.AddWithValue("@username", TextBox8.Text);
cmdinsert.Parameters.AddWithValue("@password", TextBox6.Text);
cmdinsert.Parameters.AddWithValue("@squestion",DropDownList1.Text);
cmdinsert.Parameters.AddWithValue("@answer", TextBox7.Text);
inserted = cmdinsert.ExecuteNonQuery();
mycon.Close();
lblmsg.Text = "Registration successful";
Response.Redirect("login.aspx");
}
catch (Exception x)
{
Response.Write(x.Message);