Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            accountDAL.Delete(id);

            if (id != null)
            {
                return(Content("Sorry you had to leave us. We hope to see you again soon !"));
                //return RedirectToAction("Register", "Account");
            }

            else
            {
                TempData["errorMessage"] = "Error deleting Account";
            }

            return(RedirectToAction("Register", "Account"));
        }
Exemplo n.º 2
0
        public bool DeleteByID(Guid entityID)
        {
            Account account = GetByID(entityID);

            return(_accountDAL.Delete(account) > 0);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 根据主键ID删除数据
 /// </summary>
 /// <param name="id">主键ID的值</param>
 /// <returns></returns>
 public bool Delete(int id)
 {
     return(dal.Delete(id));
 }