public ActionResult Manage(int?artifactId) { UserCheck(); Artifact artifact = null; if (artifactId.HasValue) { artifact = artifactService.FindArtifactById(artifactId.Value, true); } ManageArtifactViewModel manageArtifactViewModel = ConvertArtifactToViewModel(artifact); if (manageArtifactViewModel.ContentItems != null) { Content content = manageArtifactViewModel.ContentItems.Last(); manageArtifactViewModel.PublishDate = content.PublishDate.ToString("MM/dd/yyyy"); } else { manageArtifactViewModel.PublishDate = DateTime.Now.Date.ToString("MM/dd/yyyy"); } return(View("ManageArtifact", manageArtifactViewModel)); }