// GET: Order/Create public ActionResult Create() { int size = 0; ProductService pros = new ProductService(); List <orderline> lines = us.getCurrentSessionOrderLines(); if (lines != null) { foreach (var item in lines) { item.product = pros.FindById((long)item.idProduct_fk); } size = lines.Count(); ViewBag.orLines = lines; ViewBag.points = (int)us.getTotalCurrentCart() / 10; } ViewBag.s = size; ViewBag.total = us.getTotalCurrentCart(); order o = new order(); ViewBag.dateToday = DateTime.Now; ViewBag.StatusPayment = "Unpaid"; ViewBag.orderstat = "Waiting for payment"; return(View()); }