Imports System

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) _
     Handles Me.Load

        If Page.IsPostBack Then
            GetCustomerOrders(TextBox1.Text)
        End If
    End Sub

    Protected Sub GetCustomerOrders(ByVal custId As String)
        Dim myDataSet As New CustomerOrders
        Dim custDA As New CustomerOrdersTableAdapters.CustomersTableAdapter
        Dim ordersDA As New CustomerOrdersTableAdapters.OrdersTableAdapter

        custDA.Fill(myDataSet.Customers, custId)
        ordersDA.Fill(myDataSet.Orders, custId)

        myDataSet.Customers(0).Phone = "NOT AVAILABLE"
        myDataSet.Customers(0).Fax = "NOT AVAILABLE"

        GridView1.DataSource = myDataSet.Tables("Customers")
        GridView1.DataBind()

        GridView2.DataSource = myDataSet.Tables("Orders")
        GridView2.DataBind()
    End Sub
End Class
