CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.commerce_starter_kit Tags:
Item Type: NewsGroup Date Entered: 9/8/2004 12:59:57 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 95 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
whisky
Asp.Net User
Calculate price problem9/8/2004 12:59:57 PM

0/0

Hi,

I have a shopping cart page same as ShoppingCart.aspx.
In the store the user can select whether to calculate the price according to yards or meters.
I wrote a stored procedure that checks to see whether the user selected yards or something else.
Then I have a component that calls the stored procedure as follows:

Public Function GetItems(ByVal cartID As String, ByVal Yards As String) As SqlDataReader

' Create Instance of Connection and Command Object
Dim myConnection As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"))
Dim myCommand As SqlCommand = New SqlCommand("ShoppingCartList", myConnection)

' Mark the Command as a SPROC
myCommand.CommandType = CommandType.StoredProcedure

' Add Parameters to SPROC
Dim parameterCartID As SqlParameter = New SqlParameter("@CartID", SqlDbType.NVarChar, 50)
parameterCartID.Value = cartID
myCommand.Parameters.Add(parameterCartID)

Dim parameterYards As SqlParameter = New SqlParameter("@yards", SqlDbType.NVarChar, 50)
parameterYards.Value = Yards
myCommand.Parameters.Add(parameterYards)


' Execute the command
myConnection.Open()
Dim result As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

' Return the datareader result
Return result

End Function



The sub PopulateShoppingCartList in aspx.vb uses the function above. PopulateShoppingCartList is called on page load and after the user hits the Update ShoppingCart button. When I use hardcode obviously it works but i need to do it w/o hardcode and i'm not sure how. How do I let the stored procedure know whether the user selected yards or something from the dropdownlist in the datagrid?


Sub PopulateShoppingCartList()

Dim cart As Components.ShoppingCartDB = New Components.ShoppingCartDB

' Obtain current user's shopping cart ID
Dim cartId As String = cart.GetShoppingCartId()

' If no items, hide details and display message
If cart.GetItemCount(cartId) = 0 Then
DetailsPanel.Visible = False
MyError.Text = "No items in basket"
Else
' Databind Gridcontrol with Shopping Cart Items
MyList.DataSource = cart.GetItems(cartId, "yards")
MyList.DataBind()

'Update Total Price Label
lblTotal.Text = String.Format("{0:c}", cart.GetTotal(cartId))
End If

End Sub
1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Exceptional Selling: How the Best Connect and Win in High Stakes Sales Authors: Jeff Thull, Inc NetLibrary, Pages: 272, Published: 2006
Leaving Eden: To Protect and Manage the Earth Authors: E. G. Nisbet, Pages: 358, Published: 1991
Economics Authors: Walter J. Wessels, Pages: 636, Published: 2006
Financial Accounting: An Introduction to Concepts, Methods, and Uses Authors: Clyde P. Stickney, Roman L. Weil, Pages: 704, Published: 2004
Pharmaceutical Calculations Authors: Howard C. Ansel, Mitchell J. Stoklosa, Pages: 425, Published: 2005
Cost Accounting: A Managerial Emphasis Authors: Charles T. Horngren, Srikant M. Datar, George Foster, Pages: 856, Published: 2003
McGraw-Hill's ACT Authors: Steven Dulan, Pages: 634, Published: 2007
Integration Plan Using "Calculate with Care": Problem Solving & Dosage Calculation Authors: Mary R Price, Helen L Ferguson, Pages: 100, Published: 1990
Economics Authors: Michael Parkin, Pages: 888, Published: 2007

