|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help required please
Hi there, I have a huge question that I need some help on.
But before I ask the question, here is some background information: This is the main area of the website (but not the first page(s) viewed). It is where society members come to check on their investments as well as buy and sell stocks. Only registered, and logged in, members can view these pages. This process will take several pages. When the users first enter the Trading Page their Stock Portfolio will be displayed. This Stock Portfolio will have the following information for each stock owned: A heading with Lastname, Firstname Stock Name Quantity Owned Value of all stock shares for each stock owned The initial page will also have a form where the user can buy more stocks, or sell a portion of the existing holdings. This form will have the following: Buy/Sell option (use a radio button) A select control filled with names of at least 10 companies (loaded from a database table) that the user select from to initiate a trade The price of each stock will be clearly displayed in a textbox (read only HINT: use the onChange event of the SELECT control) A text box for quantity of stocks to be purchased or sold (in units of 1000) this will be validated (JavaScript) A button that, when pressed, will initiate the trade by sending this information to the next ASP page. The second page of the Trading Pages will do the following: 1. Test Buy vs. Sell 2. If Sell and quantity of stocks from previous page exceeds Portfolio quantity, then an error message and redirect link back to the previous page. 3. Display the requested transaction in a form containing the following: a. Stock (read only) b. Quantity (read only) c. Price per share (read only) d. Transaction Price (read only) e. Transaction Fee (10% of Transaction Price for buying and 5% of Transaction Price for selling) (read only) f. Total Cost (read only) g. Two buttons Confirm and Cancel On Confirm user will be redirected to a third ASP page On Cancel user will be redirected back to main Trading Page The third page will do all the database transactions (INSERT or UPDATE) and, upon completion, will redirect the user back to the main Trading Page. Each transaction will be recorded and tracked as per the supplied ERD sample. Now I already have the javascript for the trading of the stocks, but I do not know how have it update in the SQL database. What I want to know is, can anyone show me a code of having the stocks updated into the sql where the information is retreived? I hope that makes sense to you all. |
|
#2
|
||||
|
||||
|
So what is your question exactly? Do you need help with your select statment? DB Connection? Getting your request.form("") working, or all of it? Each one of these questions have been answered before, so take a look at the search page. If its a specific problem let me know, and i can try to help.
|
|
#3
|
|||
|
|||
|
My fault for not being really clear.
MY question is when they buy a stock, how do I show what they have bought on the page and have it saved in the sql database? |
|
#4
|
||||
|
||||
|
Im not going to take the time to write all the code for you, just do some searches on these terms: Forms, Insert, Request.Form. Some basic info that you need to write in ASP.
To show items from your form you just write out Request.Form("textfieldname goes here"). If you need to insert into a table: "INSERT INTO tableName (FIELD NAMES) values ('" & request.form("textfieldname") &'") some good links for some great info: http://www.w3schools.com/asp/default.asp (asp info) http://sqlcourse.com/ (sql help) Good Luck |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Help required please |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|