protected string IsSigned() { //NttDataWA.DocsPaWR.FileRequest fileRequest = NttDataWA.UIManager.FileManager.getSelectedFile(this); NttDataWA.DocsPaWR.FileRequest fileRequest = null; if (UIManager.DocumentManager.getSelectedAttachId() != null) { fileRequest = FileManager.GetFileRequest(UIManager.DocumentManager.getSelectedAttachId()); } else { fileRequest = FileManager.GetFileRequest(); } if (DocumentManager.getSelectedNumberVersion() != null && DocumentManager.ListDocVersions != null) { fileRequest = (from v in DocumentManager.ListDocVersions where v.version.Equals(DocumentManager.getSelectedNumberVersion()) select v).FirstOrDefault(); } if (fileRequest != null) { if (!string.IsNullOrEmpty(fileRequest.firmato) && fileRequest.firmato.Trim() == "1") { return("1"); } return("0"); } else { return("0"); } }
/// <summary> /// Reperimento estensione del file da firmare /// </summary> /// <returns></returns> protected string GetFileExtension() { //NttDataWA.DocsPaWR.FileRequest fileRequest = NttDataWA.UIManager.FileManager.getSelectedFile(this); NttDataWA.DocsPaWR.FileRequest fileRequest = null; if (UIManager.DocumentManager.getSelectedAttachId() != null) { fileRequest = FileManager.GetFileRequest(UIManager.DocumentManager.getSelectedAttachId()); } else { fileRequest = FileManager.GetFileRequest(); } if (DocumentManager.getSelectedNumberVersion() != null && DocumentManager.ListDocVersions != null) { fileRequest = (from v in DocumentManager.ListDocVersions where v.version.Equals(DocumentManager.getSelectedNumberVersion()) select v).FirstOrDefault(); } if (fileRequest != null) { System.IO.FileInfo fileInfo = new System.IO.FileInfo(fileRequest.fileName); return(fileInfo.Extension.ToLower()); } else { return(string.Empty); } }
/// <summary> /// Reperimento estensione del file da firmare /// </summary> /// <returns></returns> protected string GetFileExtension() { NttDataWA.DocsPaWR.FileRequest fileRequest = NttDataWA.UIManager.FileManager.getSelectedFile(this); if (fileRequest != null) { System.IO.FileInfo fileInfo = new System.IO.FileInfo(fileRequest.fileName); return(fileInfo.Extension.ToLower()); } else { return(string.Empty); } }