// GET: User public ActionResult UserDashBoard(string msg = "", string color = "black") { try { if (ValidateLogin() == false) { return(RedirectToAction("Login", "Auth", new { msg = "Session Expired from User DashBoard, plz login again", color = "Red" })); } int bookCount = new BookBL().GetBookListByUserId(sdto.getId(), db).Count(); ViewBag.BookCount = bookCount; ViewBag.msg = msg; ViewBag.color = color; return(View()); } catch { return(RedirectToAction("Error", "Auth", new { msg = "search for the page was not found", color = "Red" })); } }
public ActionResult EditProfile(string message = "") { if (sessiondto.getName() == null) { return(RedirectToAction("Index", "Home")); } else { User u = new UserBL().getUserById(sessiondto.getId()); ViewBag.message = message; ViewBag.user = u; return(View()); } }