Beispiel #1
0
        public IActionResult Winkelmandje(VMWinkelmand vMWinkelmand)
        {
            int klantnr = Convert.ToInt32(HttpContext.Session.GetString("user"));

            vMWinkelmand.Klant = PC.loadKlant(Convert.ToInt32(klantnr));
            if (PC.ControleerWinkelmand(klantnr) == true)
            {
                ViewBag.Leeg = true;
                WinkelmandRepository winkelRepo = new WinkelmandRepository();
                winkelRepo.WinkelmandItems   = PC.loadWinkelmand(klantnr);
                vMWinkelmand.WinkelmandRepo  = winkelRepo;
                vMWinkelmand.BerekendGegeven = PC.BerekenTotaal();
                HttpContext.Session.SetString("TotaalInclu", Convert.ToString(vMWinkelmand.BerekendGegeven.TotaalInclu));
            }
            else
            {
                ViewBag.Leeg = false;
            }

            return(View(vMWinkelmand));
        }