public ActionResult MemberRequestCancel(int id) { var session = HttpContext.Session; if (session != null) { HttpContext.Session.TryGetValue("token", out var result); if (result != null) { TempData["isLoggedIn"] = HttpContext.Session.GetString("token"); TempData["memberID"] = HttpContext.Session.GetString("memberID"); Tbl_Request request = _RequestService.Get(id); _RequestService.Delete(request); return(RedirectToAction("MemberRequestListCrud", "MemberPage")); } } return(RedirectToAction("Index", "GeneralPage")); }
public JsonResult MemberRequestCancel(int id) { var session = HttpContext.Session; if (session != null) { HttpContext.Session.TryGetValue("token", out var result); if (result != null) { TempData["isLoggedIn"] = HttpContext.Session.GetString("token"); TempData["memberID"] = HttpContext.Session.GetString("memberID"); Tbl_Request request = _RequestService.Get(id); _RequestService.Delete(request); return(Json(Ok())); // return Json("MemberRequestListCrud", "MemberPage"); } } return(Json("Giriş Yapın")); }