コード例 #1
0
        public ActionResult EditUserInfo()
        {
            //Set User
            _LoggedInUser = LoginController.GetAuthorize(Request.Cookies[LoginController.userToken]);

            //Check if logged in
            if (_LoggedInUser == null)
            {
                //If no user is logged in then redirect to login page
                return(RedirectToAction("../Login/Index"));
            }

            User userFill = new TransportationDB.User();

            userFill.FirstName         = _LoggedInUser.userInfo.FirstName;
            userFill.LastName          = _LoggedInUser.userInfo.LastName;
            userFill.BannerId          = _LoggedInUser.userInfo.EmployeeId;
            userFill.Email             = _LoggedInUser.userInfo.Email;
            userFill.OfficePhoneNumber = _LoggedInUser.userInfo.OfficePhone;

            return(View(userFill));
        }