Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys ! I had a trouble about relational database in a complex project of asp.net …
I have 6 relational table like shown below :

winners
WinnderId int Unchecked
UserId int Unchecked
UserName nvarchar(50) Checked
Unchecked

Users
UserId int Unchecked
Name nvarchar(50) Unchecked
LastName nvarchar(50) Unchecked
UserName nvarchar(30) Unchecked
Email nvarchar(80) Unchecked
Password nvarchar(30) Unchecked
Mobile nchar(15) Unchecked
Address nvarchar(200) Unchecked
PostalCode nchar(15) Unchecked
CreditValue decimal(18, 0) Checked
Unchecked

Tender
TicketId int Unchecked
TicketNumber int Checked
TicketAmount int Checked
TicktDate date Checked
TicketType tinyint Checked
UserID int Checked
image nvarchar(250) Checked
Unchecked

tenderUser
TenderUserId int Unchecked
TenderId int Unchecked
UserId int Unchecked
CreationDate datetime Unchecked
Unchecked
tender
TenderId int Unchecked
Name nvarchar(50) Unchecked
Price int Unchecked
Price_Tender int Unchecked
Image nvarchar(250) Unchecked
UserId int Checked
Increaseperclick decimal(18, 0) Unchecked
Decreaseperclick decimal(18, 0) Checked
Time time(7) Unchecked
Unchecked


every login User can make a tender(tender table) , first of all every user should have certificate to make tender (should buy a ticket, user table is in relation with ticket),as every user can make a tender, I want to save the UserId and TenderId in separate table (tenderUser) that is in relation with Winners to specify the winner User( the last User in tenderUser for a specific tenderId will be winner of the tender(UserID) and will save in winners table )

Now in asp.net form by clicking the user in a button all of task above should be checked !! I really don’t have any imagine about how to implement this …
I mention again the procedure step by step : after clicking the User in a product ( tenderId in tender table )
1-the User CreditValue(User table) will be checked to making the sure that has amount
2- if the User has the limited amount, the UserId and tenderId(same product) will be saved in tenderUser table
3-every User can make tender again and again , in other words a UserId could save in tenderUser separately at least ! for example we can have in tenderUser table : tenderUserId: alice , micheal, pitter,alice , … but we can’t have : Roberto, Elizabeth , pitter , pitter , micheal ,…  a user can make tender for one time before another User has not make any tender
4- we increaseperclick and decreaseperclick field in datase …by clicking the User in a product or tender the increaseperclick will add to price_tender and decreaseperclick decrease the creditvalu of User

please someone help me , I'm so confused about this !
I can explain more if anyone want's to help , thanks ...
Posted
Updated 3-Feb-12 5:33am
v4
Comments
Sridhar Patnayak 3-Feb-12 11:03am    
It sounds like homework!
EhsanGhanbari 3-Feb-12 11:33am    
yeah !
R. Giskard Reventlov 3-Feb-12 12:15pm    
No homework! Speak to your tutor if you're stuck.
EhsanGhanbari 3-Feb-12 12:28pm    
hey ... that's not a home work ! it's a part of my project, I'm looking for a solution how ti implement it.

1 solution

If this is not homework, if you're being paid to do this, who designed the database, and why are they working with someone who can't understand how to use it ? You're asking us to do your job for you, and we don't do that. Talk to the person who designed the database. If you have no clue how to write DB code, tell them that, and see if they are willing to wait while you learn.
 
Share this answer
 
Comments
EhsanGhanbari 3-Feb-12 15:26pm    
I didn't ask you to do all of this project for me dear !! I have done about 80% of this project , and it is impossible for all of you to do this with this limited document, I only asked a solution at least in two of three sentences about how to implement ...thanks !

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