Ejemplo n.º 1
0
        //CONSTRUCTEUR CLIENT PASSE CDR
        public Cdr(int idclient, string nom, string prenom, string username, string numeroTel, string password, int cooks, string codeBancaire, BDD cooking) : base(idclient, nom, prenom, username, numeroTel, password, cooks, codeBancaire)
        {
            //CREATION DE SON ID CDR
            var rand     = new Random();
            int idRandom = 0;

            do
            {
                idRandom   = rand.Next(0, 9999999);
                this.idCdr = idRandom;
            }while (cooking.IdExiste(idRandom, "Cdr"));
        }
Ejemplo n.º 2
0
        //CONSTRUCUTEUR BASIQUE
        public Cdr(string nom, string prenom, string username, string numeroTel, string password, int cooks, List <Plat> listeRecettes, int nbPoints, string codeBancaire, BDD cooking) : base(nom, prenom, username, numeroTel, password, codeBancaire, cooking)
        {
            //CREATION DE SON ID CDR
            var rand     = new Random();
            int idRandom = 0;

            do
            {
                idRandom   = rand.Next(0, 9999999);
                this.idCdr = idRandom;
            }while (cooking.IdExiste(idRandom, "Cdr"));


            //CREATION DE SON ID CLIENT
            int idRandom2 = 0;

            do
            {
                idRandom2     = rand.Next(0, 9999999);
                this.idClient = idRandom;
            }while (cooking.IdExiste(idRandom, "Client"));

            this.listeRecettes = new List <Plat>();
        }
Ejemplo n.º 3
0
        // Constructeur

        public Plat(string nom, string recette, string description, int prix, BDD cooking)
        {
            var rand     = new Random();
            int idRandom = 0;

            do
            {
                idRandom    = rand.Next(0, 9999999);
                this.idPlat = idRandom;
            }while (cooking.IdExiste(idRandom, "Plat"));
            this.description = description;
            this.recette     = recette;
            this.nom         = nom;
            this.prix        = prix;
        }
Ejemplo n.º 4
0
        public Commande(int prix, string adresse, DateTime date, BDD cooking)
        {
            var rand     = new Random();
            int idRandom = 0;

            do
            {
                idRandom        = rand.Next(0, 9999999);
                this.idCommande = idRandom;
            }while (cooking.IdExiste(idRandom, "Commande"));


            this.adresse = adresse;
            this.date    = date;
            this.prix    = prix;
        }
Ejemplo n.º 5
0
        public Client(string nom, string prenom, string username, string numeroTel, string password, string codeBancaire, BDD cooking)
        {
            var rand     = new Random();
            int idRandom = 0;

            do
            {
                idRandom      = rand.Next(0, 9999999);
                this.idClient = idRandom;
            }while (cooking.IdExiste(idRandom, "Client"));
            this.nom          = nom;
            this.prenom       = prenom;
            this.username     = username;
            this.numeroTel    = numeroTel;
            this.password     = password;
            this.cooks        = 0;
            this.admin        = false;
            this.codeBancaire = codeBancaire;
        }
Ejemplo n.º 6
0
        // Constructeur

        public Produit(string nom, string categorie, string unite, int stockMin, int stockMax, int stockActuel, string nomFounisseur, string refFournisseur, BDD cooking)
        {
            var rand     = new Random();
            int idRandom = 0;

            do
            {
                idRandom       = rand.Next(0, 9999999);
                this.idProduit = idRandom;
            }while (cooking.IdExiste(idRandom, "Produit"));

            this.nom                = nom;
            this.categorie          = categorie;
            this.unite              = unite;
            this.stockMin           = stockMin;
            this.stockMax           = stockMax;
            this.stockActuel        = stockActuel;
            this.nomFounisseur      = nomFounisseur;
            this.refFournisseur     = refFournisseur;
            this.deniereUtilisation = DateTime.Now;
        }