using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Bunifu.Framework.UI; using GestionDeCommerceInfoClasseBDDNCouches; using GestionDeCommerceInfoClasseBDDNCouches.DataLayer; namespace Gestion_de_commerce_Informatique { public partial class Form1 : Form { Object panRightControl; DashBoard dashBoard; GestionUtilisateurs gestionUtilisateur; Commande commande; GestionStock gestionStock; public Form1() { InitializeComponent(); dashBoard = new DashBoard(); gestionUtilisateur = new GestionUtilisateurs(); commande = new Commande(); gestionStock = new GestionStock(); panRightControl = dashBoard; this.panRight.Controls.Add((Control)panRightControl); } private void btnExit_Click(object sender, EventArgs e) { Application.Exit(); } private void btn_Click(object sender, EventArgs e) { BunifuFlatButton button = (BunifuFlatButton)sender; btnUserMannager.Normalcolor = btnCommande.Normalcolor = btnConfig.Normalcolor = btnDashBoard.Normalcolor = btnStock.Normalcolor = Color.Transparent; button.Normalcolor = Color.FromArgb(100, 0, 0, 0); switch (button.Text) { case "DashBoard": this.panRight.Controls.Remove((Control)panRightControl); dashBoard.RemplirDVG(); panRightControl = dashBoard; this.panRight.Controls.Add((Control)panRightControl); break; case "Commande": this.panRight.Controls.Remove((Control)panRightControl); panRightControl = commande; this.panRight.Controls.Add((Control)panRightControl); break; case "Stock": this.panRight.Controls.Remove((Control)panRightControl); //gestionStock.RemplirDVG(); panRightControl = gestionStock; this.panRight.Controls.Add((Control)panRightControl); break; case "Configuration": break; case "Gestion utilisateurs": this.panRight.Controls.Remove((Control)panRightControl); gestionUtilisateur.RemplirDVG(); panRightControl = gestionUtilisateur; this.panRight.Controls.Add((Control)panRightControl); break; } } } }