Exemplo n.º 1
0
        // GET: User

        public ActionResult Index()
        {
            var question = ConnexionRepositories.GetConnexionRepositories().questions.Get(7);


            return(View(question));
        }
        public ActionResult searcharticle(string nomarticle)
        {
            var liste = ConnexionRepositories.GetConnexionRepositories().articles.getItemsbyName(nomarticle);

            ViewBag.itemnom = nomarticle;
            var viewmodel = new ViewModelsArticlesCategories
            {
                articlesMagasin = liste
            };

            return(View(viewmodel));
        }
        public ActionResult articlesbycategory(string nom)
        {
            var listearticlesbycategories = ConnexionRepositories.GetConnexionRepositories().articles.getALLArticlesbyCategorie(nom);

            var listeviewmodel = new ViewModelsArticlesCategories
            {
                articlesMagasin = listearticlesbycategories
            };
            var gt = listeviewmodel;

            return(View(listeviewmodel));
        }
        // GET: MagasinHome
        public ActionResult Index()
        {
            var listecategories       = ConnexionRepositories.GetConnexionRepositories().categorie.GetAll().ToList();
            var listeproduitscomplete = ConnexionRepositories.GetConnexionRepositories().articles.GetAll().ToList();
            var listeviewmodel        = new ViewModelsArticlesCategories
            {
                categorieMagasin = listecategories,
                articlesMagasin  = listeproduitscomplete,
            };

            return(View(listeviewmodel));
        }
        public ActionResult Index(string categorienom)

        {
            if (categorienom.Equals(""))
            {
                return(RedirectToAction("Index", "MagasinHome"));
            }
            var listearticlesbycategories = ConnexionRepositories.GetConnexionRepositories().articles.getALLArticlesbyCategorie(categorienom);
            var listecategories           = ConnexionRepositories.GetConnexionRepositories().categorie.GetAll().ToList();

            var listeviewmodel = new ViewModelsArticlesCategories
            {
                categorieMagasin = listecategories,
                articlesMagasin  = listearticlesbycategories
            };
            var gt = listeviewmodel;

            return(View("Index", listeviewmodel));
        }