Exemplo n.º 1
0
        public USER_LIST(UserControl userL)
        {
            InitializeComponent();
            this.userlst = userL;

            db = new DBGescomContext();
        }
Exemplo n.º 2
0
 public USER_LIST_PRODUIT()
 {
     InitializeComponent();
     db = new DBGescomContext();
     combocategorie.DataSource    = db.Categories.ToList();
     combocategorie.DisplayMember = "Nom_Categorie";
     combocategorie.ValueMember   = "ID_Categorie";
 }
Exemplo n.º 3
0
        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";
        }
Exemplo n.º 4
0
        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);
                }
            }
        }
Exemplo n.º 5
0
        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);
            }
        }
Exemplo n.º 6
0
 public FRM_Conexion()
 {
     InitializeComponent();
     db = new DBGescomContext();
 }