1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
|
Protected Sub ddlMth_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Dim dtVolumeOrder As New DataTable()
Dim strSelectCommand As String = "SELECT P.UserId, P.Company, P.WebSiteUrl, E.UserID, E.ID, E.UserId, E.Year, E.Make, E.Model, E.Type, E.MilesHours, E.VinSerial, E.Description, E.Location, E.Price, E.SignUpDate, e.EquipmentID " & _
"GetCustomerImage_1.ImageID AS ImageID1, GetCustomerImage_1.EquipmentID AS EquipmentID1, GetCustomerImage_1.Title AS Title1, GetCustomerImage_1.ImageData AS ImageData1, GetCustomerImage_1.MIMEType AS MIMEType1, " & _
"GetCustomerImage_2.ImageID AS ImageID2, GetCustomerImage_2.EquipmentID AS EquipmentID2, GetCustomerImage_2.Title AS Title2, GetCustomerImage_2.ImageData AS ImageData2, GetCustomerImage_2.MIMEType AS MIMEType2, " & _
"GetCustomerImage_3.ImageID AS ImageID3, GetCustomerImage_3.EquipmentID AS EquipmentID3, GetCustomerImage_3.Title AS Title3, GetCustomerImage_3.ImageData AS ImageData3, GetCustomerImage_3.MIMEType AS MIMEType3, " & _
"GetCustomerImage_4.ImageID AS ImageID4, GetCustomerImage_4.EquipmentID AS EquipmentID4, GetCustomerImage_4.Title AS Title4, GetCustomerImage_4.ImageData AS ImageData4, GetCustomerImage_4.MIMEType AS MIMEType4, " & _
"GetCustomerImage_5.ImageID AS ImageID5, GetCustomerImage_5.EquipmentID AS EquipmentID5, GetCustomerImage_5.Title AS Title5, GetCustomerImage_5.ImageData AS ImageData5, GetCustomerImage_5.MIMEType AS MIMEType5, " & _
"GetCustomerImage_6.ImageID AS ImageID6, GetCustomerImage_6.EquipmentID AS EquipmentID6, GetCustomerImage_6.Title AS Title6, GetCustomerImage_6.ImageData AS ImageData6, GetCustomerImage_6.MIMEType AS MIMEType6 " & _
"FROM Equipment E Inner Join UserProfile P " & _
"OUTER APPLY GetCustomerImage(1, E.EquipmentID) AS GetCustomerImage_1 " & _
"OUTER APPLY GetCustomerImage(2, E.EquipmentID) AS GetCustomerImage_2 " & _
"OUTER APPLY GetCustomerImage(3, E.EquipmentID) AS GetCustomerImage_3 " & _
"OUTER APPLY GetCustomerImage(4, E.EquipmentID) AS GetCustomerImage_4 " & _
"OUTER APPLY GetCustomerImage(5, E.EquipmentID) AS GetCustomerImage_5 " & _
"OUTER APPLY GetCustomerImage(6, E.EquipmentID) AS GetCustomerImage_6 " & _
"WHERE E.IsLockedOut = 'False' " & _
"ORDER BY E.SignUpDate DESC"
Using sqlConn As New SqlConnection(ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString)
Using adapPatientBills As New SqlDataAdapter(strSelectCommand, sqlConn)
adapPatientBills.Fill(dtVolumeOrder)
End Using
End Using
SqlDataSource1.DataSource = dtVolumeOrder
SqlDataSource1.DataBind()
End Sub
|