yambroskin

Untitled

Jul 10th, 2017
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public static string GetName(ISignedFile signedFile)
  2. {
  3. if (signedFile == null) return null;
  4.  
  5. try
  6. {
  7. if (signedFile.File != null && File.Exists(signedFile.File.ContentFilePath))
  8. {
  9. return signedFile.File.Name;
  10. }
  11. }
  12. catch (Exception ex)
  13. {
  14. EleWise.ELMA.Logging.Logger.Log.Error($"Не удалось вычислить наименование файла {signedFile.Id}", ex);
  15. }
  16. return $"{signedFile.DocumentType?.Name} по {signedFile.Request?.Name}";
  17. }
Advertisement
Add Comment
Please, Sign In to add comment