| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323 |
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Data.Helper;
- using Muchinfo.MTPClient.Resources;
- using System;
- namespace Muchinfo.MTPClient.Data.Model.Account
- {
- public class CompleteOrder : OrderBase, ICloneable
- {
- #region Members of CompleteOrder (13)
- /// <summary>
- /// 手续费
- /// </summary>
- private decimal _charge;
- /// <summary>
- /// 成交日期
- /// </summary>
- private DateTime _completeDate;
-
- /// <summary>
- /// 数量
- /// </summary>
- private decimal _lot;
- /// <summary>
- /// 成交方向买卖
- /// </summary>
- private Direction _completeDirection;
- /// <summary>
- /// 成交价
- /// </summary>
- private decimal _completePrice;
- /// <summary>
- ///成交 订单号
- /// </summary>
- private long _tradeId;
- /// <summary>
- /// 平仓盈亏
- /// </summary>
- private decimal _closePL;
- /// <summary>
- /// 市场名称
- /// </summary>
- private string _marketName;
- /// <summary>
- /// 成交金额
- /// </summary>
- private decimal _tradeAmount;
- /// <summary>
- /// 委托单号
- /// </summary>
- private long _orderID;
-
-
- /// <summary>
- /// 订单类型
- /// </summary>
- private eOrderType _entrustOrderType;
- #endregion Members of CompleteOrder (13)
- #region Properties of CompleteOrder (20)
- /// <summary>
- /// 资金账户
- /// </summary>
- [PropertyDisc("AccountID")]
- public ulong AccountId { get; set; }
- /// <summary>
- /// 获取或设置 成交日期
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- [PropertyDisc("TradeTime")]
- public DateTime CompleteDate
- {
- get { return _completeDate; }
- set { Set(() => CompleteDate, ref _completeDate, value); }
- }
- /// <summary>
- /// 买卖(报表使用)
- /// </summary>
- public string CompleteDirectionString { get; set; }
-
- /// <summary>
- /// 显示成交日期
- /// </summary>
- public string DisplayCompleteDate
- {
- get
- {
- return _completeDate.ToString("yyyy-MM-dd HH:mm:ss");
- }
- }
- /// <summary>
- /// 建平
- /// </summary>
- [PropertyDisc("ChannelBuildType")]
- public eChannelBuildType BuildType { get; set; }
- public string BuildTypeDisplay
- {
- get { return BuildType.Discription(); }
- }
- /// <summary>
- /// 获取或设置 成交价
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- [PropertyDisc("TradePrice")]
- public decimal CompletePrice
- {
- get { return _completePrice; }
- set { Set(() => CompletePrice, ref _completePrice, value); }
- }
- public string DisplayCompletePrice
- {
- get { return CompletePrice.ToString(PriceExpFormat); }
- }
- /// <summary>
- /// Sets and 数量
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- [PropertyDisc("TradeQty")]
- public decimal Lot
- {
- get { return _lot; }
- set { Set(() => Lot, ref _lot, value); }
- }
- /// <summary>
- /// 成交金额
- /// </summary>
- [PropertyDisc("TradeAmount")]
- public decimal TradeAmount
- {
- get { return _tradeAmount; }
- set { Set(() => TradeAmount, ref _tradeAmount, value); }
- }
- /// <summary>
- /// 委托单号
- /// </summary>
- [PropertyDisc("OrderID")]
- public long OrderId
- {
- get { return _orderID; }
- set { Set(() => OrderId, ref _orderID, value); }
- }
- /// <summary>
- /// 需求需要将long显示为-- 哦mgd
- /// </summary>
- private string _OrderID;
- public string OrderID
- {
- get { return OrderId == 0 ? "--" : Convert.ToString(OrderId); }
- set
- {
- Set(() => OrderID, ref _OrderID, value);
- }
- }
- /// <summary>
- /// 获取或设置 订单号.
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- [PropertyDisc("TradeID")]
- public long TradeId
- {
- get { return _tradeId; }
- set { Set(() => TradeId, ref _tradeId, value); }
- }
- /// <summary>
- /// 需求要我把long的0变为 --
- /// </summary>
- private string _tradeID;
- public string TradeID
- {
- get
- {
- return TradeId == 0 ? "--" : Convert.ToString(TradeId);
- }
- set
- {
- Set(() => TradeID, ref _tradeID, value);
- }
- }
- /// <summary>
- /// 获取或设置 手续费
- /// Changes to that property's value raise the PropertyChanged event.
- /// </summary>
- public decimal Charge { get { return OpenCharge + CloseCharge; } }
- [PropertyDisc("OpenCharge")]
- public decimal OpenCharge { get; set; }
- [PropertyDisc("CloseCharge")]
- public decimal CloseCharge { get; set; }
- /// <summary>
- /// 占用保证金
- /// </summary>
- [PropertyDisc("UsedMargin")]
- public decimal UsedMargin { get; set; }
- /// <summary>
- /// 占用保证金[固定保留两位]
- /// </summary>
- public string UsedMarginDisplay
- {
- get
- {
- return UsedMargin.ToString("f2");
- }
- }
-
-
- /// <summary>
- /// 市场名称
- /// </summary>
- public string MarketName
- {
- get { return _marketName; }
- set { Set(() => MarketName, ref _marketName, value); }
- }
-
- /// <summary>
- /// 订单类型
- /// </summary>
- [PropertyDisc("OrderType")]
- public eOrderType EntrustOrderType
- {
- get { return _entrustOrderType; }
- set { Set(() => EntrustOrderType, ref _entrustOrderType, value); }
- }
- /// <summary>
- /// 订单类型
- /// </summary>
- public string OrderTypeDisc
- {
- get { return EntrustOrderType.Discription(); }
- }
- /// <summary>
- /// 开平(报表使用)
- /// </summary>
- public string OrderEnumString { get; set; }
-
-
- /// <summary>
- /// 操作类型
- /// </summary>
- [PropertyDisc("Operatetype")]
- public eOrderOperateType Operatetype { get; set; }
-
- /// <summary>
- /// 显示成交方向
- /// </summary>
- public string StrOpenDirection
- {
- get
- {
- return Direction.Discription();
- }
- }
- public string StrOrderTypeDirection
- {
- get
- {
- return this.EntrustOrderType.Discription();
- }
- }
- /// <summary>
- /// 所属机构
- /// </summary>
- [PropertyDisc("AreaName")]
- public string AreaName { get; set; }
- /// <summary>
- /// 显示到表单中操作类型
- /// </summary>
- public string OrderOperateDisplay
- {
- get
- {
- return Operatetype.Discription();
- }
- }
-
- #endregion Properties of CompleteOrder (20)
- public object Clone()
- {
- return this.MemberwiseClone();
- }
- }
- }
|