Exemplo n.º 1
0
 private void ProductsGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     currentProduct = (Product) e.AddedItems[0];
     TitleTextBox.DataContext = currentProduct.ProductDescriptors[0];
     TitleTextBox.SetBinding(TextBox.TextProperty, "Title");
     BodyTextBox.DataContext = currentProduct.ProductDescriptors[0];
     BodyTextBox.SetBinding(TextBox.TextProperty, "Body");
     relateds = WrapRelateds(currentProduct, from p in catalog.Products select p);
     RelatedGrid.ItemsSource = relateds;
 }
Exemplo n.º 2
0
 public ProductRelationship(Product product)
 {
     Product = product;
 }
Exemplo n.º 3
0
 private IList<ProductRelationship> WrapRelateds(Product product, IEnumerable<Product> products)
 {
     List<ProductRelationship> relationships = new List<ProductRelationship>();
     foreach (Product p in products)
     {
         ProductRelationship relationship = new ProductRelationship(p);
         relationship.IsRelated = product.Products_Relateds1.
                 Where<Products_Related>(r => r.RelatedSKU == p.SKU).Count() > 0;
         relationships.Add(relationship);
     }
     return relationships;
 }
Exemplo n.º 4
0
		private void detach_Products(Product entity)
		{
			this.SendPropertyChanging();
			entity.DeliveryMethod = null;
		}
Exemplo n.º 5
0
 partial void DeleteProduct(Product instance);
Exemplo n.º 6
0
 partial void UpdateProduct(Product instance);
Exemplo n.º 7
0
 partial void InsertProduct(Product instance);
Exemplo n.º 8
0
		private void detach_Products(Product entity)
		{
			this.SendPropertyChanging();
			entity.InventoryStatus = null;
		}