Beispiel #1
0
        //get and show the profile of support staff using Id
        public IActionResult Profile(string id)
        {
            User pUser = lIUserRepository.getUser(id);

            if (pUser != null)
            {
                UserViewModel _user = UserExtension.UserToUserViewModel(pUser);
                ViewBag.Name = _user.Name;
                return(View(_user));
            }
            else
            {
                return(View(null));
            }
        }
        public IActionResult Profile(string id)
        {
            User pUser = lIUserRepository.getUser(id);

            List <User> _userProviderlist = lIUserRepository.getUserListByType(3);

            var ObjProviderList = _userProviderlist.Select(r => new SelectListItem
            {
                Value = r.UserId.ToString(),
                Text  = r.Name
            });

            ViewBag.ddProvider = new SelectList(ObjProviderList, "Value", "Text");
            ViewBag.ddProvider = ObjProviderList;
            UserViewModel _user = UserExtension.UserToUserViewModel(pUser);

            return(View(_user));
        }