示例#1
0
        public static void Refresh(CategoryProduct tmp)
        {
            ProductInfo tmpInfo = GetExistingByPrimaryKey(tmp.ProductID);

            if (tmpInfo == null)
            {
                return;
            }
            tmpInfo.RefreshFields(tmp);
        }
示例#2
0
 private void RefreshFields(CategoryProduct tmp)
 {
     _ProductName     = tmp.ProductName;
     _SupplierID      = tmp.SupplierID;
     _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
 }