Exemplo n.º 1
0
        public ActionResult AddProducts(UserUserProduct uup)
        {
            // TODO: Add insert logic here

            UserProductManager.Insert(uup.UserProduct);

            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        // GET
        public ActionResult AddProducts()
        {
            if (Authenticate.IsAuthenticated())
            {
                UserUserProduct uup = new UserUserProduct();

                uup.User               = Session["user"] as User;
                uup.Products           = ProductManager.Load();
                uup.UserProduct        = new UserProduct();
                uup.UserProduct.UserId = uup.User.Id;

                return(View(uup));
            }

            return(View("Index"));
        }