예제 #1
0
        public AjaxResult DeleteAccounts(IEnumerable <string> ids)
        {
            foreach (var id in ids)
            {
                _profileManagementService.DeleteAccount(Int32.Parse(id));
            }

            return(new AjaxResult(AjaxResultState.OK));
        }
예제 #2
0
        public IActionResult DeleteAccount(int id)
        {
            try
            {
                // TODO: Add delete logic here
                _profileManagementService.DeleteAccount(id);

                return(RedirectToAction(nameof(IndexAccount)));
            }
            catch
            {
                return(RedirectToAction(nameof(DeleteAccount)));
            }
        }