예제 #1
0
        public ActionResult Index()
        {
            IEnumerable <VUserProfileTransferModel> vUserProfileDtos = _vUserProfileService.GetVUserProfiles();
            List <UserProfileGridViewModel>         userProfiles     =
                Mapper.Map <IEnumerable <VUserProfileTransferModel>, List <UserProfileGridViewModel> >(vUserProfileDtos);

            return(View(userProfiles));
        }
예제 #2
0
        private List <SelectListItem> GetUsers()
        {
            var users = Mapper.Map <IEnumerable <VUserProfileTransferModel>, List <UserProfileGridViewModel> >(_vUserProfileService.GetVUserProfiles());
            List <SelectListItem> selectItems = new List <SelectListItem>();

            foreach (var item in users)
            {
                selectItems.Add(new SelectListItem {
                    Text = item.FullName, Value = item.UserId.ToString()
                });
            }
            return(selectItems);
        }