Imports N Partial Class Shaping Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Using myEntites As New NorthWndEntities() Dim allOrders = From orders In myEntites.Orders Where orders.Customer.Country = "brazil" _ Or orders.Customer.Country = "italy" Order By orders.Customer.Country, orders.orderdate Descending Select New With {.company = orders.Customer.CompanyName.Substring(0, 20), .OrderNumber = orders.OrderID, .ShipAddressAndCity = orders.ShipAddress + "-" + orders.ShipCity, .FreightIsHigh = (orders.Freight > 50.0), orders.Customer.Country} GridView1.DataSource = allOrders GridView1.DataBind()
Imports N
ReplyDeletePartial Class Shaping
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Using myEntites As New NorthWndEntities()
Dim allOrders = From orders In myEntites.Orders
Where orders.Customer.Country = "brazil" _
Or orders.Customer.Country = "italy"
Order By orders.Customer.Country,
orders.orderdate Descending
Select New With
{.company = orders.Customer.CompanyName.Substring(0, 20),
.OrderNumber = orders.OrderID,
.ShipAddressAndCity = orders.ShipAddress + "-" + orders.ShipCity,
.FreightIsHigh = (orders.Freight > 50.0),
orders.Customer.Country}
GridView1.DataSource = allOrders
GridView1.DataBind()
End Using
End Sub
End Class