Exemplo n.º 1
0
 protected void gvDescargaArchivos_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName.ToString() == "Borrar")
     {
         if (e.CommandArgument != null)
         {
             string id = e.CommandArgument.ToString();
             lblIdArchivoContrato.Text = id;
             cargarDatosEnModal(Convert.ToInt32(id));
             ModalEliminarArchivo.Show();
         }
     }
 }
        protected void gvindicadoresgenericos_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.ToString() == "Modificar")
            {
                if (e.CommandArgument != null)
                {
                    //TextBox txtNumerador = (TextBox)FindControl("txtNumerador");
                    //TextBox txtNumerador = (TextBox)gvindicadoresgenericos.Rows[4].FindControl("txtNumerador");
                    GridViewRow row          = (GridViewRow)(((Control)e.CommandSource).NamingContainer);
                    TextBox     txtNumerador = (TextBox)row.FindControl("txtNumerador");

                    string indice = txtNumerador.CssClass.ToString().Split('_')[1];

                    string id = e.CommandArgument.ToString();
                    lblIdIndicador.Text = id;
                    lblIndice.Text      = indice;
                    cargarDatosEnModal(Convert.ToInt32(id));
                    ModalEliminarArchivo.Show();
                }
            }
        }