private void Guardar_Click(object sender, EventArgs e) { int idCliente; foreach (DataGridViewRow fila in dataGridView1.Rows) { bool isSelected = Convert.ToBoolean(fila.Cells[7].Value); if (isSelected) { idCliente = Convert.ToInt32(fila.Cells[1].Value); controladorfachada.AltaCliente(idCliente); } else { idCliente = Convert.ToInt32(fila.Cells[1].Value); controladorfachada.BajaCliente(idCliente); } } MessageBox.Show("Clientes guardados correctamente"); }