Esempio n. 1
0
        public async Task <IActionResult> EditSupplier(long id)
        {
            SupplierEditViewModel model = new SupplierEditViewModel()
            {
                Supplier = await _repository.GetSupplierByIdAsync(id)
            };

            if (model != null)
            {
                ViewBag.Title = _stringLocalizer["Edit Supplier"].ToString();
                return(View(model));
            }
            TempData["SupplierMessage"] = _stringLocalizer["Selected Supplier was missing"].ToString();
            return(RedirectToAction(nameof(Index)));
        }