Exemple #1
0
        public async Task <IActionResult> ManagePassword(long id, OutletPasswordsViewModel OutletPasswords)
        {
            if (id <= 0)
            {
                return(NotFound());
            }
            if (ModelState.IsValid)
            {
                await _outletService.UpdatePasswordOutlet(id, OutletPasswords.Password);

                return(RedirectToAction(nameof(Index)));
            }
            var manageOutlet = await _outletService.ManageOutletsWithDevicesandPassword(id);

            return(View("Edit", manageOutlet));
        }