Click here to Skip to main content
15,896,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to create a mini shopping cart.

So here is example of what I have. so please correct me if I need to change.

The product that is being sold is a service.
The service allow a user to have document reviewed.

I have created a form that user file out and upload documents for review. -this works-
I can create the code to check if user purchase before allowing access to this page.

how do build the tables this 3 or 4 tables I having problems with.

So here is what I have done.

My tables are:User, Roles, User_In_Roles. Doctors, Reviewers, Patients, Products, Order_Details, Carts.

When doctor log in user he have to purchase service from the cart in order to submit for review. I need to see how to connect the tables. How should products order_details, cart connects to the Patients and Doctors table.


Doctors purchases service product,code 5 from the product table. Click cart to pay. Every time a doctor submits a patients form to be reviewed it will be subtracted from the quantity value from the program he purchase.

This is my table connections:

product has a fk to doctors, order_details, patients and cart.

order_details has a fk to patients.

cart has a fk to patients and product.

My product table is this.
ProductId int PK
PatientsId int FK
DoctorsId int FK
Program string
price numeric

My Order_Details table
OrderDetailsId int PK
PatientsId Fk
ProductId FK
Quantity int
Price numeric

My Cart table is this
CartId int PK
PatientsId Fk
ProductId Fk
Count int


Please direct me on how to properly connect the tables.
Posted

1 solution

A sample application on shopping cart is given here
http://www.asp.net/web-forms/tutorials/tailspin-spyworks[^]
and data access layer is explained here
http://www.asp.net/web-forms/tutorials/tailspin-spyworks/tailspin-spyworks-part-2[^]
I think it may be helpful to you
 
Share this answer
 
Comments
postonoh 16-Mar-12 12:26pm    
Thanks, Will take a look
postonoh 19-Mar-12 18:14pm    
Tailspin does not work error messages.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900