yambroskin

Untitled

Aug 29th, 2017
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. using Impeltech.Bank.Managers;
  2. using Impeltech.Bank.Models.NBKI;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using Impeltech.Bank.Helpers;
  8. using Impeltech.Bank.Models;
  9. using Parameters = EleWise.ELMA.Workflow.Models.Parameters.CA_PerezaprositjVNBKI;
  10.  
  11. namespace EleWise.ELMA.Model.Scripts
  12. {
  13.  
  14. /// <summary>
  15. /// Модуль сценариев пользовательского расширения "Перезапросить в НБКИ"
  16. /// </summary>
  17. //Внимание! Для корректной работы программы не изменяйте название класса
  18. public class CA_PerezaprositjVNBKI_Scripts
  19. {
  20.  
  21. //Внимание! В классе должен быть метод Execute с данной сигнатурой
  22. public void Execute(Parameters parameters)
  23. {
  24. if (parameters.Request == null) return;
  25. var helper = new OrchardHelper();
  26. var result = helper.NBKIRequest(parameters.Request);
  27. if (result == null) return;
  28. if (string.IsNullOrWhiteSpace(result.SignFileHash) && string.IsNullOrWhiteSpace(result.ContentFileHash))
  29. {
  30. result.SignFileHash = result.ContentFileHash = "1";
  31. }
  32. parameters.Request.NBKIResponse = result.ToEntity(parameters.Request, "NBKIResponse", parameters.Request.NBKIResponse) as SignedFile;
  33. RequestBankGuaranteeManager.Instance.LoadNBKIRequests(parameters.Request);
  34. }
  35.  
  36. }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment