Example #1
0
        public ActionResult ApplicationForm()
        {
            // get list of building unit content
            var buildingUnitContents = _buildingUnitContentsAppService.getAllBuildingUnitContents();
            // get the list of building uses
            var buildingUses = _buildingUsesAppService.getAllBuildingUses();
            //get the list of buildingTypes
            var buildingTypes = _buildingTypeAppService.getAllBuildingtype().ToList();
            // get the list of neighborhoods
            var neighborhoods = _neighborhoodAppService.GetAllNeighborhood().ToList();
            // get all of buildings
            var buildings = _buildingsAppService.getAllBuildings();
            // get all of restoration types
            var restorationTypes = _restorationTypeAppService.getAllResorationTypes();
            // get all of intervention types
            var interventionTypes = _interventionTypeAppService.getAllInterventionTypes();
            // get all applications
            var applications = _applicationsAppService.getAllApplications().ToList();
            // get all property ownerships
            var propertyOwnerships = _propertyOwnershipAppService.getAllPropertyOwnerships();
            // populate yes no drop down list
            var yesOrNo = new List <string>
            {
                "True",
                "False"
            };
            var fullNameList = new List <string>();

            foreach (var application in applications)
            {
                if (!String.IsNullOrWhiteSpace(application.fullName))
                {
                    fullNameList.Add(application.fullName);
                }
            }
            var fullNameArray         = fullNameList.Distinct().ToArray();
            var applicationsViewModel = new ApplicationsViewModel()
            {
                fullNameArray        = fullNameArray,
                buildingOutput       = new GetBuildingsOutput(),
                PropertyOwnerShips   = propertyOwnerships,
                YesOrNo              = new SelectList(yesOrNo),
                InterventionTypes    = interventionTypes,
                RestorationTypes     = restorationTypes,
                Applications         = applications,
                Buildings            = buildings,
                Building             = new CreateBuildingsInput(),
                Neighborhoods        = neighborhoods,
                BuildingTypes        = buildingTypes,
                BuildingUses         = buildingUses,
                BuildingUnitContents = buildingUnitContents
            };

            return(View("ApplicationForm", applicationsViewModel));
        }
        public ActionResult ApplicationForm()
        {
            // get all of intervention types
            var interventionTypes = _interventionTypeAppService.getAllInterventionTypes();
            // get all applications
            var applications = _applicationsAppService.getAllApplications().ToList();
            // get all property ownerships
            var propertyOwnerships = _propertyOwnershipAppService.getAllPropertyOwnerships();
            // populate yes no drop down list
            var yesOrNo = new List <string>
            {
                "True",
                "False"
            };
            var fullNameList = new List <string>();

            foreach (var application in applications)
            {
                if (!String.IsNullOrWhiteSpace(application.fullName))
                {
                    fullNameList.Add(application.fullName);
                }
            }
            var fullNameArray         = fullNameList.Distinct().ToArray();
            var applicationsViewModel = new ApplicationsViewModel()
            {
                fullNameArray      = fullNameArray,
                buildingOutput     = new GetBuildingsOutput(),
                PropertyOwnerShips = propertyOwnerships,
                YesOrNo            = new SelectList(yesOrNo),
                InterventionTypes  = interventionTypes
            };

            return(View("ApplicationForm", applicationsViewModel));
        }
        // GET: PropertyOwnership
        public ActionResult Index()
        {
            var propertyOwnerships         = _propertyOwnershipAppService.getAllPropertyOwnerships();
            var propertyOwnershipViewModel = new PropertyOwnershipViewModel()
            {
                PropertyOwnerships = propertyOwnerships
            };

            return(View("PropertyOwnership", propertyOwnershipViewModel));
        }