Web:
Calculate price problem - ng.asp-net-forum.commerce_starter_kit ... Calculate price problem, > ROOT > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.commerce_starter_kit, Date: 9/8/2004 12:59:57 ...
Calculate Maximum Profit: solving for price, quantity, revenue ... Description: Calculate Price, Quantity, Revenue, and Costs for Maximum Profit ... maximum, maximum profit, night timers, price, problem, profit, quantity, ...
Calculate the Sale Price of an Item on Sale - WebMath Calculate the Sale Price of an Item on Sale - powered by WebMath. ... With Cosmeo, you choose your textbook, type in a page #, click on a problem # and ...
Dr. T 's Accounting Problems and How to Examples for Managerial ... Online Accounting Example Problems and Tutorials on: Calculating Net Income, Balance Sheets, Job Order Costing Examples, Manufacturing Overhead, ...
Solve the problem - Formula to calculate the offer price for a ... Solve the problem - Formula to calculate the offer price for a single family rental property Find answers to this and many other questions ...
How to Calculate Electric Costs – Energy 101 | eHow.com How to Calculate Electric Costs – Energy 101. How much electrical energy you consume is based on ... Problem 3 – How much did it cost to operate that lamp? ...
Calculating price elasticity - Patent 7343355 Mar 11, 2008 ... Calculating price elasticity includes accessing a number of demand ... disadvantages and problems associated with previous techniques for ...
Calculate Maximizing Profit by charting demand curve, revenue, and ... Description: Calculate Price, Quantity, Revenue, and Costs for Maximum Profit ... The Assigned Homework Problem; Price Demand Curve: Plot Price and Quantity ...
Quicken Community - How does Quicken calculate cost basis of a ... And make sure to allow Quicken to compute the price/share, ... I have a sale in 2005 with the same problem and have followed the same steps ...
Calculating lower bounds for caching problems price difference into account. The second is that in another paging model (using ..... methods to calculate lower bounds for on-line paging problems using ...

Videos:
C++ Exercise 4 Problem : Calculate the estimated cost of a trip given the distance of the trip, the estimated number of miles per gallon, and the average cost of ...
Real Estate Investment Analysis Software – Structure Win-Win ... How to buy real estate investments safely with low risk and high profit and cashflow—starting and experienced investors get high return on ...
CRAP CIRCLES, HOOVER CRAFT AND fMRIs We have a burning problem on our hands. --- The problem are Crap Circles, and no, I dont mean Crop Circles, which one way or another are the ...
N64 Sherbet Land World Record 2'05"417* Welcome guys. Let me take you into a world of bad luck, pain, and somehow some satisfaction as well. I guess you all know the history: It was ...
M163 SP Vulcan Air Defense System (VADS) The M163 Vulcan Air Defense System (VADS) is a self-propelled anti-aircraft gun (SPAAG) that was used by the United States Army. The M168 gun is a ...
N64 Sherbet Land World Record 2'05"417*-Live Welcome guys. Let me take you into a world of bad luck, pain, and somehow some satisfaction as well. I guess you all know the history: It was ...
Super Gas Saver- Excellent Methods to Decrease Your Fuel ... http://www.alternativefuelstips.com Almost all of us are of the problem we about to face nowadays. As gas prices go higher, the need to save gas ...
В.Путин.Вступительное слово.25.10.02 Opening Remarks at a Meeting with the Heads of State Duma Parliamentary Parties October 25, 2002 The Kremlin, Moscow Вступительное слово на ...
Kenmar Watches Coupon http://www.EscapeTheCycle.com Kenmar Watches Coupon Get Kenmar Watches Coupon savings and cash back, click the link above. Our NOBODY ...




Search This Site:










ftb bug and question

anyone know a good multimedia and asp.net w/access db web hoster?

passing client user on active directory

private assemblies dundas charts

build table using loops like it was done in asp

differences between browser results...

sending email through a form

make function return 2 values

error in popupcalendar.js

cannot show checkbox in treeview

'csc.exe' not recognized as an internal or external command, operable program or batch file...no microsoft.web.ui.webcontrols.dll

"clean solution" --- what;s happening here?

test if module exists

sending e-mail problem

how to manage the source code more easily?

the order of code parts in an aspx file

authenticate window username and password by codes

error while using getuser() and changepassword() methods

hey, my aspnet forum rights have been revoked

asp .net: impersonation the best solution?

webstone/shadow module link down

codefile- codebehind- compilewith- classname- inherits- partial classes????

some design help please.

can i use different membership database to validate differnet login require?

create user profile in visual web developer 2005 express... help!!

sql db management within vwd

quick intranet project

localhost

if session is close...

reset counter value in database

 
All Times Are GMT