private void afisareListBox_SelectedIndexChanged(object sender, EventArgs e) { int id = afisareListBox.SelectedIndex - 1; Masina mas = adminMasini.GetMasinaByIndex(afisareListBox.SelectedIndex - 1); ModificareForm modificareForm = new ModificareForm(mas, 1); modificareForm.ShowDialog(); this.Close(); }
private void okBtn_Click(object sender, EventArgs e) { int id = Convert.ToInt32(idTxt.Text); getId(); Masina masina = ManagerMasini.getMasina(id); ModificareForm modifica = new ModificareForm(masina, 2); modifica.ShowDialog(); this.Close(); }