// GET: Admin/Product

        public ActionResult Index()
        {
            ProductsListingModel model = new ProductsListingModel();

            model.Products  = productServices.GetAllProducts();
            model.MainMenus = mainServices.GetAllMainMenus();
            model.SubMenus  = subServices.GetAllSubMenus();
            model.Brands    = brandServices.GetAllBrands();
            model.Tags      = tagServices.GetAllTags();
            model.Suppliers = supplierServices.GetAllSuppliers();

            return(View(model));
        }
        // GET: Admin/Brand
        public ActionResult Index()
        {
            BrandListingModel model = new BrandListingModel();

            model.Brands = services.GetAllBrands();

            return(View(model));
        }
 public IActionResult GetAllBrands()
 {
     try
     {
         return(Ok(_brandServices.GetAllBrands()));
     }
     catch (Exception)
     {
         return(StatusCode(500));
     }
 }
Beispiel #4
0
        public IActionResult Index(string brandName)
        {
            var shoeList    = BrandServices.GetShoesByBrandName(brandName);
            var allBrandsVm = BrandServices.GetAllBrands();

            dynamic mymodel = new ExpandoObject();

            mymodel.Shoes = shoeList.Shoes;
            mymodel.Brand = allBrandsVm;

            return(View(mymodel));
        }
Beispiel #5
0
        public IActionResult Index(int productId)
        {
            var shoe = _shoesService.GetShoeById(productId);

            shoe.Sizes = _quantityService.GetAllSizesById(productId);

            var allBrandsVm = _brandServices.GetAllBrands();

            dynamic mymodel = new ExpandoObject();

            mymodel.Shoe  = shoe;
            mymodel.Brand = allBrandsVm;

            return(View(mymodel));
        }
Beispiel #6
0
        public IActionResult AddShoeView()
        {
            var allShoesVm = new ShoeListViewModel
            {
                Shoes = _shoesService.GetAllShoes()
            };
            var allBrandsVM = _brandServices.GetAllBrands();

            dynamic myModel = new ExpandoObject();

            myModel.AllShoes = allShoesVm.Shoes;
            myModel.Brand    = allBrandsVM;

            return(View(myModel));
        }
Beispiel #7
0
        public IViewComponentResult Invoke()
        {
            var brand = _brandServices.GetAllBrands();

            return(View(brand));
        }
Beispiel #8
0
        public IActionResult GetAllBrands()
        {
            var allBrands = _brandService.GetAllBrands();

            return(Ok(allBrands));
        }