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 ...