Exemplo n.º 1
0
 public ActionResult UpdateUserInfo(UpdateUserInfoModel model)
 {
     var userInfo = BLLSession.IUserService.GetModel(m => m.UserID == CurrentUser.UserID);
     userInfo.UserName = model.UserName;
     userInfo.DepartmentType = model.DepartmentType;
     BLLSession.IUserService.ModifyModel(userInfo);
     //重新保存信息到Session和写入到Cookies
     WebHelper.OperateContext.Current.SetUserToSessionAndCookies(userInfo, true);
     return Redirect("/admin");
 }
Exemplo n.º 2
0
        public ActionResult UpdateUserInfo()
        {
            if (!OperateHelper.IsLogin())
            {
                return View();
            }

            var userInfo = BLLSession.IUserService.GetListBy(m => m.UserID == CurrentUser.UserID).FirstOrDefault();
            UpdateUserInfoModel model = new UpdateUserInfoModel();
            model.UserName = userInfo.UserName;
            model.DepartmentType = userInfo.DepartmentType;
            return View(model);
        }