Esempio n. 1
0
 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 ICategorie GetById(ICategorie categorie)
 {
     using (MySqlConnection conn = new MySqlConnection(connectionString))
     {
         string query = "SELECT * FROM account WHERE ID = @ID; ";
         using (MySqlCommand command = new MySqlCommand(query, conn))
         {
             command.Parameters.AddWithValue("@ID", categorie.ID);
         }
     }
     return(categorie);
 }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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 void UpdateEvent(ICategorie C1)
 {
     using (MySqlConnection conn = new MySqlConnection(connectionString))
     {
         string query = $"UPDATE Categorie SET AccountID = @AccountID, Name = @Name, Description=@Description WHERE ID=@ID; ";
         using (MySqlCommand command = new MySqlCommand(query, conn))
         {
             command.Parameters.AddWithValue("@ID", C1.ID);
             command.Parameters.AddWithValue("@AccountID", C1.AccountID);
             command.Parameters.AddWithValue("@Name", C1.Name);
             command.Parameters.AddWithValue("@Description", C1.Description);
             command.ExecuteNonQuery();
         }
     }
 }
        public void CreateEvent(ICategorie C1)
        {
            using (MySqlConnection conn = new MySqlConnection(connectionString))
            {
                string query = "INSERT INTO Categorie VALUES(@AccountID, @Name,@Description) ";

                using (MySqlCommand command = new MySqlCommand(query, conn))
                {
                    command.Parameters.AddWithValue("@AccountID", C1.AccountID);
                    command.Parameters.AddWithValue("@Name", C1.Name);
                    command.Parameters.AddWithValue("@Description", C1.Description);
                    command.ExecuteNonQuery();
                }
            }
        }
Esempio n. 7
0
 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();
 }
Esempio n. 9
0
 public ICategorie_Interest UpdateCategory(ICategorie categorie)
 {
     throw new NotImplementedException();
 }
Esempio n. 10
0
 public ICategorie GetById(ICategorie categorie)
 {
     throw new NotImplementedException();
 }
Esempio n. 11
0
 public void CreateCategory(ICategorie categorie)
 {
     throw new NotImplementedException();
 }
Esempio n. 12
0
 public AcceuilController(IArticle s1, ICommande s2, ICategorie s3)
 {
     this.s1 = s1;
     this.s2 = s2;
     this.s3 = s3;
 }