public async void GetAllProducts()
        {
            this.Products = await pl.GetAllProducts();

            OnPropertyChanged(nameof(Products));
            this.Message = "The data was loaded!";
        }
示例#2
0
        static void Main(string[] args)
        {
            var sut        = new ProductLogic();
            var allProduct = sut.GetAllProducts();
            var balance    = 0.00;

            foreach (var productList in allProduct)
            {
                Console.WriteLine($"{productList.SKU} , {productList.Name} , {productList.Price}");
            }
            Console.WriteLine(new string('=', 30));
            sut.setCart();
            var setInCart = true;

            while (setInCart)
            {
                Console.WriteLine("Products in your cart are");
            }
        }
示例#3
0
        public List <ProductJson> Get()
        {
            var products = productLogic.GetAllProducts();

            return(products);
        }
        // GET: Product
        public ActionResult IndexProduct()
        {
            List <Product> products = productLogic.GetAllProducts();

            return(View(products));
        }
 public MainWindowViewModel()
 {
     this.Products = pl.GetAllProducts();
 }
示例#6
0
        public JsonResult GetProducts()
        {
            var model = ProductLogic.GetAllProducts();

            return(Json(model, JsonRequestBehavior.AllowGet));
        }
示例#7
0
        // GET: Prodcuts
        public ActionResult Index()
        {
            var model = ProductLogic.GetAllProducts();

            return(View(model));
        }