Exemple #1
0
        private static void PrintProductsByGender(string gender)
        {
            AW_ProductModelRepo    aw_pmR   = new AW_ProductModelRepo();
            List <AW_ProductModel> products = aw_pmR.GetProductsByGender(gender);

            foreach (var prod in products)
            {
                Console.WriteLine("---------------------");
                Console.WriteLine(prod.ProductModelID);
                Console.WriteLine(prod.Name);
            }
        }
        public ActionResult ListProductsByGender(string choice)
        {
            AW_ProductModelRepo aw_pmR = new AW_ProductModelRepo();

            aw_pmR.CreateGetClothingProcedureIfNull();

            if (choice == "")
            {
                return(View("Error"));
            }

            List <AW_ProductModel> list = aw_pmR.GetProductsByGender(choice);

            return(View(list));
        }