Beispiel #1
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     //Ignora los clicks que no son sobre los elementos de la columna de botones
     if (e.RowIndex < 0 || e.ColumnIndex != dataGridView1.Columns.IndexOf(dataGridView1.Columns["ColumnSel"]))
         return;
     RutaDTO unaRuta = (RutaDTO)dataGridView1.Rows[e.RowIndex].DataBoundItem;
     ModificacionRuta vent = new ModificacionRuta(unaRuta);
     vent.ShowDialog(this);
 }
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            //Ignora los clicks que no son sobre los elementos de la columna de botones
            if (e.RowIndex < 0 || e.ColumnIndex != dataGridView1.Columns.IndexOf(dataGridView1.Columns["ColumnSel"]))
            {
                return;
            }
            RutaDTO          unaRuta = (RutaDTO)dataGridView1.Rows[e.RowIndex].DataBoundItem;
            ModificacionRuta vent    = new ModificacionRuta(unaRuta);

            vent.ShowDialog(this);
        }
 private void dataGridRol1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     // Ignore clicks that are not in our
     if (e.ColumnIndex == dataGridRol1.Columns["buttonSelection"].Index && e.RowIndex >= 0)
     {
         Ruta rutaSel = new Ruta(Convert.ToInt32(dataGridRol1.Rows[e.RowIndex].Cells["Id"].Value), Convert.ToString(dataGridRol1.Rows[e.RowIndex].Cells["Origen"].Value), Convert.ToString(dataGridRol1.Rows[e.RowIndex].Cells["Destino"].Value), Convert.ToDecimal(dataGridRol1.Rows[e.RowIndex].Cells["Codigo"].Value), Convert.ToDouble(dataGridRol1.Rows[e.RowIndex].Cells["Precio_BaseKG"].Value), Convert.ToDouble(dataGridRol1.Rows[e.RowIndex].Cells["Precio_BasePasaje"].Value), Convert.ToString(dataGridRol1.Rows[e.RowIndex].Cells["Tipo_Servicio"].Value), Convert.ToBoolean(dataGridRol1.Rows[e.RowIndex].Cells["Habilitado"].Value));
         Form frm = new ModificacionRuta(rutaSel);
         frm.Show(this);
     }
 }
 private void BT_modificar_Click(object sender, EventArgs e)
 {
     ModificacionRuta re = new ModificacionRuta(DGV_rutas.SelectedRows[0]);
     re.FormClosed += new FormClosedEventHandler(ListadoRutas_Load);
     re.ShowDialog();
 }