コード例 #1
0
 // 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");
     }
 }
コード例 #2
0
 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");
     }
 }