public ActionResult EditCategory(Category Category)
        {
            Categoryservice service = new Categoryservice();

            service.updateCategory(Category);
            return(RedirectToAction("listingCategory"));
        }
        public ActionResult EditCategory(int id)
        {
            Categoryservice service  = new Categoryservice();
            var             Category = service.getbyid(id);

            return(View(Category));
        }
        public ActionResult AddCategory(Category Category)
        {
            Categoryservice service = new Categoryservice();

            service.saveCategory(Category);
            return(View("AddCategory"));
        }
        public ActionResult listingCategory()
        {
            Categoryservice Categoryservice = new Categoryservice();
            var             listCategorys   = Categoryservice.getCategory();

            return(View(listCategorys));
        }
Esempio n. 5
0
        protected override async Task OnInitializedAsync()
        {
            var tokenResult = await AuthenticationService.RequestAccessToken();

            tokenResult.TryGetToken(out var tokenReference);
            token = tokenReference.Value;
            await LoadProducts();

            ProductCategoryModels = await Categoryservice.GetAll(new ProductCategoryModel(), token);
        }
 public CategoryApiController(Categoryservice category)
 {
     Categoryservice = category;
 }
Esempio n. 7
0
 public ItemsController(Itemservice Items, Categoryservice categories)
 {
     oItemservice     = Items;
     oCategoryservice = categories;
 }
Esempio n. 8
0
 public HomeController(Categoryservice Category, Itemservice Items, Slidersservice Sliders)
 {
     oCategoryservice = Category;
     oItemservice     = Items;
     oSlidersservice  = Sliders;
 }