Ejemplo n.º 1
0
        public ActionResult Delete(int pProdId)
        {
            int userId = WebSecurity.CurrentUserId;

            NotesProduit.DeleteById(userId, pProdId);
            //retourner au profile du user qui a delete la note
            return(RedirectToAction("ProfileUtilisateur", "Utilisateur", new { pId = userId }));
        }
Ejemplo n.º 2
0
        public ActionResult Ajouter(double pNoteConfort, double pNoteProprete, double pNoteLocalisation, double pNoteValeur, int pProdID)
        {
            NotesProduit notes = new NotesProduit();

            notes.Confort       = pNoteConfort;
            notes.Proprete      = pNoteProprete;
            notes.Localisation  = pNoteLocalisation;
            notes.Valeur        = pNoteValeur;
            notes.ProduitId     = pProdID;
            notes.UtilisateurId = WebSecurity.CurrentUserId;
            NotesProduit.Save(notes);
            //retourner au profile du produit modifie
            return(RedirectToAction("ProfileProduit", "Produit", new { pId = pProdID }));
        }
Ejemplo n.º 3
0
        //
        // GET: /NotesProduit/

        public ActionResult AjouterModel(NotesProduit pModel)
        {
            NotesProduit.Save(pModel);
            //retourner au profile du produit modifie
            return(RedirectToAction("ProfileProduit", "Produit", new { pId = pModel.ProduitId }));
        }