public Form1() { InitializeComponent(); categorieService = new CategorieService(context); produitService = new ProduitService(context); mouvementService = new MouvementService(context); Categories = categorieService.GetCategories(); Mouvements = mouvementService.GetMouvements(); ListMvt.FullRowSelect = true; }
private void DisplayHistoMouvement() { Mouvements = mouvementService.GetMouvements(); ListMvt.Items.Clear(); foreach (var m in Mouvements) { string[] row = { m.Produit.Id.ToString(), m.TypeMouvement, m.Produit.Nom }; var ListMvtRow = new ListViewItem(row); ListMvt.Items.Add(ListMvtRow); } }
public Form2(int ProduitId) { InitializeComponent(); produitService = new ProduitService(context); mouvementService = new MouvementService(context); categorieService = new CategorieService(context); Produit = produitService.GetProduit(ProduitId); Mouvements = mouvementService.GetMouvements(); Categories = categorieService.GetCategories(); Qty = GetQuantity(ProduitId); }