Advertisement
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: |
Dim vProduct As DropDownList = DirectCast(sender, DropDownList)
Dim vProductID As Integer = vProduct.SelectedValue
Dim mtg As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("TMCdb")
Dim connection As New SqlConnection(mtg.ConnectionString)
Dim cmd As New SqlCommand("Select FactoryID from tblProducts WHERE ProductID = " & vProductID & "", connection)
Try
connection.Open()
Dim vFactoryID As Integer = cmd.ExecuteScalar
Session("FactorID") = vFactoryID
CType(gvOrderDetails.FindControl("cboFactoryID"), DropDownList).SelectedValue = vFactoryID
connection.Close()
Catch
End Try
|
|
Loading Advertisement... |