public ActionResult AssignBatch(AdmissionViewModel admissionViewModel) { var organisationId = UserOrganisationId; var centreId = UserCentreId; var personnelId = UserPersonnelId; if (ModelState.IsValid) { admissionViewModel.Admission.OrganisationId = organisationId; admissionViewModel.Admission.CentreId = centreId; admissionViewModel.Admission.PersonnelId = personnelId; admissionViewModel.Admission.CreatedBy = personnelId; NidanBusinessService.AssignBatch(organisationId, centreId, personnelId, admissionViewModel.Admission); return(RedirectToAction("Index")); } var viewModel = new AdmissionViewModel { Admission = admissionViewModel.Admission }; return(View(viewModel)); }