public bool ProductListPriceHistoryDelete(ProductListPriceHistory productlistpricehistory) { return Execute<bool>(dal => { ProductListPriceHistory productlistpricehistoryDelete = dal.ProductListPriceHistory.Where(x => x.ProductID == productlistpricehistory.ProductID).FirstOrDefault(); if (productlistpricehistoryDelete != null) { dal.ProductListPriceHistory.DeleteOnSubmit(productlistpricehistoryDelete); dal.SubmitChanges(); return true; } return false; }); }
public bool ProductListPriceHistoryUpdate(ProductListPriceHistory productlistpricehistory) { return Execute<bool>(dal => { ProductListPriceHistory productlistpricehistoryUpdate = dal.ProductListPriceHistory.Where(x => x.ProductID == productlistpricehistory.ProductID).FirstOrDefault(); if (productlistpricehistoryUpdate != null) { productlistpricehistoryUpdate.ProductID = productlistpricehistory.ProductID; productlistpricehistoryUpdate.StartDate = productlistpricehistory.StartDate; productlistpricehistoryUpdate.EndDate = productlistpricehistory.EndDate; productlistpricehistoryUpdate.ListPrice = productlistpricehistory.ListPrice; productlistpricehistoryUpdate.ModifiedDate = productlistpricehistory.ModifiedDate; dal.SubmitChanges(); return true; } return false; }); }
private void detach_ProductListPriceHistories(ProductListPriceHistory entity) { this.SendPropertyChanging(); entity.Product = null; }
partial void DeleteProductListPriceHistory(ProductListPriceHistory instance);
partial void UpdateProductListPriceHistory(ProductListPriceHistory instance);
partial void InsertProductListPriceHistory(ProductListPriceHistory instance);
public void ProductListPriceHistoryUpdate(ProductListPriceHistory productlistpricehistory) { adventureWorks_BC.ProductListPriceHistoryUpdate(productlistpricehistory); }