public static void Refresh(SupplierProduct tmp) { ProductInfo tmpInfo = GetExistingByPrimaryKey(tmp.ProductID); if (tmpInfo == null) { return; } tmpInfo.RefreshFields(tmp); }
private void RefreshFields(SupplierProduct tmp) { _ProductName = tmp.ProductName; _CategoryID = tmp.CategoryID; _QuantityPerUnit = tmp.QuantityPerUnit; _UnitPrice = tmp.UnitPrice; _UnitsInStock = tmp.UnitsInStock; _UnitsOnOrder = tmp.UnitsOnOrder; _ReorderLevel = tmp.ReorderLevel; _Discontinued = tmp.Discontinued; _ProductInfoExtension.Refresh(this); _MySupplier = null; _MyCategory = null; OnChange(); // raise an event }