partial void DeleteProductHeader(ProductHeader instance);
partial void UpdateProductHeader(ProductHeader instance);
public void UpdateHeader(ProductHeaderModel model) { try { ProductHeader table = new ProductHeader(); using (VenturadaDataContext vdc = new VenturadaDataContext()) { table = vdc.ProductHeaders.Single(a => a.ProductLabelId == model.ProductLabelId); table.ProductTableTitleDescription = model.ProductTableTitleDescription; vdc.SubmitChanges(); } } catch (Exception ex) { throw ex; } }
partial void InsertProductHeader(ProductHeader instance);
public void InsertProductHeader(ProductHeaderModel model) { try { using (VenturadaDataContext vdc = new VenturadaDataContext()) { ProductHeader table = new ProductHeader(); table.ProductTableTitleDescription = model.ProductTableTitleDescription; table.ProductCategoryId = model.ProductCategoryId; vdc.ProductHeaders.InsertOnSubmit(table); vdc.SubmitChanges(); } } catch (Exception ex) { throw ex; } }