private void ProductsTextBlock_MouseDown(object sender, MouseButtonEventArgs e) { ShowProducts showProducts = new ShowProducts(); ContentContainer.Content = showProducts.Content; ContentContainer.Focus(); }
public ActionResult ShowProducts(int?id) { ShowProducts SP = new ShowProducts(); SP.Vendor = db.Vendors.Find(id); var products = new List <Product>(); var product = db.Products.Where(c => c.VendorId == id).ToArray(); foreach (var pr in product) { products.Add(pr); } SP.Products = products; return(View(SP)); }
static void Main(string[] args) { ShowProducts sp = SaveProductsInFile; sp += SaveProductsInXml; Publisher pub = new Publisher(); Client client1 = new Client("client1", pub); Client client2 = new Client("client2", pub); Storage storage = new Storage(); IProduct cup = new Cup { Name = "CupNeil", Type = "Cup", Cost = 3.15m, Color = Color.Aqua }; IProduct bike = new Bike { Name = "Stels", Type = "Bike", Cost = 315.48m, Height = 1.47, Weight = 14, Length = 1.3 }; storage.Products.Add(cup); pub.AddNewProduct(cup); storage.Products.Add(bike); pub.AddNewProduct(bike); int countCup = storage.SeacrhByType("Cup"); sp(storage.Products); Console.ReadKey(); }
private void ShowProducts_OnClick(object sender, RoutedEventArgs e) { var showProducts = new ShowProducts(_applicationManager.getProducts()); showProducts.Show(); }