using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//----------------------------------------------------------------
//Module Name: $safeprojectname$
//Purpose:
//CopyRight: Muchinfo
//History:
//----------------------------------------------------------------
//DateTime 2016/6/20 17:08:19
//Author
//Description Create
//----------------------------------------------------------------
using Muchinfo.MTPClient.Data.Enums;
using Muchinfo.MTPClient.Data.Helper;
namespace Muchinfo.MTPClient.Data.Model.Sale
{
///
/// 配号中签
///
public class DistributeBallot
{
///
/// 委托单号
///
[PropertyDisc("OrderId")]
public long OrderId { get; set; }
///
/// 委托时间
///
[PropertyDisc("ordertime")]
public DateTime OrderTime { get; set; }
public string OrderTimeDisplay
{
get
{
if (OrderTime == DateTime.MinValue)
{
return "-";
}
return OrderTime.ToString("yyyy-MM-dd HH:mm:ss");
}
}
///
/// 委托数量
///
[PropertyDisc("orderqty")]
public decimal OrderQty { get; set; }
///
/// 买卖方向
///
[PropertyDisc("BUYORSELL")]
public Direction Direction { get; set; }
///
/// 摇号日期
///
[PropertyDisc("LOTTERYDATE")]
public DateTime LotteryDate
{
get;
set;
}
///
/// 商品名称
///
[PropertyDisc("GOODSNAME")]
public string GoodsName { get; set; }
///
/// 商品代码
///
[PropertyDisc("GOODSCODE")]
public string GoodsCode { get; set; }
///
/// 配号数量
///
[PropertyDisc("distributecount")]
public decimal DistributeCount { get; set; }
///
/// 配号号码
///
[PropertyDisc("distributestartno")]
public string DistributestartNo { get; set; }
///
/// 中签数量【废弃不用】
///
[PropertyDisc("WINQTY")]
public decimal WinQty { get; set; }
///
/// 中签尾号
///
[PropertyDisc("WINTAILNO")]
public string WINTAILNO { get; set; }
///
/// 状态
///
[PropertyDisc("STATUS")]
public int Status { get; set; }
///
/// 等待配号数量
///
[PropertyDisc("WAITDISTRIBUTEQTY")]
public int WAITDISTRIBUTEQTY { get; set; }
///
/// 概率
///
[PropertyDisc("Winrate")]
public double Winrate { get; set; }
///
/// 商品ID
///
[PropertyDisc("Goodsid")]
public int Goodsid { get; set; }
///
/// 中签数量【Table=>IM_OrderDetail】
///
[PropertyDisc("publicissuetradeqty")]
public decimal publicissuetradeqty { get; set; }
public string DirectionDisplay
{
get
{
return Direction.Discription();
}
}
public string LotteryDateDisplay
{
get
{
if (LotteryDate != null && LotteryDate!=DateTime.MinValue)
{
return LotteryDate.ToString("yyyy-MM-dd HH:mm:ss");
}
return "-";
}
}
public string WinTailNODisplay
{
get
{
if (!string.IsNullOrEmpty(WINTAILNO))
{
return WINTAILNO;
}
return "-";
}
}
public string WinQtyDisplay
{
get
{
if (Winrate >= 1 || Winrate < 0)
{
//"全部中签";
return Muchinfo.MTPClient.Resources.Client_Resource.Models_AllWin;
}
else if (!string.IsNullOrEmpty(WinQty.ToString()))
{
return WinQty.ToString();
}
return "-";
}
}
///
/// 中签数量
///
public string publicissuetradeqtyDisplay
{
get
{
if (Winrate >= 1 || Winrate < 0)
{
//"全部中签";
return Muchinfo.MTPClient.Resources.Client_Resource.Models_AllWin;
}
else if ( publicissuetradeqty>0 )
{
return publicissuetradeqty.ToString();
}
return "-";
}
}
}
}