Exemple #1
0
        // GET: Businesses/Purchase
        public async Task <IActionResult> Purchase(int?id)
        {
            var business = repo.GetBusinessById(id);

            if (business == null)
            {
                return(NotFound());
            }/*
              * var business = new Business
              * {
              * Id = 2,
              * Country = Countries.RSA,
              * Product = Products.Research,
              * Description = "It's slow",
              * Available = Choice.Yes,
              * Turnaround = 8,
              * Price = 900.00M
              * };*/
            TempData["Product"] = (business.Product).ToString();
            TempData["Price"]   = business.Price.ToString();
            TempData["NoxID"]   = TempData["NoxID"];
            TempData["Name"]    = TempData["Name"];
            TempData.Keep();
            return(View());
        }