示例#1
0
        public ActionResult Create(RoomViewModel roomViewModel)
        {
            var organisationId = UserOrganisationId;

            if (ModelState.IsValid)
            {
                roomViewModel.Room.OrganisationId = UserOrganisationId;
                //roomViewModel.Room.CentreId = UserCentreId;
                roomViewModel.Room = NidanBusinessService.CreateRoom(UserOrganisationId, roomViewModel.Room);
                return(RedirectToAction("Index"));
            }
            roomViewModel.RoomTypes = new SelectList(NidanBusinessService.RetrieveRoomTypes(organisationId, e => true).ToList());
            roomViewModel.Centres   = new SelectList(NidanBusinessService.RetrieveCentres(organisationId, e => true).ToList());
            return(View(roomViewModel));
        }