public ActionResult AddEditLicenseeType(long?licenseeTypeId) { var viewModel = new AddEditLicenseeTypeViewModel(); if (licenseeTypeId.HasValue) { var drLicenseeType = CRCDataAccess.GetLicenseeType(licenseeTypeId.Value); drLicenseeType.MapTo(viewModel); viewModel.EnabledInd = !(drLicenseeType["DisabledDate"] is DateTime); } return(PartialView(viewModel)); }