Beispiel #1
0
        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 = "" }));
        }
Beispiel #2
0
        public JsonResult deletePosts(int Id)
        {
            UserPostService.Update(Id);
            var data = GenericMetodsservices.UserPostedFulldetailsforAdmin();

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Beispiel #3
0
 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 = "" }));
 }