コード例 #1
0
 public ActionResult ConfirmNoticeDelete(int id)
 {
     if (CheckAccess())
     {
         noticerepo.Delete(id);
         return(RedirectToAction("ViewAllNotice", "Admin"));
     }
     else
     {
         return(RedirectToAction("Login", "Home"));
     }
 }
コード例 #2
0
 public IHttpActionResult ConfirmNoticeDelete(int id)
 {
     noticerepo.Delete(id);
     return(StatusCode(HttpStatusCode.NoContent));
 }
コード例 #3
0
        public IHttpActionResult DeleteNoticeByID([FromUri] int id)
        {
            noticerepo.Delete(id);

            return(StatusCode(HttpStatusCode.NoContent));
        }
コード例 #4
0
 public ActionResult DeleteNotice(int id)
 {
     noticeRepository.Delete(id);
     return(RedirectToAction("PostedNotification", "Admin"));
 }