private void Btn_Save_Click(object sender, EventArgs e) { if (_Part == null) { _Part = UpdatePart(new SparePart()); PartsList.AddPart(_Part); } else { _Part = UpdatePart(_Part); PartsList.Refresh(); } _Part = null; this.Close(); }
public void AddPart(SparePart Part) { PartsList.Add(Part); Refresh(); }