コード例 #1
0
        /// <summary>
        /// 删除一个用户
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public int Delete(int userId)
        {
            sus.Delete(userId);
            int result = sus.SaveChanges();

            if (result == 1)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
コード例 #2
0
        public ActionResult DeleteAccount(int id)
        {
            bool result = userService.Delete(id);

            if (result == true)
            {
                TempData["Message"] = "ສຳເລັດ";
                return(RedirectToAction("Accounts", "Admin"));
            }
            else
            {
                TempData["Message"] = "ບໍ່ສຳເລັດ";
                return(RedirectToAction("Accounts", "Admin"));
            }
        }
コード例 #3
0
        public IActionResult Del(long id)
        {
            var ro = systemUserBusiness.Delete(id);

            return(Json(ro));
        }
コード例 #4
0
        public ActionResult DeleteAccount(int id)
        {
            bool result = userService.Delete(id);

            return(RedirectToAction("Accounts", "AdminAccount"));
        }
コード例 #5
0
 public async Task Delete([FromUri] Guid id)
 {
     await _systemUserService.Delete(id);
 }