protected void Page_Load(object sender, EventArgs e) { ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient(); this.GridView1.DataSource = nn.ListaPedidosdoAlmoxarifado(); this.GridView1.DataBind(); LbPedido.Visible = false; LbCodigo.Visible = false; LbDescicao.Visible = false; }
//continuação...selecionar linha na grid protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { foreach (GridViewRow row in GridView1.Rows) { if (row.RowIndex == GridView1.SelectedIndex) { row.BackColor = ColorTranslator.FromHtml("#A1DCF2"); row.ToolTip = string.Empty; String pedido = row.Cells[0].Text; String codigoProduto = row.Cells[5].Text; String Descricao = row.Cells[6].Text; LbPedido.Text = pedido; LbCodigo.Text = codigoProduto; LbDescicao.Text = Descricao; long numped = Convert.ToInt64(pedido); int codprod = Convert.ToInt32(codigoProduto); ConferenciaAlmoxarifado(numped, codprod); ServiceReference2.WebService1SoapClient nn = new ServiceReference2.WebService1SoapClient(); this.GridView1.DataSource = nn.ListaPedidosdoAlmoxarifado(); this.GridView1.DataBind(); LbPedido.Visible = false; LbCodigo.Visible = false; LbDescicao.Visible = false; } else { row.BackColor = ColorTranslator.FromHtml("#FFFFFF"); row.ToolTip = "Click to select this row."; } } LbPedido.Visible = true; LbCodigo.Visible = true; LbDescicao.Visible = true; }