Example #1
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         if (e.ColumnIndex == dataGridView1.Columns["Editar"].Index)
         {
             DataGridViewRow row             = dataGridView1.Rows[e.RowIndex];
             FRMmarca        formularioMarca = new FRMmarca();
             formularioMarca.recibirDatos(Convert.ToInt16(row.Cells[0].Value), Convert.ToString(row.Cells[1].Value));
             formularioMarca.Show();
         }
         if (e.ColumnIndex == dataGridView1.Columns["Eliminar"].Index)
         {
             DataGridViewRow row      = dataGridView1.Rows[e.RowIndex];
             Marca           unaMarca = new Marca(Convert.ToInt16(row.Cells[0].Value), Convert.ToString(row.Cells[1].Value));
             unaMarca.eliminate();
             this.busquedaDeValores();
         }
     }
 }
Example #2
0
        private void BTNguardar_Click(object sender, EventArgs e)
        {
            FRMmarca formularioNuevaMarca = new FRMmarca();

            formularioNuevaMarca.Show();
        }