コード例 #1
0
 // GET: Home
 public ActionResult HomePage(Guid?id)
 {
     if (id != null)
     {
         UserDetail userz = new UserDetail();
         userz = _userDetailService.GetById(id.Value);
         string cookie = userz.UserName.ToString();
         FormsAuthentication.SetAuthCookie(cookie, true);
         if (userz.Role == Role.Admin)
         {
             return(RedirectToAction("Statics", "Home", new { area = "Admin" }));
         }
     }
     return(View());
 }
コード例 #2
0
        public ActionResult Update(Guid id)
        {
            UserDetail kullanici = _userDetailService.GetById(id);

            return(View(kullanici));
        }