CloseDetail.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Muchinfo.MTPClient.Data.Enums;
  6. using Muchinfo.MTPClient.Data.Helper;
  7. namespace Muchinfo.MTPClient.Data.Model.Account
  8. {
  9. public class CloseDetail:OrderBase
  10. {
  11. [PropertyDisc("closeid")]
  12. public long closeid { get; set; }
  13. [PropertyDisc("tradeid")]
  14. public long tradeid { get; set; }
  15. [PropertyDisc("opentradeid")]
  16. public long opentradeid { get; set; }
  17. [PropertyDisc("tradedate")]
  18. public string tradedate { get; set; }
  19. [PropertyDisc("marketid")]
  20. public decimal marketid { get; set; }
  21. [PropertyDisc("marketname")]
  22. public string marketname { get; set; }
  23. [PropertyDisc("currencyid")]
  24. public decimal currencyid { get; set; }
  25. [PropertyDisc("decimalplace")]
  26. public decimal decimalplace { get; set; }
  27. [PropertyDisc("agreeunit")]
  28. public decimal agreeunit { get; set; }
  29. [PropertyDisc("accountid")]
  30. public long accountid { get; set; }
  31. [PropertyDisc("openprice")]
  32. public decimal openprice { get; set; }
  33. [PropertyDisc("holderprice")]
  34. public decimal holderprice { get; set; }
  35. [PropertyDisc("closeqty")]
  36. public int closeqty { get; set; }
  37. [PropertyDisc("closeprice")]
  38. public decimal closeprice { get; set; }
  39. [PropertyDisc("closetime")]
  40. public DateTime closetime { get; set; }
  41. [PropertyDisc("opentradedate")]
  42. public string opentradedate { get; set; }
  43. [PropertyDisc("opentime")]
  44. public DateTime opentime { get; set; }
  45. [PropertyDisc("curexchangerate")]
  46. public decimal curexchangerate { get; set; }
  47. [PropertyDisc("accountcurrencyid")]
  48. public decimal accountcurrencyid { get; set; }
  49. [PropertyDisc("closepl")]
  50. public decimal closepl { get; set; }
  51. [PropertyDisc("closepl2")]
  52. public decimal closepl2 { get; set; }
  53. [PropertyDisc("closepl3")]
  54. public decimal closepl3 { get; set; }
  55. [PropertyDisc("closepl4")]
  56. public decimal closepl4 { get; set; }
  57. [PropertyDisc("histradedate")]
  58. public string histradedate { get; set; }
  59. public string CloseTimeDisplay
  60. {
  61. get
  62. {
  63. if (closetime != DateTime.MinValue)
  64. {
  65. return closetime.ToString("yyyy-MM-dd HH:mm:ss");
  66. }
  67. return "-";
  68. }
  69. }
  70. public string ClosePriceDisplay
  71. {
  72. get
  73. {
  74. string result = closeprice.ToString(PriceExpFormat);//服务端已做小数位处理
  75. return result;
  76. }
  77. }
  78. public string OpenTimeDisplay
  79. {
  80. get
  81. {
  82. if (opentime != DateTime.MinValue)
  83. {
  84. return opentime.ToString("yyyy-MM-dd HH:mm:ss");
  85. }
  86. return "-";
  87. }
  88. }
  89. public string OpenPriceDisplay
  90. {
  91. get
  92. {
  93. string result = openprice.ToString(PriceExpFormat);//服务端已做小数位处理
  94. return result;
  95. }
  96. }
  97. public string ClosePL2Display
  98. {
  99. get { return closepl2.ToString("N2"); }
  100. }
  101. public string ClosePL4Display
  102. {
  103. get { return closepl4.ToString("N2"); }
  104. }
  105. }
  106. }