public USER_LIST(UserControl userL) { InitializeComponent(); this.userlst = userL; db = new DBGescomContext(); }
public USER_LIST_PRODUIT() { InitializeComponent(); db = new DBGescomContext(); combocategorie.DataSource = db.Categories.ToList(); combocategorie.DisplayMember = "Nom_Categorie"; combocategorie.ValueMember = "ID_Categorie"; }
public USER_LIST() { InitializeComponent(); UserControl userL = null; this.userlst = userL; db = new DBGescomContext(); comboprofil.DataSource = db.Profils.ToList(); comboprofil.DisplayMember = "Nom_Profil"; comboprofil.ValueMember = "ID_Profil"; }
public void Ajoutdatagrida() { db = new DBGescomContext(); dvgAricle.Rows.Clear(); Categorie C = new Categorie(); foreach (var P in db.Articles) { C = db.Categories.SingleOrDefault(s => s.ID_Categorie == P.ID_Categorie); if (C != null) { dvgAricle.Rows.Add(false, P.ID_Article, P.Reference_Article, P.Libelle_Article, P.Stock_Article, P.Prix_Article, C.Nom_Categorie); } } }
public bool ConnexionValide(DBGescomContext db, string login, string pwd) { Utilisateur U = new Utilisateur(); U.nom_login = login; U.mdp = pwd; if (db.Utilisateurs.SingleOrDefault(s => s.nom_login == login && s.mdp == pwd) != null) { return(true); } else { return(false); } }
public FRM_Conexion() { InitializeComponent(); db = new DBGescomContext(); }