public ActionResult ajouterItemAuPanier(int MyProperty, int?nombre = null)
        {
            var clientConnecter = ClientUtilitaire.FindClientParId(db, Int32.Parse(User.Identity.Name));

            ItemUtilitaire.AjouterItemPanier(db, clientConnecter.clientId, Utilitaire.ItemUtilitaire.findItemById(MyProperty).itemId, nombre);
            return(RedirectToAction("Index", "Home"));
        }
        public ActionResult checkOut(int?MyProperty = null, int?nombre = null)
        {
            var clientConnecter = ClientUtilitaire.FindClientParId(db, Int32.Parse(User.Identity.Name));

            if (MyProperty != null)
            {
                ItemUtilitaire.AjouterItemPanier(db, clientConnecter.clientId, Utilitaire.ItemUtilitaire.findItemById((int)MyProperty).itemId, nombre);
            }

            return(View(CommandeUtilitaire.nouvelleCommande()));
        }
Example #3
0
        public ActionResult Details(int?id)
        {
            var client = ClientUtilitaire.FindClientParId(db, id.Value);

            if (client == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }
            var clientDetailsView = DataManipulation.copyClientToClientDetailsView(client);

            return(View(clientDetailsView));
        }
Example #4
0
 public ActionResult Edit(int id)
 {
     return(View(DataManipulation.copyClientToClientEditView(ClientUtilitaire.FindClientParId(db, id))));//retourne ClientEditView
 }