| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- Public Class FondosDeInversionCE
- Private _ValorNominal As Double
- Private _CuotasDeParticipacion As Double
- Private _ValorDeParticipacion As Double
- Private _PorcentajeComisionCasa As Double
- Private _ComisionCasa As Double
- Private _PorcentajeComisionBolsa As Double
- Private _ComisionBolsa As Double
- Private _ValorTransado As Double
- Private _FechaOperacion As Date
- Private _FechaLiquidacion As Date
- Private _FechaVencimiento As Date
- Private _RendimientoOfrecido As Double
- Private _Periodicidad As String
- Private _AnioBase As Integer
- Private _Plazo As Integer
- Private _Dividendo As Double
- Public FondoInversionDAO = New FondoInversionDAO
- Dim Operaciones As New Operaciones
- Public Property ValorNominal As Double
- Get
- Return _ValorNominal
- End Get
- Set(value As Double)
- _ValorNominal = value
- CalcularValorTransado()
- End Set
- End Property
- Public Property CuotasDeParticipacion As Double
- Get
- Return _CuotasDeParticipacion
- End Get
- Set(value As Double)
- _CuotasDeParticipacion = value
- CalcularValorNominal()
- End Set
- End Property
- Public Property ValorDeParticipacion As Double
- Get
- Return _ValorDeParticipacion
- End Get
- Set(value As Double)
- _ValorDeParticipacion = value
- CalcularValorNominal()
- End Set
- End Property
- Public Property PorcentajeComisionCasa As Double
- Get
- Return _PorcentajeComisionCasa
- End Get
- Set(value As Double)
- _PorcentajeComisionCasa = value
- End Set
- End Property
- Public Property ComisionCasa As Double
- Get
- Return _ComisionCasa
- End Get
- Set(value As Double)
- _ComisionCasa = value
- CalcularValorTransado()
- End Set
- End Property
- Public Property PorcentajeComisionBolsa As Double
- Get
- Return _PorcentajeComisionBolsa
- End Get
- Set(value As Double)
- _PorcentajeComisionBolsa = value
- End Set
- End Property
- Public Property ComisionBolsa As Double
- Get
- Return _ComisionBolsa
- End Get
- Set(value As Double)
- _ComisionBolsa = value
- CalcularValorTransado()
- End Set
- End Property
- Public Property ValorTransado As Double
- Get
- Return _ValorTransado
- End Get
- Set(value As Double)
- _ValorTransado = value
- End Set
- End Property
- Public Property FechaOperacion As Date
- Get
- Return _FechaOperacion
- End Get
- Set(value As Date)
- _FechaOperacion = value
- End Set
- End Property
- Public Property FechaLiquidacion As Date
- Get
- Return _FechaLiquidacion
- End Get
- Set(value As Date)
- _FechaLiquidacion = value
- End Set
- End Property
- Public Property FechaVencimiento As Date
- Get
- Return _FechaVencimiento
- End Get
- Set(value As Date)
- _FechaVencimiento = value
- End Set
- End Property
- Public Property RendimientoOfrecido As Double
- Get
- Return _RendimientoOfrecido
- End Get
- Set(value As Double)
- _RendimientoOfrecido = value
- End Set
- End Property
- Public Property Periodicidad As String
- Get
- Return _Periodicidad
- End Get
- Set(value As String)
- _Periodicidad = value
- End Set
- End Property
- Public Property AnioBase As Integer
- Get
- Return _AnioBase
- End Get
- Set(value As Integer)
- _AnioBase = value
- End Set
- End Property
- Public Property Plazo As Integer
- Get
- Return _Plazo
- End Get
- Set(value As Integer)
- _Plazo = value
- End Set
- End Property
- Public Property Dividendo As Double
- Get
- Return _Dividendo
- End Get
- Set(value As Double)
- _Dividendo = value
- End Set
- End Property
- Sub New()
- ValorNominal = 0
- CuotasDeParticipacion = 0
- ValorDeParticipacion = 0
- PorcentajeComisionCasa = 0
- ComisionCasa = 0
- PorcentajeComisionBolsa = 0
- ComisionBolsa = 0
- ValorTransado = 0
- FechaOperacion = Date.Now.Date
- FechaLiquidacion = Date.Now.Date
- FechaVencimiento = Date.Now.Date
- RendimientoOfrecido = 0
- Periodicidad = ""
- AnioBase = 365
- Plazo = 0
- Dividendo = 0
- End Sub
- Public Sub CalcularValorNominal()
- Dim valor As Double
- Dim vCuotasParticipacion As Double = CuotasDeParticipacion
- Dim vValorDeParticipacion As Double = ValorDeParticipacion
- Try
- valor = vCuotasParticipacion * vValorDeParticipacion
- Catch ex As Exception
- valor = 0
- End Try
- ValorNominal = valor
- End Sub
- Public Sub CalcularValorTransado()
- Dim valor As Double
- Dim vValorNominal As Double = ValorNominal
- Dim vComisionCasa As Double = ComisionCasa
- Dim vComisionBolsa As Double = ComisionBolsa
- Try
- valor = vValorNominal + vComisionCasa + vComisionBolsa
- Catch ex As Exception
- valor = 0
- End Try
- ValorTransado = valor
- End Sub
- Public Function CalculoValorNominal(ByVal CuotasParticipacion As Double, ByVal ValorParticipacion As Double)
- Dim Total = CuotasParticipacion * ValorParticipacion
- Return Total
- End Function
- Public Function CalculoFechaLiq(ByVal FechaOperaciones As String, ByVal Dias As Integer)
- Dim FechaLiquidacion As Date = Operaciones.ConvertirFecha(FechaOperaciones)
- Dim fecha As Date = FechaLiquidacion.AddDays(Dias)
- Return fecha
- End Function
- End Class
|