private void buttonDeleteCustomers_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dataGridViewCustomers.SelectedRows) { int id = Convert.ToInt32(row.Cells[0].Value); _carService.DeleteClient(id); } // reload to view changes FormDisplayCustomers_Load(sender, e); }
public void DeleteClient(int id) { _api.DeleteClient(id); }