private void buttonMecanicUpdate_Click(object sender, EventArgs e) { string nume = textBoxNumeMecanic.Text.ToString(); string prenume = textBoxPrenumeMecanic.Text.ToString(); int id = Int32.Parse(textBoxMecanicId.Text.ToString()); Mecanics.Update(id, nume, prenume); }
private void buttonAddMecanic_Click(object sender, EventArgs e) { string nume = textBoxNumeMecanic.Text.ToString(); string prenume = textBoxPrenumeMecanic.Text.ToString(); try { Mecanics.Add(nume, prenume); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error"); } }