private void buttonUpdateMecanic_Click_1(object sender, EventArgs e) { foreach (DataGridViewRow row in dataGridViewDisplayMechanics.SelectedRows) { int id = Convert.ToInt32(row.Cells[0].Value); Mecanic mecanic = _carService.FindMecanicById(id); mecanic.Nume = row.Cells[1].Value.ToString(); mecanic.Prenume = row.Cells[2].Value.ToString(); _carService.UpdateMecanic(mecanic); } // reload to view changes FormDisplayDetails_Load(sender, e); }
public void UpdateMecanic(Mecanic mecanic) { _api.UpdateMecanic(mecanic); }