public ActionResult myChart() { try { var art = s3.getAllCategorie(); List <String> xv = new List <string>(); List <int> yv = new List <int>(); foreach (var x in art) { var commande = s2.getCommandebyCat(x); xv.Add(x.nomCat); yv.Add(commande.Count()); } new Chart(width: 1200, height: 400).AddTitle(ProjetAsp.Resources.HomeTexts.TitireStatistique).AddSeries( chartType: "Column", xValue: xv.ToArray(), yValues: yv.ToArray() ).Write("png"); return(null); } catch (Exception) { return(View("Error")); } }
// 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 AjouterPanier() { try { ViewBag.e = new SelectList(s3.getAllCategorie(), "refCat", "nomCat"); Client person = (Client)Session["person"]; var x = s2.getCommandeById(person.numClient); return(View(x)); } catch (Exception) { return(View("Error")); } }
public HomeController(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.sessionkayna = true; }
public ProductController(IArticle s1, ICommande s2, ICategorie s3, IFavoris s4, ICommentaire s5) { this.s1 = s1; this.s2 = s2; this.s3 = s3; this.s4 = s4; this.s5 = s5; ViewBag.categories = s3.getAllCategorie(); ViewBag.sessionkayna = true; }
public LoginController(IClient s0, IArticle s1, ICommande s2, ICategorie s3, IFavoris s4) { this.s0 = s0; 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.sessionkayna = false; }
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(); }