Exemplo n.º 1
0
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        try
        {
            //int Id = Convert.ToInt32((sender as LinkButton).Text);
            int Id = 23;
            client.GetRestaurant(Id);

            List <Restaurant> list = new List <Restaurant>();
            list.Add(client.GetRestaurant(Id));
            GridView2.DataSource = list;
            GridView2.DataBind();
        }
        catch (FaultException <MyException> ex)
        {
            Response.Write(ex.Detail.Msg + " " + ex.Detail.LineNumber + " " + ex.Detail.StackTrace);
        }
    }
Exemplo n.º 2
0
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        Restaurant rest = new Restaurant();

        rest            = client.GetRestaurant(Convert.ToInt32(DropDownList1.Text));
        txt_name.Text   = rest.Name;
        txt_city.Text   = rest.City;
        txt_email.Text  = rest.EmailAddress;
        txt_mobile.Text = rest.MobileNumber;
    }