public static string ToString(this GestionProduit GP)
        {
            switch (GP)
            {
            case GestionProduit.Aucune:
                return("Aucune");

            case GestionProduit.Individuelle:
                return("individuelle");

            case GestionProduit.ParLot:
                return("Par Lot");

            default:
                return("Aucune");
            }
        }
Exemplo n.º 2
0
        public void Write(string name, Category category, Marque marque, Fournisseur fournisseur, int quantiteMin, DateTime dateEntree, GestionProduit typeGestion)
        {
            var product = FactoryProduct.CreateProduct(name, quantiteMin, category, marque, fournisseur, null, null,
                                                       dateEntree, typeGestion);

            _repositoryProduct.Save(product);
        }
Exemplo n.º 3
0
        public void Write(Guid idProduct, string name, Category category, Marque marque, Fournisseur fournisseur, int quantiteMin, DateTime dateEntree, GestionProduit typeGestion)
        {
            var product = new Product
            {
                id          = idProduct,
                Name        = name,
                Category    = category,
                Marque      = marque,
                Fournisseur = fournisseur,
                QuantiteMin = quantiteMin,
                DateEntree  = dateEntree,
                TypeGestion = typeGestion
            };

            _repositoryProduct.Save(product);
        }
Exemplo n.º 4
0
        public static Product CreateProduct(string name, int quantiteMin, Category category, Marque marque, Fournisseur fournisseur, string remarque = "", string reference = "", DateTime dateEntree = default(DateTime), GestionProduit typeGestion = GestionProduit.Aucune)
        {
            var product = new Product
            {
                Name          = name,
                QuantiteMin   = quantiteMin,
                id            = Guid.NewGuid(),
                Remarque      = remarque,
                SiteReference = reference,
                Fournisseur   = fournisseur,
                Marque        = marque,
                Category      = category,
                DateEntree    = dateEntree,
                TypeGestion   = typeGestion,
                newObject     = true
            };

            return(product);
        }