Beispiel #1
0
 public ActionResult GetById(int id)
 {
     var user = DataBase.Users.GetById((int)id);
     if (user != null)
     {
         var u = new UserView(user);
         return View("Page", u);
     }
     return View();
 }
Beispiel #2
0
        public ActionResult Edit(UserEdit usr)
        {
            usr.access_token = Request.Cookies["access_token"].Value;
            if (DataBase.Users.edit(usr))
            {
                ModelState.Add("edited", new ModelState{ Value = new ValueProviderResult("success","success",null) });
            }
            else
            {
                ModelState.Add("edited", new ModelState { Value = new ValueProviderResult("success", "failed", null) });
            }
                var at = Request.Cookies["access_token"].Value;
            UserView view = new UserView(DataBase.Users.GetByAccess(at));

            return View("Edit", view);
        }
Beispiel #3
0
 public ActionResult Edit()
 {
     var at = Request.Cookies["access_token"].Value;
     UserView usr = new UserView(DataBase.Users.GetByAccess(at));
     return View("Edit",usr);
 }