Beispiel #1
0
 public ActionResult Edit(BrandVm bind)
 {
     if (ModelState.IsValid)
     {
         service.EditBrand(bind);
         return(RedirectToAction("Index"));
     }
     return(View(bind));
 }
        public async Task <IActionResult> Edit(int id, BrandViewsModels editBrand)
        {
            if (ModelState.IsValid)
            {
                if (id == editBrand.Id)
                {
                    await _brandService.EditBrand(id, editBrand);

                    TempData["EditSuccessfuly"] = _localizer.GetLocalizedString("msg_EditSuccessfuly").ToString();
                    return(RedirectToAction("Index"));
                }
            }
            ViewData["EditFailure"] = _brandLocalizer.GetLocalizedString("err_EditFailure");
            return(View());
        }
        public ActionResult <UpdateBrandResponse> PutBrand(UpdateBrandRequest updateBrandRequest)
        {
            var updateBrandResponse = _brandService.EditBrand(updateBrandRequest);

            return(updateBrandResponse);
        }
        public ActionResult <UpdateBrandResponse> PutBrand(UpdateBrandRequest request)
        {
            var response = _service.EditBrand(request);

            return(response);
        }