public JsonResult DeleteMember(int id) { var dao = new MemberDao(); bool temp = dao.Delete(id); return(Json(new { status = temp })); }
public IHttpActionResult DeletingMember(int?id) { bool flag = memberDao.Delete(id); if (flag) { return(Ok($"Member id {id} deleted")); } return(ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.BadRequest, $"Deleting member id {id} failed"))); }
public ActionResult DeleteMember(member m) { if (!ModelState.IsValid) { ViewBag.Error = "Data format invalid error"; return(View(m)); } bool flag = memberDao.Delete(m.id); if (!flag) { ViewBag.Error = $"Deleting member id:{m.id} failed"; return(View(m)); } return(RedirectToAction("GetMembers")); }
public long Delete(int _Id) { return(memberDao.Delete(_Id)); }