Ejemplo n.º 1
0
        public Commande GetCommande(int id)
        {
            CommandeQuery pq = new CommandeQuery(ctx);
            ClientQuery   cq = new ClientQuery(ctx);
            StatutQuery   sq = new StatutQuery(ctx);
            Commande      c  = pq.GetCommande(id).FirstOrDefault();

            c.Statut = sq.GetStatut(c.StatutId).FirstOrDefault();
            c.Client = cq.GetClient(c.ClientId).FirstOrDefault();
            return(c);
        }
Ejemplo n.º 2
0
        public List <Commande> GetLastCommandes()
        {
            CommandeQuery   cp   = new CommandeQuery(ctx);
            ClientQuery     cq   = new ClientQuery(ctx);
            StatutQuery     sq   = new StatutQuery(ctx);
            List <Commande> coms = cp.GetLastCommandes().ToList();

            coms.ForEach(elem =>
            {
                elem.Statut = sq.GetStatut(elem.StatutId).FirstOrDefault();
                elem.Client = cq.GetClient(elem.ClientId).FirstOrDefault();
            });
            return(coms);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Récupérer une liste de commandes en base
        /// </summary>
        /// <returns>Liste de Categorie</returns>
        public List <Commande> GetAllCommande()
        {
            CommandeQuery cq = new CommandeQuery(contexte);

            return(cq.GetAll().ToList());
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Récupérer les 5 dernière commandes
        /// </summary>
        /// <returns>Liste de Commandes</returns>
        public List <Commande> LastCommandes()
        {
            CommandeQuery cq = new CommandeQuery(contexte);

            return(cq.Get5LastCommandes().ToList());
        }
Ejemplo n.º 5
0
        public List <Commande> DernieresCommandes()
        {
            CommandeQuery cq = new CommandeQuery(contexte);

            return(cq.getLastFive().ToList());
        }
        /// <summary>
        /// récupérer les commandes d'un client
        /// </summary>
        /// <param name="ClientID">Identifiant du client</param>
        public List <Commande> GetByClientID(int clientID)
        {
            CommandeQuery commandeQuery = new CommandeQuery(contexte);

            return(commandeQuery.GetByIDClient(clientID).ToList());
        }
        /// <summary>
        /// Récupérer une liste de commandes en base
        /// </summary>
        /// <returns>Liste de Commandes</returns>
        public List <Commande> getAllCommandes()
        {
            CommandeQuery commandeQuery = new CommandeQuery(contexte);

            return(commandeQuery.GetAll().ToList());
        }