コード例 #1
0
        public ActionResult Details(int id)
        {
            Parcel          unit          = _parcelBusiness.GetParcelDetails(id);
            ParcelViewModel unitViewModel = ParcelMapper.ToParcelViewModel(unit);

            return(View(unitViewModel));
        }
コード例 #2
0
        public ActionResult Edit(int id)
        {
            Parcel          parcel          = _parcelBusiness.GetParcelDetails(id);
            ParcelViewModel parcelViewModel = ParcelMapper.ToParcelViewModel(parcel);

            IEnumerable <User>   userList          = _userBusiness.GetAllResidents();
            List <UserViewModel> userViewModelList = UserMapper.ToUserViewModelList(userList);

            parcelViewModel.Users = new SelectList(userViewModelList, "UserID", "Email");
            return(View(parcelViewModel));
        }