예제 #1
0
        public ActionResult Inventory(int organisationID)
        {
            var organisation = organisationRepository.GetById(organisationID);

            MethodResult result = organisationService.CanSeeInventory(SessionHelper.CurrentEntity, SessionHelper.LoggedCitizen, organisation);

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

            var vm = new OrganisationEquipmentViewModel(organisation, organisation.Entity.Equipment);

            return(View(vm));
        }