private void ConfirmareAnulareAmbalaj(object sender, EventArgs e) { ManagerAmbalaj m = null; try { if ((sender as Form).DialogResult != DialogResult.Yes) { return; } m = new ManagerAmbalaj(); ambalajCurent.Anulat = true; m.SaveAmbalaj(ambalajCurent); Init(); bindingSource1_PositionChanged(sender, e); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { m = null; } }
private void SaveAmbalaj(ManagerAmbalaj m) { Ambalaj a = new Ambalaj(); a.Id = Id; a.Denumire = Denumire; a.Anulat = Anulat; a.Greutate = Greutate; m.SaveAmbalaj(a); }