Esempio n. 1
0
 private void dataGridView3_CellContentClick_1(object sender, DataGridViewCellEventArgs e)
 {
     if (table2.Columns[e.ColumnIndex].Name == "activar")
     {
         String    clave = table2.CurrentRow.Cells[2].Value.ToString();
         Articulos ar    = new Articulos();
         ar.setClvArticulo(Int32.Parse(table2.CurrentRow.Cells[2].Value.ToString()));
         if (ar.getClvArticulo() > 0)
         {
             Conexion con2 = new Conexion();
             con2.activar(ar.getClvArticulo());
             recargarD();
         }
     }
     else if (table2.Columns[e.ColumnIndex].Name == "eliminarD")
     {
         String    clave = table2.CurrentRow.Cells[2].Value.ToString();
         Articulos ar    = new Articulos();
         ar.setClvArticulo(Int32.Parse(table2.CurrentRow.Cells[2].Value.ToString()));
         if (ar.getClvArticulo() > 0)
         {
             Conexion con2 = new Conexion();
             con2.eliminar(ar.getClvArticulo());
             recargarD();
         }
     }
 }