Exemplo n.º 1
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            UserProfileTransferModel userProfileDto = _userProfileService.GetUserProfile(id);

            if (userProfileDto == null)
            {
                return(HttpNotFound());
            }

            var userProfile = Mapper.Map <UserProfileTransferModel, UserProfileDetailsViewModel>(userProfileDto);

            var direction = Mapper.Map <DirectionTransferModel, DirectionViewModel>(_directionService.GetDirection(userProfileDto.DirectionId));

            ViewBag.Direction = direction.Name;

            return(View(userProfile));
        }
Exemplo n.º 2
0
		public ActionResult Details(int? id)
		{
			if (id == null)
			{
				return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
			}

			UserProfileDTO userProfileDTO = _userProfileService.GetUserProfile(id);

			if (userProfileDTO == null)
			{
				return HttpNotFound();
			}

			var userProfile = _mapper.Map<UserProfileDTO, UserProfileViewModel>(userProfileDTO);

			DirectionDTO directionDTO = _directionService.GetDirection(userProfileDTO.DirectionId);
			var direction = _mapper.Map<DirectionDTO, DirectionViewModel>(directionDTO);

			ViewBag.Direction = direction.Name;

			return View(userProfile);
		}
Exemplo n.º 3
0
 public ActionResult GetDirection()
 {
     var direction = db5.GetDirection(); return(View(direction));
 }