Esempio n. 1
0
        public ActionResult AddOrder(int?id)
        {
            var clientID = Request.Form["User.Id"];
            var hostID   = Request.Form["Verkoper.Id"];
            var quantity = Request.Params["Quantity"];

            string message = "";

            Product product = PLogic.ByID(Convert.ToInt32(id));

            message = OLogic.AddOrder(Convert.ToInt32(clientID), Convert.ToInt32(hostID), Convert.ToInt32(id), Convert.ToInt32(quantity)) +
                      OLogic.KoppelTabelOrder(Convert.ToInt32(clientID), Convert.ToInt32(hostID), Convert.ToInt32(id), Convert.ToInt32(quantity));

            if (message == "succes")
            {
                Session["Order"] = message;
                return(RedirectToAction("ViewProducts", "Product"));
            }
            return(View());
        }