Public Function GetStandardPriceForPart(ByVal partnum As Integer) As Decimal Dim dr As SqlDataReader Dim price As Decimal cmd.CommandText = "GetPartPrice" cmd.Parameters.Clear() cmd.Parameters.Add(New SqlParameter("@partnum", partnum)) conn.Open() dr = cmd.ExecuteReader() If dr.Read Then price = dr(0) Else price = 0 End If conn.Close() Return price End Function Protected Sub lstPart_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles lstPart.SelectedIndexChanged Dim db As New DBWrapper Dim o As Order ' Dim l As ArrayList o = Session("CurrentOrder") ' Dim p As New PartOrdered ' db.GetStandardPriceForPart(lstPart.SelectedValue) = l txtQuantity.Text = p.NumOrdered txtPrice.Text = p.QuotedPrice
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)