Пример #1
0
        public ActionResult OtherProfile(int userId)
        {
            ViewData["userId"] = userId;

            _postBusiness = new PostBusiness();
            _iconBusiness = new IconBusiness();
            _profileBusiness = new ProfileBusiness();
            _registerBusiness = new RegisterBusiness();

            UserProfile _userProfile = _profileBusiness.getProfileInfo(userId);

            int _registerId = (int)_userProfile.UserRegisterID;
            int _iconId = (int)_userProfile.IconID;

            UserRegister _userRegister = _registerBusiness.findById(_registerId);

            string _userRegisterName = _userRegister.Name;
            string _userRegisterSurname = _userRegister.Surname;

            try
            {
                ViewData["registerName"] = _userRegisterName;
                ViewData["registerSurname"] = _userRegisterSurname;
                ViewData["pathImage"] = _iconBusiness.getIconUrl(_iconId);
                ViewData["postDatabase"] = _postBusiness.getUserArticlePost(userId);
            }
            catch (Exception ex)
            {
            }

            return View();
        }