示例#1
0
        private void FixupProductPhoto(ProductPhoto previousValue)
        {
            if (previousValue != null &&
                previousValue.ProductProductPhotoes.Contains(this))
            {
                previousValue.ProductProductPhotoes.Remove(this);
            }

            if (ProductPhoto != null)
            {
                if (!ProductPhoto.ProductProductPhotoes.Contains(this))
                {
                    ProductPhoto.ProductProductPhotoes.Add(this);
                }
                if (ProductPhotoID != ProductPhoto.ProductPhotoID)
                {
                    ProductPhotoID = ProductPhoto.ProductPhotoID;
                }
            }
        }
        private void FixupProductPhoto(ProductPhoto previousValue)
        {
            if (previousValue != null
                && previousValue.ProductProductPhotoes.Contains(this))
            {
                previousValue.ProductProductPhotoes.Remove(this);
            }

            if (ProductPhoto != null)
            {
                if (!ProductPhoto.ProductProductPhotoes.Contains(this))
                {
                    ProductPhoto.ProductProductPhotoes.Add(this);
                }
                if (ProductPhotoID != ProductPhoto.ProductPhotoID)
                {
                    ProductPhotoID = ProductPhoto.ProductPhotoID;
                }
            }
        }