public ActionResult DeleteConfirmed(int id) { if (User.IsInRole("AdminL") || User.IsInRole("SuperAdmin") || User.IsInRole("Owner") || iComment.GetDetail(id).MemberID.ToString() == User.Identity.Name) { iComment.Delete(id); return(RedirectToAction("Index")); } return(View("~/Views/Common/Denied.cshtml")); }
public ResponseDto Delete(CommentDeleteDto deleteDto) { ResponseDto responseDto = new ResponseDto(); CommentDeleteBo deleteBo = new CommentDeleteBo() { CommentId = deleteDto.CommentId, Session = Session }; ResponseBo responseBo = commentBusiness.Delete(deleteBo); responseDto = responseBo.ToResponseDto(); return(responseDto); }
public IActionResult Delete(int id) { _commentsBusiness.Delete(id); return(NoContent()); }
public async Task <IActionResult> Delete(string id) { bool rst = await m_CommentBusiness.Delete(id); return(ToResponse(rst)); }