コード例 #1
0
 public TradeMediumRisk(LineTradeDTO _lineTrade)
 {
     this.Value           = _lineTrade.Value;
     this.ClientSector    = _lineTrade.ClientSector;
     this.NextPaymentDate = _lineTrade.NextPaymentDate;
     this.ReferenceDate   = _lineTrade.ReferenceDate;
 }
コード例 #2
0
 public ITrade GetObjectTrade(LineTradeDTO trade)
 {
     if (trade.Value > 1000000 && trade.ClientSector.ToUpper() == "PUBLIC")
     {
         return(new TradeMediumRisk(trade));
     }
     else if (trade.Value > 1000000 && trade.ClientSector.ToUpper() == "PRIVATE")
     {
         return(new TradeHighRisk(trade));
     }
     return(new TradeDefaulted(trade));
 }