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