public SetDescriptionViewModel(SetDescriptionPostInputModel inputModel)
 {
     Id = inputModel.Id;
     ContentItemId = inputModel.ContentItemId;
     ContentItemVersionId = inputModel.ContentItemVersionId;
     Description = inputModel.Description;
 }
 public ActionResult SetDescriptionPost(SetDescriptionPostInputModel inputModel)
 {
     if (!_authorizer.Authorize(Permissions.EditContent, T("Not authorized to manage versions.")))
     {
         return new HttpUnauthorizedResult();
     }
     if (!ModelState.IsValid)
     {
         SetDescriptionViewModel viewModel = new SetDescriptionViewModel(inputModel);
         return View("SetDescription", viewModel);
     }
     _versionManagerWorkerService.SetDescriptionPost(inputModel);
     return RedirectToAction("List", new {id = inputModel.ContentItemId});
 }
        public bool SetDescriptionPost(SetDescriptionPostInputModel inputModel)
        {
            VersionManagerRecord record = new VersionManagerRecord
            {
                ContentItemId = inputModel.ContentItemId,
                ContentItemVersionId = inputModel.ContentItemVersionId,
                Description = inputModel.Description,
                Id = inputModel.Id
            };

            if (_versionManagerDataService.SetVersionManagerRecord(record))
            {
                _notifier.Information(T("Versionmanager information updated."));
                return false;
            }

            _notifier.Error(
                T("Could not update VersionManagerRecord. Make sure that contentItemId or ContentItemVersionId is 0"));
            return true;
        }