Ejemplo n.º 1
0
        public static CentraleAchat getCentrale(Magasin m)
        {
            CentraleAchat centrale = null;
            MySqlCommand  com      = new MySqlCommand("select codetype from centraleachat c, ingredient i");

            return(centrale);
        }
Ejemplo n.º 2
0
 public Personne(Int16 mat, Magasin mag, string code, string nom, string prenom, Int32 numTele, string user)
 {
     this.Matricule = mat;
     this.Mag       = mag;
     this.CodeType  = code;
     this.Nom       = nom;
     this.Prenom    = prenom;
     this.Numtel    = numTele;
     this.Login     = user;
 }
Ejemplo n.º 3
0
        public static void GetMagasinPersonne(Personne pers)
        {
            MySqlCommand requete = new MySqlCommand("select m.codemag,m.nom, m.adresse, m.numcompte,m.soldecompte from magasin m," +
                                                    "personne p where m.codemag=p.codemag and p.matricule=?mat group by m.codemag");

            requete.Parameters.AddWithValue("?mat", pers.Matricule);
            MySqlDataReader reader = requete.ExecuteReader();

            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    Magasin m = new Magasin((string)reader[0], (string)reader[1], (string)reader[2], Convert.ToInt64(reader[3]), Convert.ToInt64(reader[4]));
                    pers.Mag = m;
                }
                reader.Close();
            }
        }
Ejemplo n.º 4
0
        public static List <Magasin> GetMagasins()
        {
            List <Magasin> listeMag = new List <Magasin>();
            MySqlCommand   com      = new MySqlCommand("select * from magasin");

            com.Connection = connection;
            MySqlDataReader dr = com.ExecuteReader();

            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    Magasin m = new Magasin((string)dr[0], (string)dr[1], (string)dr[2], Convert.ToInt64(dr[3]), Convert.ToInt64(dr[4]));
                    listeMag.Add(m);
                }
            }
            dr.Close();
            return(listeMag);
        }
Ejemplo n.º 5
0
 public Personne(Magasin mag, string code, string nom, string prenom, Int32 numTel, string user, string mdp) :
     this(0, mag, code, nom, prenom, numTel, user)
 {
     this.motDePasse = mdp;
 }