BizComponent_ADT.cs 1.1 KB

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