public ActionResult CloseAwardBatch(Guid id)
        {
            return(ActionResultHelper.TryCatchWithLogger(() =>
            {
                AwardBatch awardBatch = _preservationService.GetAwardBatch(id);
                if (awardBatch.IsOpen)
                {
                    _preservationService.CloseAwardBatch(awardBatch);
                    string xml = string.Empty;
                    if (awardBatch.IdPDVDocument.HasValue)
                    {
                        using (DocumentsClient client = new DocumentsClient())
                        {
                            DocumentContent content = client.GetDocumentContentById(awardBatch.IdPDVDocument.Value);
                            if (content != null)
                            {
                                xml = Encoding.UTF8.GetString(content.Blob);
                            }
                            _loggerService.Warn(string.Format("CloseAwardBatch -> nessun documento trovato con Id {0}. Si procede con una nuova generazione del pacchetto di versamento.", awardBatch.IdPDVDocument));
                        }
                    }

                    if (string.IsNullOrEmpty(xml))
                    {
                        xml = _preservationService.CreateAwardBatchPDVXml(awardBatch);
                        SavePDVXml(xml, awardBatch);
                    }

                    DocumentArchive archive = ArchiveService.GetArchive(awardBatch.IdArchive);
                    if (!archive.Name.Equals(ConfigurationHelper.RDVArchiveName, StringComparison.InvariantCultureIgnoreCase))
                    {
                        SaveRDVXml(xml, awardBatch);
                    }
                }
                return Content(string.Empty);
            }, _loggerService));
        }