public ActionResult AddEditProgramSource(long?programSourceId) { var viewModel = new AddEditProgramSourceViewModel(); if (programSourceId.HasValue) { var drProgramSources = CRCDataAccess.GetProgramSource(programSourceId.Value); drProgramSources.MapTo(viewModel); viewModel.EnabledInd = !(drProgramSources["DisabledDate"] is DateTime); } return(PartialView(viewModel)); }