IWarningService.cs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //----------------------------------------------------------------
  2. //Module Name: IWarningService
  3. //Purpose:
  4. //CopyRight: Muchinfo
  5. //History:
  6. //----------------------------------------------------------------
  7. //DateTime Author Description
  8. //----------------------------------------------------------------
  9. //2014-04-15 deng.yinping Create
  10. //----------------------------------------------------------------
  11. using Muchinfo.MTPClient.Data.Model;
  12. using Muchinfo.MTPClient.Data.Model.Account;
  13. using System.Collections.Generic;
  14. using System.Collections.ObjectModel;
  15. namespace Muchinfo.MTPClient.IService
  16. {
  17. /// <summary>
  18. /// 预警服务接口
  19. /// </summary>
  20. public interface IWarningService
  21. {
  22. /// <summary>
  23. /// 获取当前交易账号预警
  24. /// </summary>
  25. /// <param name="tradeAccount">The trade account.</param>
  26. /// <returns>List{Warning}.</returns>
  27. ObservableCollection<Warning> GetWarnings(TradeAccount tradeAccount);
  28. /// <summary>
  29. /// 添加预警
  30. /// </summary>
  31. /// <param name="warning">The warning.</param>
  32. /// <param name="tradeAccount">The tradeAccount.</param>
  33. /// <returns>System.Int32.</returns>
  34. int AddWarning(Warning warning, TradeAccount tradeAccount);
  35. /// <summary>
  36. /// 更新预警
  37. /// </summary>
  38. /// <param name="warning">The warning.</param>
  39. /// <param name="tradeAccount">The tradeAccount.</param>
  40. /// <returns>System.Int32.</returns>
  41. int UpdateWarning(Warning warning, TradeAccount tradeAccount);
  42. /// <summary>
  43. /// 删除预警
  44. /// </summary>
  45. /// <param name="warningId">The warning.</param>
  46. /// <param name="tradeAccount">The tradeAccount.</param>
  47. /// <returns>System.Int32.</returns>
  48. int DeleteWarning(int warningId, TradeAccount tradeAccount);
  49. /// <summary>
  50. /// 启动/关闭预警
  51. /// </summary>
  52. /// <param name="warningId">The warning id.</param>
  53. /// <param name="tradeAccount">The tradeAccount.</param>
  54. /// <returns>System.Int32.</returns>
  55. int StartOrPauseWarning(int warningId, TradeAccount tradeAccount);
  56. Dictionary<int, string> GetSpaceTime();
  57. Dictionary<int, string> GetRepeatNumber();
  58. List<KeyValuePair<string, string>> GetWarningItem(int warningType);
  59. }
  60. }