Пример #1
0
        public void addProduct(String Name, String Price, String Description, String Size, String Type)
        {
            ProductServices productServices = new FireCaffeDAL.Services.ProductServices();
            Product         product         = new Product();

            product.Name        = Name;
            product.Price       = Int32.Parse(Price);
            product.Description = Description;
            product.Size        = Size;
            product.Type        = Type;
            productServices.AddProduct(product);
        }
Пример #2
0
        private void Desserts_Click(object sender, RoutedEventArgs e)
        {
            OffersPanel.Visibility         = Visibility.Hidden;
            ContactPanel.Visibility        = Visibility.Hidden;
            LocationPanel.Visibility       = Visibility.Hidden;
            BarCodeScannerPanel.Visibility = Visibility.Hidden;
            AddProductsPanel.Visibility    = Visibility.Hidden;
            ProductServices productServices = new FireCaffeDAL.Services.ProductServices();

            ProductsPanel.Visibility = Visibility.Visible;
            lvProducts.ItemsSource   = productServices.GetProductsByType("Dessert");
            productType.Content      = "Desserts";
        }