BizComponent_ADT.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using MediII.Adapter.BizComponent.Base;
  6. using MediII.Adapter.ReceiveToScanModel;
  7. namespace MediII.Adapter.BizComponent.ADT
  8. {
  9. public class BizComponent_ADT : BaseBizComponent, IBizComponent
  10. {
  11. public override string DoProcess(TaskMessage msg ,string msgType)
  12. {
  13. try
  14. {
  15. ADTHandler handler = ADTHandler.GetHandler(msgType);
  16. try
  17. {
  18. handler.Handler(msg);
  19. return string.Empty;
  20. }
  21. catch (Exception ex)
  22. {
  23. if (ex.InnerException == null)
  24. {
  25. return ex.Message;
  26. }
  27. else
  28. {
  29. return ex.Message + " InnerException:" + ex.InnerException.Message;
  30. }
  31. }
  32. }
  33. catch (Exception ex)
  34. {
  35. return ex.Message;
  36. }
  37. }
  38. }
  39. }