// GET: Manage public ActionResult Index(int userId) { try { if (Session["User"] == null || Session["UserRole"] == null) { return RedirectToAction("Index", "Home"); } if ((int)Session["UserId"] != userId) { return RedirectToAction("Index", "StoreInfor"); } AccountBusiness ab = new AccountBusiness(); var user = ab.GetUser(userId); return View(user); } catch { return RedirectToAction("ManageError", "Error"); } }
public ActionResult ChangePassword(int UserId) { try { AccountBusiness ab = new AccountBusiness(); if (Session["User"] == null || ((int)Session["UserId"] != UserId)) { return RedirectToAction("Index", "Home"); } var user = ab.GetUser(UserId); return View(user); } catch { return RedirectToAction("Index", "Error"); } }