Пример #1
0
        protected void gvParametros_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            Parametro p         = new Parametro();
            Label     txId      = (Label)gvParametros.Rows[e.RowIndex].FindControl("lbEditClave");
            TextBox   txNombre  = (TextBox)gvParametros.Rows[e.RowIndex].FindControl("txEditNombre");
            TextBox   txtValorN = (TextBox)gvParametros.Rows[e.RowIndex].FindControl("txEditValorn");
            TextBox   txtValorC = (TextBox)gvParametros.Rows[e.RowIndex].FindControl("txEditValorc");

            String Resultado = p.Actualizar(int.Parse(txId.Text), txNombre.Text.ToUpper(), txtValorN.Text, txtValorC.Text.ToUpper());

            gvParametros.EditIndex  = -1;
            gvParametros.DataSource = main.Parametros.Catalogo();
            gvParametros.DataBind();
            if (Resultado.Equals("OK"))
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Datos actualizados Correctamente')", true);
            }
        }