// GET: Product public ActionResult Index(int artid) { try { if (Session["person"] == null) { return(RedirectToAction("Index", "Login")); } Client cli = (Client)Session["person"]; ViewBag.num = s2.countCommandeClient(cli.numClient); ViewBag.charts = s2.getCommandeById(cli.numClient); ViewBag.totalcart = s2.totalClient(cli.numClient); ViewBag.favoris = s4.getFavorisClient(cli.numClient); ViewBag.qtqfavoris = s4.totalFavorisClient(cli.numClient); ViewBag.RelatedArticle = s1.getArticleByrefCat(s1.getcat(artid)); ViewBag.Reviews = s5.GetCommentairebyArticle(artid); ViewBag.totalReview = s5.totalcomm(artid); return(View(s1.getArticleById(artid))); } catch (Exception) { ViewBag.categories = s3.getAllCategorie(); throw new ArithmeticException(); } }
public ActionResult Index() { try { ViewBag.num = s2.countCommandeClient(9999); ViewBag.charts = s2.getCommandeById(9999); ViewBag.favoris = s4.getFavorisClient(9999); ViewBag.qtqfavoris = s4.totalFavorisClient(9999); ViewBag.totalcart = s2.totalClient(9999); return(View("Login")); } catch (Exception) { return(View("Error")); } }
// GET: Store public ActionResult Index() { if (Session["person"] == null) { return(RedirectToAction("Index", "Login")); } Client cli = (Client)Session["person"]; ViewBag.num = s2.countCommandeClient(cli.numClient); ViewBag.charts = s2.getCommandeById(cli.numClient); ViewBag.totalcart = s2.totalClient(cli.numClient); ViewBag.favoris = s4.getFavorisClient(cli.numClient); ViewBag.qtqfavoris = s4.totalFavorisClient(cli.numClient); return(View("Store")); }
public LangageController(IArticle s1, ICommande s2, ICategorie s3, IFavoris s4) { this.s1 = s1; this.s2 = s2; this.s3 = s3; this.s4 = s4; ViewBag.categories = s3.getAllCategorie(); ViewBag.articles = s1.getAllArticle(); ViewBag.TopSArticle = s1.getTopSeeledarticle(); ViewBag.num = s2.countCommandeClient(9999); ViewBag.charts = s2.getCommandeById(9999); ViewBag.favoris = s4.getFavorisClient(9999); ViewBag.qtqfavoris = s4.totalFavorisClient(9999); ViewBag.totalcart = s2.totalClient(9999); ViewBag.LastCommande = s2.getLastCommande(); }
public AdminHomeController(IClient s0, IArticle s1, ICategorie s3, ICommande s2) { this.s0 = s0; this.s1 = s1; this.s2 = s2; this.s3 = s3; ViewBag.categories = s3.getAllCategorie(); ViewBag.articles = s1.getAllArticle(); ViewBag.TopSArticle = s1.getTopSeeledarticle(); ViewBag.num = s2.countCommandeClient(9999); ViewBag.charts = s2.getCommandeById(9999); ViewBag.totalcart = s2.totalClient(9999); ViewBag.LastCommande = s2.getLastCommande(); ViewBag.nbclient = s0.countClients(); ViewBag.nbarticlevendu = s1.nbarticleVendu(); ViewBag.thisweek = s2.thisweek(); ViewBag.totalearn = s2.totalearn(); }
// GET: Devis public ActionResult Index(int idclient) { try { if (Session["person"] == null) { return(RedirectToAction("Index", "Login")); } ViewBag.num = s2.countCommandeClient(idclient); ViewBag.charts = s2.getCommandeById(idclient); ViewBag.favoris = s4.getFavorisClient(idclient); ViewBag.qtqfavoris = s4.totalFavorisClient(idclient); ViewBag.totalcart = s2.totalClient(idclient); return(View(s0.GetClienById(idclient))); } catch (Exception) { return(View("Error")); } }