//表示调用了(nUserId,nProgramId,dtCardValid,nPcIndex,0) 这个参数形式的构造函数 :this()
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
Code
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
public Consume( Int32 nUserId, Int32 nProgramId, DateTime dtCardValid, Int32 nPcIndex ):this(nUserId,nProgramId,dtCardValid,nPcIndex,0)
{
}
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
public Consume( Int32 nUserId, Int32 nProgramId, DateTime dtCardValid, Int32 nPcIndex, Int32 nMsId )
{
this.uda = (new User()).GetDetail(nUserId);
this.pda = (new Program()).GetDetail(nProgramId);
if (this.uda != null)
(new User()).GetUserPermit(ref this.uda);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
this.CardValid = DateTime.Parse(dtCardValid.ToShortDateString() + " 23:59:59");
this.pcIndex = nPcIndex;
this.MediaType = this.pda.PMediaKind;
this.MsId = nMsId;
}
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
属性定义:
private int _id;
public int ID
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
{
get
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
return _id;
}
set
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
_id = value;
}
}