public void Add(PRODUCT_STRUCTURE entity) { try { productStructureS.Add(entity); } catch (Exception e) { throw e; } }
private void btnChange_Click(object sender, EventArgs e) { try { foreach (ProductStructureContainer pse in psEntities) { PRODUCT_STRUCTURE productStruct = new PRODUCT_STRUCTURE(); productStruct.id_material = pse.IdMaterial; productStruct.count = pse.Count; productsControlS.Update(productStruct); } Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }