public ActionResult DeleteUserPost(int Id) { if (Session["UserId"] != null) { int UserId = Convert.ToInt32(Session["UserId"]); View_UserDetails Userdetails = UserDetailsViewService.GetUserByUserId(Convert.ToInt32(UserId)); UserPostService.Update(Id); TempData["DeletedMessage"] = UtilitiesClass.DeleteMessage; switch (Convert.ToInt32(Userdetails.RoleId)) { case 1: return(RedirectToAction(AlumniWhiteBoard.Index, AlumniWhiteBoard.WhiteBoard, new { area = AreasforAlumni.Alumini })); break; case 2: return(RedirectToAction(AlumniWhiteBoard.Index, AlumniWhiteBoard.WhiteBoard, new { area = AreasforAlumni.Faculty })); break; default: return(RedirectToAction(AlumniWhiteBoard.Index, AlumniWhiteBoard.WhiteBoard, new { area = AreasforAlumni.AlumniFaculty })); break; } } return(RedirectToAction(LoginPages.Login, LoginPages.Account, new { area = "" })); }
public JsonResult deletePosts(int Id) { UserPostService.Update(Id); var data = GenericMetodsservices.UserPostedFulldetailsforAdmin(); return(Json(data, JsonRequestBehavior.AllowGet)); }
public ActionResult DeleteUserPost(int Id) { if (Session["UserId"] != null) { UserPostService.Update(Id); return(RedirectToAction("Index", "WhiteBoard", new { area = "Faculty" })); } return(RedirectToAction(LoginPages.Login, LoginPages.Account, new { area = "" })); }