QueryDataServiceClient.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. using System;
  2. using System.Collections.Generic;
  3. using Aitex.Core.RT.Event;
  4. using Aitex.Core.UI.ControlDataContext;
  5. using Aitex.Core.WCF;
  6. using Aitex.Triton160.Common;
  7. using Aitex.Triton160.Common.Interface;
  8. namespace Aitex.Triton160.UI.WCF
  9. {
  10. public class QueryDataServiceClient : ServiceClientWrapper<IQueryDataService>, IQueryDataService
  11. {
  12. public QueryDataServiceClient()
  13. : base("Client_IQueryDataService", "QueryDataService")
  14. {
  15. }
  16. public Dictionary<string, object> PollData(IEnumerable<string> keys)
  17. {
  18. Dictionary<string, object> result = null;
  19. Invoke(svc => { result = svc.PollData(keys); });
  20. return result;
  21. }
  22. public string GetConfigFileContent(string fileName)
  23. {
  24. string result = null;
  25. Invoke(svc => { result = svc.GetConfigFileContent(fileName); });
  26. return result;
  27. }
  28. public Dictionary<string, object> PollConfig(IEnumerable<string> keys)
  29. {
  30. Dictionary<string, object> result = null;
  31. Invoke(svc => { result = svc.PollConfig(keys); });
  32. return result;
  33. }
  34. public object GetData(string key)
  35. {
  36. object result = null;
  37. Invoke(svc => { result = svc.GetData(key); });
  38. return result;
  39. }
  40. public object GetConfig(string key)
  41. {
  42. object result = null;
  43. Invoke(svc => { result = svc.GetConfig(key); });
  44. return result;
  45. }
  46. public List<EventItem> QueryDBEvent(string sql)
  47. {
  48. List<EventItem> result = null;
  49. Invoke(svc => { result = svc.QueryDBEvent(sql); });
  50. return result;
  51. }
  52. public Dictionary<string, object> PollHardwareConfig(IEnumerable<string> keys)
  53. {
  54. Dictionary<string, object> result = null;
  55. Invoke(svc =>
  56. {
  57. result = svc.PollHardwareConfig(keys);
  58. });
  59. return result;
  60. }
  61. public List<string> GetHistoryRecipeList(DateTime from, DateTime to)
  62. {
  63. List<string> result = null;
  64. Invoke(svc =>
  65. {
  66. result = svc.GetHistoryRecipeList(from, to);
  67. });
  68. return result;
  69. }
  70. public List<DataLogItem> GetHistoryDataLogList(DateTime from, DateTime to, string recipeName, string lot)
  71. {
  72. List<DataLogItem> result = null;
  73. Invoke(svc =>
  74. {
  75. result = svc.GetHistoryDataLogList(from, to, recipeName, lot);
  76. });
  77. return result;
  78. }
  79. public List<HistoryDataItem> GetHistoryData(IEnumerable<string> keys, string recipeRunGuid)
  80. {
  81. List<HistoryDataItem> result = null;
  82. Invoke(svc =>
  83. {
  84. result = svc.GetHistoryData(keys, recipeRunGuid);
  85. });
  86. return result;
  87. }
  88. public List<LeakCheckResultItem> GetHistoryLeakCheck()
  89. {
  90. List<LeakCheckResultItem> result = null;
  91. Invoke(svc =>
  92. {
  93. result = svc.GetHistoryLeakCheck();
  94. });
  95. return result;
  96. }
  97. }
  98. }