private void furnizorToolStripMenuItem_Click(object sender, EventArgs e) { AddFurnizor addFurnizor = new AddFurnizor(""); addFurnizor.SetNameChangeable(); addFurnizor.ShowDialog(); if (!addFurnizor.getChanged()) { return; } context.Furnizoris.Add(addFurnizor.getFurnizor()); context.SaveChanges(); }
private bool adaugaFurnizor(String txt) { AddFurnizor addFurnizor = new AddFurnizor(txt); if (txt.Equals("")) { addFurnizor.SetNameChangeable(); } addFurnizor.ShowDialog(); if (!addFurnizor.getChanged()) { return(false); } localFurnizori.Add(addFurnizor.getFurnizor()); this.loadFurnizor(); furnizorComboBox.Refresh(); furnizorComboBox.Text = addFurnizor.getFurnizor().Nume; return(true); }