Exemple #1
0
 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"));
 }
Exemple #2
0
        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());
 }
Exemple #4
0
        public async Task <IActionResult> Delete(string id)
        {
            bool rst = await m_CommentBusiness.Delete(id);

            return(ToResponse(rst));
        }