Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

RenyØ BØrges

Não entendo.. parte 2

Recommended Posts

Boa tarde pessoal eu sei que hoje é sexta e tal.. ta todo mundo querendo ficar atoa e eu tb :P

 

mas quero resolver essa bagaça aqui com a ajuda de você's ! :D

 

bem.. o que está acontecendo é o um seguinte eu tenho esses dados

 

 

------------------------------ PARTE C# -----------------------------------

 

protected void GridObjEspc_RowUpdating(object sender, GridViewUpdateEventArgs e)

{

try

{

this.InitializeComponent();

this.Conexao.Open();

 

this.Comando.CommandText = "UPDATE OBJETO_ESPECIF_SEG_SGS SET "+

"VLR_ATUAL_OBESSG = :VLR_ATUAL_OBESSG,"+

"VLR_NOVO_OBESSG = :VLR_NOVO_OBESSG,"+

"VLR_PMP_OBESSG = :VLR_PMP_OBESSG,"+

"VLR_PRMLIQ_OBESSG = :VLR_PRMLIQ_OBESSG "+

"WHERE NUM_ESPCSG = :NUM_ESPCSG "+

"AND NUM_OBESSG = :NUM_OBESSG "+

"AND NUM_VERSAO_OBESSG = :NUM_VERSAO_OBESSG";

 

GridViewRow gr = this.GridObjEspc.Rows[e.RowIndex];

 

string num = ((TextBox)gr.FindControl("txtVlrAtual")).Text; PEGANDO VALORES DO GRID

string teste0 = ((TextBox)gr.FindControl("txtVlrNovo")).Text; PEGANDO VALORES DO GRID

string teste1 = ((TextBox)gr.FindControl("txtVlrPMP")).Text; PEGANDO VALORES DO GRID

 

estas variáveis estão sempre vindo zerados... porque ??? SENDO QUE NO GRID EU COLOCO VALORES LÁ...

 

 

 

------------------ PARTE HTML DO CÓDIGO ------------------------

 

<asp:TemplateField HeaderText = "Valor Atual">

<ItemTemplate>

<asp:Label Visible="true" ID="lblVlrAtual" runat="server">

<%# DataBinder.Eval(Container.DataItem, "VLR_ATUAL_OBESSG")%>

</asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="txtVlrAtual" runat="server"

Text='<%# DataBinder.Eval(Container.DataItem,"VLR_ATUAL_OBESSG") %>'> </asp:TextBox>

</EditItemTemplate>

</asp:TemplateField>

 

<asp:TemplateField HeaderText = "Valor Novo">

<ItemTemplate>

<asp:Label Visible="true" ID="lblVlrNovo" runat="server">

<%# DataBinder.Eval(Container.DataItem, "VLR_NOVO_OBESSG")%>

</asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="txtVlrNovo" runat="server"

Text='<%# DataBinder.Eval(Container.DataItem,"VLR_NOVO_OBESSG") %>'> </asp:TextBox>

</EditItemTemplate>

</asp:TemplateField>

 

<asp:TemplateField HeaderText = "Valor PMP">

<ItemTemplate>

<asp:Label Visible="true" ID="lblVlrPMO" runat="server">

<%# DataBinder.Eval(Container.DataItem, "VLR_PMP_OBESSG")%>

</asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="txtVlrPMP" runat="server"

Text='<%# DataBinder.Eval(Container.DataItem,"VLR_PMP_OBESSG") %>'> </asp:TextBox>

</EditItemTemplate>

</asp:TemplateField>

 

<asp:TemplateField HeaderText = "Valor Prêmio Líquido">

<ItemTemplate>

<asp:Label Visible="true" ID="lblVlrPrmLiq" runat="server">

<%# DataBinder.Eval(Container.DataItem, "VLR_PRMLIQ_OBESSG")%>

</asp:Label>

</ItemTemplate>

<EditItemTemplate>

<asp:TextBox ID="txtVlrPrmLiq" runat="server"

Text='<%# DataBinder.Eval(Container.DataItem,"VLR_PRMLIQ_OBESSG") %>'> </asp:TextBox>

</EditItemTemplate>

</asp:TemplateField>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.