public ActionResult Create(BatchPlannerViewModel batchPlannerViewModel) { var organisationId = UserOrganisationId; if (ModelState.IsValid) { batchPlannerViewModel.BatchPlanner.OrganisationId = organisationId; batchPlannerViewModel.BatchPlanner = NidanBusinessService.CreateBatchPlanner(organisationId, batchPlannerViewModel.BatchPlanner, batchPlannerViewModel.BatchPlannerDay); return(RedirectToAction("Index")); } batchPlannerViewModel.Courses = new SelectList(NidanBusinessService.RetrieveCourses(organisationId, e => true).ToList()); batchPlannerViewModel.Trainers = new SelectList(NidanBusinessService.RetrieveTrainers(organisationId, e => true).ToList()); batchPlannerViewModel.Rooms = new SelectList(NidanBusinessService.RetrieveRooms(organisationId, e => true).ToList()); return(View(batchPlannerViewModel)); }