Ejemplo n.º 1
0
        public ActionResult Chest(long houseID)
        {
            var house  = houseRepository.GetById(houseID);
            var result = houseService.CanModifyHouse(house, SessionHelper.CurrentEntity);

            if (result.IsError)
            {
                return(RedirectBackWithError(result));
            }

            var equipment = equipmentRepository.GetByEntityID(SessionHelper.LoggedCitizen.ID);
            var chest     = houseFurnitureRepository.GetHouseChest(houseID);

            var vm = new HouseChestViewModel(house, equipment, chest, houseService.GetHouseRights(house, SessionHelper.CurrentEntity));

            return(View(vm));
        }