Procházet zdrojové kódy

Mejoramiento de las validaciones y orden del codigo

ahernandez před 6 roky
rodič
revize
bf4b313670
83 změnil soubory, kde provedl 2245 přidání a 13256 odebrání
  1. 1 0
      App.config
  2. 49 259
      DAO/AccionesDAO.vb
  3. 9 948
      DAO/BonosDAO.vb
  4. 0 5
      DAO/CambiarEstArbDAO.vb
  5. 154 502
      DAO/CertificadosDeInversionDAO.vb
  6. 0 13
      DAO/ColaDAO.vb
  7. 122 742
      DAO/DAOGeneral.vb
  8. 48 471
      DAO/DAONotaEstructurada.vb
  9. 15 315
      DAO/DAOPropuestaInversion.vb
  10. 49 475
      DAO/DepositosAPlazoDAO.vb
  11. 0 260
      DAO/FondoInversionDAO.vb
  12. 91 114
      DAO/FuturosDAO.vb
  13. 2 161
      DAO/InversionDAO.vb
  14. 131 422
      DAO/LETESDAO.vb
  15. 33 231
      DAO/PrestamoEmpresarialDAO.vb
  16. 47 360
      DAO/PrestamoPersonalDAO.vb
  17. 0 235
      DAO/RegistrosDAO.vb
  18. 28 533
      DAO/ReportosDAO.vb
  19. 0 30
      DAO/SeriesDAO.vb
  20. 71 91
      DAO/TitularizacionDAO.vb
  21. 6 6
      DAO/frmRendimientos.vb
  22. 5 104
      ENTI/AccionesCE.vb
  23. 9 204
      ENTI/BonosCE.vb
  24. 3 21
      ENTI/CEPropuestaInversion.vb
  25. 3 32
      ENTI/DepositosAPlazoCE.vb
  26. 3 105
      ENTI/FondosDeInversionCE.vb
  27. 0 132
      ENTI/FormulasBonoCE.vb
  28. 3 54
      ENTI/FuturosCE.vb
  29. 3 24
      ENTI/IngresoDetalleCE.vb
  30. 6 68
      ENTI/InversionesCE.vb
  31. 3 32
      ENTI/LETESCE.vb
  32. 1 33
      ENTI/NotaEstructuradaCE.vb
  33. 0 200
      ENTI/Operaciones.vb
  34. 1 8
      ENTI/RegistroIngresoCE.vb
  35. 0 685
      ENTI/ReportosCE.vb
  36. 0 32
      ENTI/SeriesCE.vb
  37. 0 69
      ENTI/zAccionesDetalleCE.vb
  38. 20 514
      FRM/frmAcciones.vb
  39. 0 4
      FRM/frmBuscarReporteVenta.vb
  40. 0 1
      FRM/frmCertificadosDeInversion.Designer.vb
  41. 18 17
      FRM/frmCertificadosDeInversion.resx
  42. 30 413
      FRM/frmCertificadosDeInversion.vb
  43. 1 1
      FRM/frmColaTitulos.Designer.vb
  44. 17 18
      FRM/frmDepositosAPlazo.resx
  45. 26 187
      FRM/frmDepositosAPlazo.vb
  46. 0 4
      FRM/frmDetallesPortafolioGeneralRendimiento.vb
  47. 6 121
      FRM/frmFOIN.vb
  48. 0 1
      FRM/frmFlujoArbitraje.Designer.vb
  49. 0 35
      FRM/frmFuturos.vb
  50. 19 257
      FRM/frmLetes.vb
  51. 0 1
      FRM/frmMenuCostos.Designer.vb
  52. 21 201
      FRM/frmNotaEstructurada.vb
  53. 6 130
      FRM/frmPrestamoEmpresariales.vb
  54. 6 74
      FRM/frmPrestamoPersonal.vb
  55. 191 195
      FRM/frmPrincipalInicio.Designer.vb
  56. 2 5
      FRM/frmPrincipalInicio.vb
  57. 0 91
      FRM/frmRendimientoFiltro.vb
  58. 22 1285
      FRM/frmReporto.vb
  59. 12 13
      FRM/frmReportoArbitraje.Designer.vb
  60. 9 108
      FRM/frmResultadoTitularizacion.vb
  61. 1 16
      FRM/frmSeleccionTitulosReportos.vb
  62. binární
      Resources/Anexar.png
  63. binární
      Resources/Aprobado.png
  64. binární
      Resources/Aprobado2.png
  65. binární
      Resources/Busqueda.png
  66. binární
      Resources/Corregir.png
  67. binární
      Resources/Modificar.png
  68. binární
      Resources/Rechazado.png
  69. binární
      Resources/Revisión.png
  70. 2 13
      frmBuscarDeLista.vb
  71. 359 441
      frmINV.Designer.vb
  72. 1 1
      frmINV.resx
  73. 24 129
      frmINV.vb
  74. 1 7
      frmImprimir.vb
  75. 1 8
      frmIngresosConsulta.vb
  76. 9 28
      frmInicio.vb
  77. 326 411
      frmPIN.designer.vb
  78. 24 18
      frmPIN.resx
  79. 78 415
      frmPIN.vb
  80. 106 100
      frmPrincipal.Designer.vb
  81. 9 12
      frmPrincipal.resx
  82. 1 2
      frmPrincipal.vb
  83. 1 3
      frmReqPago.vb

+ 1 - 0
App.config

@@ -17,6 +17,7 @@
         <add name="Inversiones.My.MySettings.cnInversiones" connectionString="Data Source=INVSVSAP;Initial Catalog=InversionesDEV;Persist Security Info=True;User ID=ahernandez;Password=1234"
             providerName="System.Data.SqlClient" />
     </connectionStrings>
+  
     <startup>
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
     </startup>

+ 49 - 259
DAO/AccionesDAO.vb

@@ -1,4 +1,5 @@
 Imports System.Data.SqlClient
+
 Public Class AccionesDAO
     Private Operaciones As New Operaciones
     Public Function ProcesoDatos(ByVal Coleccion As Collection, ByVal Codigo As String, ByVal Diccionario As Dictionary(Of String, Collection), ByVal Estado As String)
@@ -13,11 +14,7 @@ Public Class AccionesDAO
         End If
         myTrans = cn.BeginTransaction()
         Try
-
-
             If Estado = "Nuevo" Then
-
-
                 sql = "INSERT INTO [dbo].[ACC0]
            ([CodInv]
            ,[PrecioLimpioC]
@@ -1160,52 +1157,23 @@ Public Class AccionesDAO
 
                 oAcciones.CodigoInversion = vCodigoInversion
                 'COMPRA
-                oAcciones.AccionPreferente = drd.Item("OpPrefC").ToString
-                oAcciones.OperacionEnBolsa = drd.Item("OpBolsaC").ToString
-
-                If String.IsNullOrEmpty(drd.Item("PrecioLimpioC").ToString) Then
-                    oAcciones.PrecioLimpioCompra = 0
-                Else
-                    oAcciones.PrecioLimpioCompra = drd.Item("PrecioLimpioC").ToString
-
-                End If
-
-                If String.IsNullOrEmpty(drd.Item("UnC").ToString) Then
-                    oAcciones.CantidadCompra = 0
-                Else
-                    oAcciones.CantidadCompra = drd.Item("UnC").ToString
-                End If
-
-                If String.IsNullOrEmpty(drd.Item("FOperC").ToString) Then
-                    oAcciones.FechaOperacionCompra = Date.Now.Date
-                Else
-                    oAcciones.FechaOperacionCompra = drd.Item("FOperC").ToString
-                End If
-                If String.IsNullOrEmpty(drd.Item("FVenC").ToString) Then
-                    oAcciones.FechaVencimientoCompra = Date.Now.Date
-                Else
-
-                    oAcciones.FechaVencimientoCompra = drd.Item("FVenC").ToString
-                End If
+                oAcciones.AccionPreferente = Operaciones.ConvertirDecimal(drd.Item("OpPrefC").ToString)
+                oAcciones.OperacionEnBolsa = Operaciones.ConvertirDecimal(drd.Item("OpBolsaC").ToString)
+                oAcciones.PrecioLimpioCompra = Operaciones.ConvertirDecimal(drd.Item("PrecioLimpioC").ToString)
+                oAcciones.CantidadCompra = Operaciones.ConvertirEntero(drd.Item("UnC").ToString)
+                oAcciones.FechaOperacionCompra = Operaciones.ConvertirFecha(drd.Item("FOperC").ToString)
+                oAcciones.FechaVencimientoCompra = Operaciones.ConvertirFecha(drd.Item("FVenC").ToString)
+                oAcciones.RetornoBruto = Operaciones.ConvertirDecimal(drd.Item("RetAnBrC").ToString)
 
 
 
 
-                If String.IsNullOrEmpty(drd.Item("RetAnBrC").ToString) Then
-                    oAcciones.RetornoBruto = 0
-                Else
-                    oAcciones.RetornoBruto = drd.Item("RetAnBrC").ToString
-                End If
-
-
-
                 If drd.Item("IOF").ToString Then
                     oAcciones.IOF = True
                 Else
                     oAcciones.IOF = False
                 End If
 
-
                 If drd.Item("Renta").ToString Then
                     oAcciones.Renta = True
                 Else
@@ -1219,227 +1187,49 @@ Public Class AccionesDAO
 
 
 
-                If IsNumeric(drd.Item("GCapTotC")) Then
-                    oAcciones.GananciaDeCapitalTotalCompra = drd.Item("GCapTotC")
-                Else
-                    oAcciones.GananciaDeCapitalTotalCompra = 0
-                End If
-                If IsNumeric(drd.Item("GCapUnC")) Then
-                    oAcciones.GananciaDeCapitalUnitarioCompra = drd.Item("GCapUnC")
-                Else
-                    oAcciones.GananciaDeCapitalUnitarioCompra = 0
-                End If
-                If IsNumeric(drd.Item("RetAnBrC")) Then
-                    oAcciones.RetornoAnualizadoBrutoCompra = drd.Item("RetAnBrC")
-                Else
-                    oAcciones.RetornoAnualizadoBrutoCompra = 0
-                End If
-                If IsNumeric(drd.Item("RetAnNetC")) Then
-                    oAcciones.RetornoAnualizadoNetoCompra = drd.Item("RetAnNetC")
-                Else
-                    oAcciones.RetornoAnualizadoNetoCompra = 0
-                End If
-                If IsNumeric(drd.Item("FactDiv")) Then
-                    oAcciones.FactorDeDividendo = drd.Item("FactDiv")
-                Else
-                    oAcciones.FactorDeDividendo = 0
-                End If
-
 
+                oAcciones.GananciaDeCapitalTotalCompra = Operaciones.ConvertirDecimal(drd.Item("GCapTotC").ToString)
+                oAcciones.GananciaDeCapitalUnitarioCompra = Operaciones.ConvertirDecimal(drd.Item("GCapUnC").ToString)
+                oAcciones.RetornoAnualizadoBrutoCompra = Operaciones.ConvertirDecimal(drd.Item("RetAnBrC").ToString)
+                oAcciones.RetornoAnualizadoNetoCompra = Operaciones.ConvertirDecimal(drd.Item("RetAnNetC").ToString)
+                oAcciones.FactorDeDividendo = Operaciones.ConvertirDecimal(drd.Item("FactDiv").ToString)
+                oAcciones.GananciaDeCapitalTotalVentasus = Operaciones.ConvertirDecimal(drd.Item("GCapTotV").ToString)
+                oAcciones.GananciaDeCapitalUnitarioVenta = Operaciones.ConvertirDecimal(drd.Item("GCapUnV").ToString)
+                oAcciones.RetornoAnualizadoBrutoVentasus = Operaciones.ConvertirDecimal(drd.Item("RetAnBrV").ToString)
+                oAcciones.RetornoAnualizadoNetoVenta = Operaciones.ConvertirDecimal(drd.Item("RetAnNetV").ToString)
 
 
-                If IsNumeric(drd.Item("GCapTotV")) Then
-                    oAcciones.GananciaDeCapitalTotalVentasus = drd.Item("GCapTotV")
-                Else
-                    oAcciones.GananciaDeCapitalTotalVentasus = 0
-                End If
-                If IsNumeric(drd.Item("GCapUnV")) Then
-                    oAcciones.GananciaDeCapitalUnitarioVenta = drd.Item("GCapUnV")
-                Else
-                    oAcciones.GananciaDeCapitalUnitarioVenta = 0
-                End If
-                If IsNumeric(drd.Item("RetAnBrV")) Then
-                    oAcciones.RetornoAnualizadoBrutoVentasus = drd.Item("RetAnBrV")
-                Else
-                    oAcciones.RetornoAnualizadoBrutoVentasus = 0
-                End If
-                If IsNumeric(drd.Item("RetAnNetV")) Then
-                    oAcciones.RetornoAnualizadoNetoVenta = drd.Item("RetAnNetV")
-                Else
-                    oAcciones.RetornoAnualizadoNetoVenta = 0
-                End If
-
                 'VENTA
-                If String.IsNullOrEmpty(drd.Item("PrecioLimpioV").ToString) Then
-                    oAcciones.PrecioLimpioVenta = 0
-                Else
-                    oAcciones.PrecioLimpioVenta = drd.Item("PrecioLimpioV").ToString
-                End If
-
-                If String.IsNullOrEmpty(drd.Item("PrecSucioC").ToString) Then
-                    oAcciones.PrecioSucioCompra = 0
-                Else
-                    oAcciones.PrecioSucioCompra = drd.Item("PrecSucioC").ToString
-                End If
-
-                If String.IsNullOrEmpty(drd.Item("PrecSucioV").ToString) Then
-                    oAcciones.PrecioSucioVentasus = 0
-                Else
-                    oAcciones.PrecioSucioVentasus = drd.Item("PrecSucioV").ToString
-                End If
-
-                If String.IsNullOrEmpty(drd.Item("FOperV").ToString) Then
-                    oAcciones.FechaOperacionVenta = Date.Now.Date
-                Else
-                    oAcciones.FechaOperacionVenta = drd.Item("FOperV").ToString
-                End If
-                If String.IsNullOrEmpty(drd.Item("FVenV").ToString) Then
-                    oAcciones.FechaVencimientoVenta = Date.Now.Date
-                Else
-
-                    oAcciones.FechaVencimientoVenta = drd.Item("FVenV").ToString
-                End If
-
-
-
-
-
-
-                If String.IsNullOrEmpty(drd.Item("UnV").ToString) Then
-                    oAcciones.CantidadVenta = 0
-                Else
-                    oAcciones.CantidadVenta = drd.Item("UnV").ToString
-                End If
-
-
-
-            End If
-
-            If String.IsNullOrEmpty(drd.Item("Tipo").ToString) Then
-                oAcciones.Tipo = 0
-            Else
-
-                oAcciones.Tipo = drd.Item("Tipo").ToString
-
-            End If
-
-
-            If String.IsNullOrEmpty(drd.Item("DiasTC").ToString) Then
-
-                oAcciones.DiasDeTenenciaCompra = 0
-            Else
-                oAcciones.DiasDeTenenciaCompra = drd.Item("DiasTC").ToString
-            End If
-
-            If String.IsNullOrEmpty(drd.Item("DiasTV").ToString) Then
-
-                oAcciones.DiasDeTenenciaVenta = 0
-            Else
-                oAcciones.DiasDeTenenciaVenta = drd.Item("DiasTV").ToString
-            End If
-
-
-            If String.IsNullOrEmpty(drd.Item("ValTransC")) Then
-                oAcciones.ValorTransadoCompra = 0
-
-            Else
-                oAcciones.ValorTransadoCompra = drd.Item("ValTransC")
-            End If
-            If String.IsNullOrEmpty(drd.Item("ValTransV")) Then
-                oAcciones.ValorTransadoVenta = 0
-
-            Else
-                oAcciones.ValorTransadoVenta = drd.Item("ValTransV")
-            End If
-            If String.IsNullOrEmpty(drd.Item("MontoNetoC").ToString) Then
-                oAcciones.MontoNetoComprasus = 0
-            Else
-                oAcciones.MontoNetoComprasus = drd.Item("MontoNetoC")
-            End If
-
-            If String.IsNullOrEmpty(drd.Item("MontoNetoV").ToString) Then
-                oAcciones.MontoNetoVentasus = 0
-            Else
-                oAcciones.MontoNetoVentasus = drd.Item("MontoNetoV")
-            End If
-
 
+                oAcciones.PrecioLimpioVenta = Operaciones.ConvertirDecimal(drd.Item("PrecioLimpioV").ToString)
+                oAcciones.PrecioSucioCompra = Operaciones.ConvertirDecimal(drd.Item("PrecSucioC").ToString)
+                oAcciones.PrecioSucioVentasus = Operaciones.ConvertirDecimal(drd.Item("PrecSucioV").ToString)
+                oAcciones.FechaOperacionVenta = Operaciones.ConvertirFecha(drd.Item("FOperV").ToString)
+                oAcciones.FechaVencimientoVenta = Operaciones.ConvertirFecha(drd.Item("FVenV").ToString)
+                oAcciones.CantidadVenta = Operaciones.ConvertirEntero(drd.Item("UnV").ToString)
 
 
 
 
-
-
-            If (String.IsNullOrEmpty(drd.Item("ComisionCompraCasaValor").ToString)) Then
-                oAcciones.ComisionCompraCasa = 0
-            Else
-                oAcciones.ComisionCompraCasa = drd.Item("ComisionCompraCasaValor").ToString
             End If
 
 
-            If (String.IsNullOrEmpty(drd.Item("ComisionCompraBolsaValor").ToString)) Then
-                oAcciones.ComisionCompraBolsa = 0
-            Else
-                oAcciones.ComisionCompraBolsa = drd.Item("ComisionCompraBolsaValor").ToString
-            End If
-
-
-
-            If (String.IsNullOrEmpty(drd.Item("ComisionVentaCasaValor").ToString)) Then
-                oAcciones.ComisionVentaCasa = 0
-            Else
-                oAcciones.ComisionVentaCasa = drd.Item("ComisionVentaCasaValor").ToString
-            End If
-
-
-
-            If (String.IsNullOrEmpty(drd.Item("ComisionVentaBolsaValor").ToString)) Then
-                oAcciones.ComisionVentaBolsa = 0
-            Else
-                oAcciones.ComisionVentaBolsa = drd.Item("ComisionVentaBolsaValor").ToString
-            End If
-
-
-
-
-
-
-
-            If (String.IsNullOrEmpty(drd.Item("ComisionCompraCasa").ToString)) Then
-                oAcciones.ComisionPorcentajeCompraCasa = 0
-            Else
-                oAcciones.ComisionPorcentajeCompraCasa = drd.Item("ComisionCompraCasa").ToString
-            End If
-
-
-            If (String.IsNullOrEmpty(drd.Item("ComisionCompraBolsa").ToString)) Then
-                oAcciones.ComisionPorcentajeCompraBolsa = 0
-            Else
-                oAcciones.ComisionPorcentajeCompraBolsa = drd.Item("ComisionCompraBolsa").ToString
-            End If
-
-
-
-            If (String.IsNullOrEmpty(drd.Item("ComisionVentaCasa").ToString)) Then
-                oAcciones.ComisionPorcentajeVentaCasa = 0
-            Else
-                oAcciones.ComisionPorcentajeVentaCasa = drd.Item("ComisionVentaCasa").ToString
-            End If
-
-
-
-            If (String.IsNullOrEmpty(drd.Item("ComisionVentaBolsa").ToString)) Then
-                oAcciones.ComisionPorcentajeVentaBolsa = 0
-            Else
-                oAcciones.ComisionPorcentajeVentaBolsa = drd.Item("ComisionVentaBolsa").ToString
-            End If
-
-
-
-
-
-
 
+            oAcciones.Tipo = Operaciones.ConvertirEntero(drd.Item("Tipo").ToString)
+            oAcciones.DiasDeTenenciaCompra = Operaciones.ConvertirEntero(drd.Item("DiasTC").ToString)
+            oAcciones.DiasDeTenenciaVenta = Operaciones.ConvertirEntero(drd.Item("DiasTV").ToString)
+            oAcciones.ValorTransadoCompra = Operaciones.ConvertirDecimal(drd.Item("ValTransC").ToString)
+            oAcciones.ValorTransadoVenta = Operaciones.ConvertirDecimal(drd.Item("ValTransV").ToString)
+            oAcciones.MontoNetoComprasus = Operaciones.ConvertirDecimal(drd.Item("MontoNetoC").ToString)
+            oAcciones.MontoNetoVentasus = Operaciones.ConvertirDecimal(drd.Item("MontoNetoV").ToString)
+            oAcciones.ComisionCompraCasa = Operaciones.ConvertirDecimal(drd.Item("ComisionCompraCasaValor").ToString)
+            oAcciones.ComisionCompraBolsa = Operaciones.ConvertirDecimal(drd.Item("ComisionCompraBolsaValor").ToString)
+            oAcciones.ComisionVentaCasa = Operaciones.ConvertirDecimal(drd.Item("ComisionVentaCasaValor").ToString)
+            oAcciones.ComisionVentaBolsa = Operaciones.ConvertirDecimal(drd.Item("ComisionVentaBolsaValor").ToString)
+            oAcciones.ComisionPorcentajeCompraCasa = Operaciones.ConvertirDecimal(drd.Item("ComisionCompraCasa").ToString)
+            oAcciones.ComisionPorcentajeCompraBolsa = Operaciones.ConvertirDecimal(drd.Item("ComisionCompraBolsa").ToString)
+            oAcciones.ComisionPorcentajeVentaCasa = Operaciones.ConvertirDecimal(drd.Item("ComisionVentaCasa").ToString)
+            oAcciones.ComisionPorcentajeVentaBolsa = Operaciones.ConvertirDecimal(drd.Item("ComisionVentaBolsa").ToString)
 
             drd.Close()
 
@@ -1555,13 +1345,13 @@ Public Class AccionesDAO
            ,@IngresoNeto)"
                 cmd.CommandText = sql
                 cmd.Parameters.AddWithValue("@CodInv", CodInversion)
-                cmd.Parameters.AddWithValue("@Fecha", dr("Fecha"))
-                cmd.Parameters.AddWithValue("@Dividendo", dr("Dividendo"))
-                cmd.Parameters.AddWithValue("@CantidadBase", dr("CantidadBase"))
-                cmd.Parameters.AddWithValue("@IngresoBruto", dr("IngresoBruto"))
-                cmd.Parameters.AddWithValue("@PorcISR", dr("PorcISR"))
-                cmd.Parameters.AddWithValue("@ISR", dr("ISR"))
-                cmd.Parameters.AddWithValue("@IngresoNeto", dr("IngresoNeto"))
+                cmd.Parameters.AddWithValue("@Fecha", Operaciones.ConvertirFecha(dr("Fecha").ToString))
+                cmd.Parameters.AddWithValue("@Dividendo", Operaciones.ConvertirDecimal(dr("Dividendo").ToString))
+                cmd.Parameters.AddWithValue("@CantidadBase", Operaciones.ConvertirDecimal(dr("CantidadBase").ToString))
+                cmd.Parameters.AddWithValue("@IngresoBruto", Operaciones.ConvertirDecimal(dr("IngresoBruto").ToString))
+                cmd.Parameters.AddWithValue("@PorcISR", Operaciones.ConvertirDecimal(dr("PorcISR").ToString))
+                cmd.Parameters.AddWithValue("@ISR", Operaciones.ConvertirDecimal(dr("ISR").ToString))
+                cmd.Parameters.AddWithValue("@IngresoNeto", Operaciones.ConvertirDecimal(dr("IngresoNeto").ToString))
                 cmd.Connection = cn
                 res = cmd.ExecuteNonQuery
             Next
@@ -1613,9 +1403,9 @@ Public Class AccionesDAO
                 cmd.Parameters.AddWithValue("@CodInv", CodInversion)
                 cmd.Parameters.AddWithValue("@TipoOper", dr("TipoOper"))
                 cmd.Parameters.AddWithValue("@CodImp", dr("CodImp"))
-                cmd.Parameters.AddWithValue("@PorcImp", dr("PorcImp"))
-                cmd.Parameters.AddWithValue("@MontoImp", dr("MontoImp"))
-                cmd.Parameters.AddWithValue("@MontoSujeto", dr("MontoSujeto"))
+                cmd.Parameters.AddWithValue("@PorcImp", Operaciones.ConvertirDecimal(dr("PorcImp").ToString))
+                cmd.Parameters.AddWithValue("@MontoImp", Operaciones.ConvertirDecimal(dr("MontoImp").ToString))
+                cmd.Parameters.AddWithValue("@MontoSujeto", Operaciones.ConvertirDecimal(dr("MontoSujeto").ToString))
                 cmd.Connection = cn
                 res = cmd.ExecuteNonQuery
             Next
@@ -1649,4 +1439,4 @@ Public Class AccionesDAO
 
 
 
-End Class
+End Class

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 9 - 948
DAO/BonosDAO.vb


+ 0 - 5
DAO/CambiarEstArbDAO.vb

@@ -7,12 +7,7 @@ Public Class CambiarEstArbDAO
     Public Function CambiatEstArb(ByVal CodigoTitulo As String, ByVal Estado As String, ByRef cn As Object, ByRef Transaccion As Object) As String
         Dim objCon As New Conexion
         Dim Respuesta As String = String.Empty
-
-
-
         Dim sql = "[dbo].[SP_CambiarEstArb]"
-
-
         Dim cmd As New SqlCommand(sql, cn)
         cmd.CommandType = CommandType.StoredProcedure
         cmd.Parameters.Add("@CodigoTitulo", SqlDbType.VarChar).Value = CodigoTitulo

+ 154 - 502
DAO/CertificadosDeInversionDAO.vb

@@ -1,19 +1,12 @@
 Imports System.Data.SqlClient
 Public Class CertificadosDeInversionDAO
 
-
+    Dim Operaciones As New Operaciones
     Dim oDAOGeneral As New DAOGeneral
 
-    Private Function SiguienteCodigo(ByVal oCE As CertificadoDeInversionCE) As String
-        Dim retorno As String = String.Empty
 
-        retorno = SeriesDAO.SiguienteCodigoInversion(oCE.CodigoEmpresa, oCE.CodigoInstrumentoFinanciero)
 
-        Return retorno
-    End Function
-    Public Function Nuevo(ByVal oCE As CertificadoDeInversionCE) As Integer
 
-    End Function
     Function Nuevo(ByVal oCE As CertificadoDeInversionCE, DocId As Integer, Tipo As String) As Integer
         Dim objCon As New Conexion
         Dim retorno As Integer = -1
@@ -154,7 +147,6 @@ Public Class CertificadosDeInversionDAO
 
         With cmd.Parameters
             .Add("@DocId", SqlDbType.Int).Value = DocId
-            '.Add("@CodCasaC", SqlDbType.VarChar).Value = oBono.CodigoCasaCompra
             .Add("@ValNomC", SqlDbType.Decimal).Value = oCE.ValorNominalCompra
             .Add("@UltFCupC", SqlDbType.DateTime).Value = oCE.UltimaFechaCuponCompra
             .Add("@SigFCupC", SqlDbType.DateTime).Value = oCE.SiguienteFechaCuponCompra
@@ -175,7 +167,7 @@ Public Class CertificadosDeInversionDAO
             .Add("@MontoPagarC", SqlDbType.Decimal).Value = oCE.MontoAPagarCompra
             .Add("@CostoTransC", SqlDbType.Decimal).Value = oCE.CostoDeTransferenciaCompra
 
-            '.Add("@CodCasaV", SqlDbType.VarChar).Value = oBono.CodigoCasaVenta
+
             .Add("@ValNomV", SqlDbType.Decimal).Value = oCE.ValorNominalVenta
             .Add("@UltFCupV", SqlDbType.DateTime).Value = oCE.UltimaFechaCuponVenta
             .Add("@SigFCupV", SqlDbType.DateTime).Value = oCE.SiguienteFechaCuponVenta
@@ -233,99 +225,7 @@ Public Class CertificadosDeInversionDAO
 
         Return retorno
     End Function
-    Public Sub CargarRegistro(ByVal oCE As CertificadoDeInversionCE, Tipo As String, IdRegistro As Integer)
-        Dim objCon As New Conexion
-        Dim drd As SqlDataReader
-        Dim cmd As SqlCommand
-        Dim sql As String
-        Dim Tabla As String
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        If Tipo = "P" Then
-            Tabla = "PBON"
-        End If
-        If Tipo = "I" Then
-            Tabla = "IBON"
-        End If
-
-        sql = "SELECT * FROM [dbo].[" & Tabla & "] T0 WHERE T0.[DocId]=@DocId"
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@DocId", SqlDbType.Int).Value = IdRegistro
-        cmd.Connection = cn
-
-        drd = cmd.ExecuteReader
-
-        If drd.HasRows Then
-            'SE ENCONTRO EL REGISTRO
-            If drd.Read Then
-                'oBonos.CodigoCasaCompra = drd.Item("CodCasaC")
-                oCE.ValorNominalCompra = drd.Item("ValNomC")
-                oCE.UltimaFechaCuponCompra = drd.Item("UltFCupC")
-                oCE.SiguienteFechaCuponCompra = drd.Item("SigFCupC")
-                oCE.FechaLiquidacionCompra = drd.Item("FLiqC")
-                oCE.FechaVencimientoCompra = drd.Item("FVencC")
-                oCE.PorcentajeCuponCompra = drd.Item("PorcCupC")
-                'oBonos.YTMAlVencimientoComisionCompra = drd.Item("YTMVencComC")
-                'oBonos.YTMAlVencimientoCompra = drd.Item("YTMVencC")
-                oCE.PrecioAlVencimientoCompra = drd.Item("PrecVencC")
-                oCE.PrecioCompra = drd.Item("PrecioCompra")
-                oCE.DiasBaseCompra = drd.Item("DiasBaseC")
-                'oBonos.DiasAcumuladosCompra = drd.Item("DiasAcumC")
-                'oBonos.DiasAlVencimientoCompra = drd.Item("DiasVencC")
-                'oBonos.PorcentajeInteresAcumuladoCompra = drd.Item("PorcIntAcumC")
-                'oBonos.InteresAcumuladoCompra = drd.Item("IntAcumC")
-                'oBonos.PrecioSucioCompra = drd.Item("PrecioSucioC")
-                'oBonos.ValorTransadoCompra = drd.Item("ValTransC")
-                'oBonos.MontoAPagarCompra = drd.Item("MontoPagarC")
-                oCE.CostoDeTransferenciaCompra = drd.Item("CostoTransC")
-
-                'oBonos.CodigoCasaVenta = drd.Item("CodCasaV")
-                oCE.ValorNominalVenta = drd.Item("ValNomV")
-                oCE.UltimaFechaCuponVenta = drd.Item("UltFCupV")
-                oCE.SiguienteFechaCuponVenta = drd.Item("SigFCupV")
-                oCE.FechaLiquidacionVenta = drd.Item("FLiqV")
-                oCE.FechaVencimientoVenta = drd.Item("FVencV")
-                oCE.PorcentajeCuponVenta = drd.Item("PorcCupV")
-                'oBonos.YTMAlVencimientoComisionVenta = drd.Item("YTMVencComV")
-                'oBonos.YTMAlVencimientoVenta = drd.Item("YTMVencV")
-                oCE.PrecioAlVencimientoVenta = drd.Item("PrecVencV")
-                oCE.PrecioVenta = drd.Item("PrecioVenta")
-                oCE.DiasBaseVenta = drd.Item("DiasBaseV")
-                'oBonos.DiasAcumuladosVenta = drd.Item("DiasAcumV")
-                'oBonos.DiasAlVencimientoVenta = drd.Item("DiasVencV")
-                'oBonos.PorcentajeInteresAcumuladoVenta = drd.Item("PorcIntAcumV")
-                'oBonos.InteresAcumuladoVenta = drd.Item("IntAcumV")
-                'oBonos.PrecioSucioVenta = drd.Item("PrecioSucioV")
-                'oBonos.ValorTransadoVenta = drd.Item("ValTransV")
-                'oBonos.MontoAPagarVenta = drd.Item("MontoPagarV")
-                oCE.CostoDeTransferenciaVenta = drd.Item("CostoTransV")
-
-                'oBonos.ValorNominalRO = drd.Item("ValNomRO")
-                'oBonos.PlazoRO = drd.Item("PlazoRO")
-                'oBonos.PrecioCompraRO = drd.Item("PrecioCompraRO")
-                'oBonos.PrecioVentaRO = drd.Item("PrecioVentaRO")
-                'oBonos.GananciaPerdidaDeCapital = drd.Item("GanPerdCap")
-                'oBonos.IngresoPorInteres = drd.Item("IngrPorInt")
-                'oBonos.CostosTotales = drd.Item("CostosTotales")
-                'oBonos.GananciaPerdidaTotal = drd.Item("GanPerdTot")
-                'oBonos.RendimientoGananciaPerdida = drd.Item("RendGanPerd")
-                'oBonos.RendimientoDeIntereses = drd.Item("RendInt")
-                'oBonos.RendimientoAntesImpuestos = drd.Item("RendAntISR")
-                'oBonos.RendimientoDespuesImpuestos = drd.Item("RendDespISR")
-            End If
-        Else
-            'NO SE ENCONTRO EL REGISTRO
-        End If
 
-        drd.Close()
-        cmd.Dispose()
-        cn.Dispose()
-    End Sub
     Public Function CargarRegistro(ByVal CodigoInversion As String, ByVal CodigoInstrumento As String) As Collection
         Dim objCon As New Conexion
         Dim oCE As CertificadoDeInversionCE
@@ -380,90 +280,62 @@ Public Class CertificadosDeInversionDAO
 
             If drd.Read Then
                 coleccion.Add(drd.Item("PeriodicC").ToString)
-                coleccion.Add(drd.Item("ValNomC").ToString)
-                coleccion.Add(drd.Item("UltFCupC").ToString)
-                coleccion.Add(drd.Item("SigFCupC").ToString)
-                coleccion.Add(drd.Item("FLiqC").ToString)
-                coleccion.Add(drd.Item("FVencC").ToString)
-                coleccion.Add(drd.Item("PorcCupC").ToString)
-                coleccion.Add(drd.Item("PrecVencC").ToString)
-                coleccion.Add(drd.Item("PrecioCompra").ToString)
-                coleccion.Add(drd.Item("DiasBaseC").ToString)
-
-
-                coleccion.Add(drd.Item("CostTransC").ToString)
-
-
-
-
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ValNomC").ToString))
+                coleccion.Add(Operaciones.ConvertirFecha(drd.Item("UltFCupC").ToString))
+                coleccion.Add(Operaciones.ConvertirFecha(drd.Item("SigFCupC").ToString))
+                coleccion.Add(Operaciones.ConvertirFecha(drd.Item("FLiqC").ToString))
+                coleccion.Add(Operaciones.ConvertirFecha(drd.Item("FVencC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PorcCupC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PrecVencC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PrecioCompra").ToString))
+                coleccion.Add(Operaciones.ConvertirEntero(drd.Item("DiasBaseC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("CostTransC").ToString))
                 coleccion.Add(drd.Item("PeriodicV").ToString)
-                coleccion.Add(drd.Item("ValNomV").ToString)
-                coleccion.Add(drd.Item("UltFCupV").ToString)
-                coleccion.Add(drd.Item("SigFCupV").ToString)
-                coleccion.Add(drd.Item("FLiqV").ToString)
-                coleccion.Add(drd.Item("FVencV").ToString)
-                coleccion.Add(drd.Item("PorcCupV").ToString)
-                coleccion.Add(drd.Item("PrecVencV").ToString)
-                coleccion.Add(drd.Item("PrecioVenta").ToString)
-                coleccion.Add(drd.Item("DiasBaseV").ToString)
-                'oCE.CostoDeTransferenciaVenta = drd.Item("CostoTransV")
-                coleccion.Add(drd.Item("CupRecibidos").ToString)
-                coleccion.Add(drd.Item("PorcCupC").ToString)
-                coleccion.Add(drd.Item("PorcCupV").ToString)
-
-                coleccion.Add(drd.Item("ComisionPorCompraCasa").ToString)
-                coleccion.Add(drd.Item("ComisionPorCompraBolsa").ToString)
-                coleccion.Add(drd.Item("ComisionPorVentaCasa").ToString)
-                coleccion.Add(drd.Item("ComisionPorVentaBolsa").ToString)
-                coleccion.Add(drd.Item("YTMCompra").ToString)
-                coleccion.Add(drd.Item("YTMVenta").ToString)
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ValNomV").ToString))
+                coleccion.Add(Operaciones.ConvertirFecha(drd.Item("UltFCupV").ToString))
+                coleccion.Add(Operaciones.ConvertirFecha(drd.Item("SigFCupV").ToString))
+                coleccion.Add(Operaciones.ConvertirFecha(drd.Item("FLiqV").ToString))
+                coleccion.Add(Operaciones.ConvertirFecha(drd.Item("FVencV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PorcCupV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PrecVencV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PrecioVenta").ToString))
+                coleccion.Add(Operaciones.ConvertirEntero(drd.Item("DiasBaseV").ToString))
+
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("CupRecibidos").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PorcCupC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PorcCupV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ComisionPorCompraCasa").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ComisionPorCompraBolsa").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ComisionPorVentaCasa").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ComisionPorVentaBolsa").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("YTMCompra").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("YTMVenta").ToString))
 
 
                 'Çampos Extras (Calculados)
 
 
-                coleccion.Add(drd.Item("DiasVenC").ToString)
-                coleccion.Add(drd.Item("DiasVenV").ToString)
-
-                coleccion.Add(drd.Item("DiasAcuC").ToString)
-                coleccion.Add(drd.Item("DiasAcuV").ToString)
-
-
-                coleccion.Add(drd.Item("YTMVenC").ToString)
-                coleccion.Add(drd.Item("YTMVenV").ToString)
-
-
-                coleccion.Add(drd.Item("IntPorAcuC").ToString)
-                coleccion.Add(drd.Item("IntPorAcuV").ToString)
-
-
-                coleccion.Add(drd.Item("IntAcuC").ToString)
-                coleccion.Add(drd.Item("IntAcuV").ToString)
-
-
-                coleccion.Add(drd.Item("PrecSucioC").ToString)
-                coleccion.Add(drd.Item("PrecSucioV").ToString)
-
-
-                coleccion.Add(drd.Item("ComisionCasaC").ToString)
-                coleccion.Add(drd.Item("ComisionCasaV").ToString)
-
-
-                coleccion.Add(drd.Item("ComisionBolsaC").ToString)
-                coleccion.Add(drd.Item("ComisionBolsaV").ToString)
-
-
-                coleccion.Add(drd.Item("ValTransC").ToString)
-                coleccion.Add(drd.Item("ValTransV").ToString)
-
-
-
-                coleccion.Add(drd.Item("MontoPagar").ToString)
-                coleccion.Add(drd.Item("MontoRecibir").ToString)
-
-
-
-                coleccion.Add(drd.Item("CupRecibidos").ToString)
+                coleccion.Add(Operaciones.ConvertirEntero(drd.Item("DiasVenC").ToString))
+                coleccion.Add(Operaciones.ConvertirEntero(drd.Item("DiasVenV").ToString))
+                coleccion.Add(Operaciones.ConvertirEntero(drd.Item("DiasAcuC").ToString))
+                coleccion.Add(Operaciones.ConvertirEntero(drd.Item("DiasAcuV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("YTMVenC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("YTMVenV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("IntPorAcuC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("IntPorAcuV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("IntAcuC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("IntAcuV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PrecSucioC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("PrecSucioV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ComisionCasaC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ComisionCasaV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ComisionBolsaC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ComisionBolsaV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ValTransC").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("ValTransV").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("MontoPagar").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("MontoRecibir").ToString))
+                coleccion.Add(Operaciones.ConvertirDecimal(drd.Item("CupRecibidos").ToString))
 
             Else
 
@@ -596,60 +468,54 @@ Public Class CertificadosDeInversionDAO
 
             With cmd.Parameters
                 .Add("@PeriodicC", SqlDbType.VarChar).Value = coleccion(1).ToString()
-                .Add("@ValNomC", SqlDbType.Float).Value = CDec(coleccion(2).ToString().TrimEnd("%"))
-                .Add("@UltFCupC", SqlDbType.Date).Value = coleccion(3)
-                .Add("@SigFCupC", SqlDbType.Date).Value = coleccion(4)
-                .Add("@FLiqC", SqlDbType.Date).Value = coleccion(5)
-                .Add("@FVencC", SqlDbType.Date).Value = coleccion(6)
-                .Add("@PorcCupC", SqlDbType.Float).Value = CDec(coleccion(7).ToString().TrimEnd("%"))
-                .Add("@PrecVencC", SqlDbType.Float).Value = CDec(coleccion(8).ToString().TrimEnd("%"))
-                .Add("@PrecioCompra", SqlDbType.Float).Value = CDec(coleccion(9).ToString().TrimEnd("%"))
-                .Add("@DiasBaseC", SqlDbType.Int).Value = CInt(coleccion(10).ToString().TrimEnd("%"))
+                .Add("@ValNomC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(2).ToString())
+                .Add("@UltFCupC", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(3).ToString)
+                .Add("@SigFCupC", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(4).ToString)
+                .Add("@FLiqC", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(5).ToString)
+                .Add("@FVencC", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(6).ToString)
+                .Add("@PorcCupC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(7).ToString())
+                .Add("@PrecVencC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(8).ToString())
+                .Add("@PrecioCompra", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(9).ToString())
+                .Add("@DiasBaseC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(10).ToString())
                 .Add("@PeriodicV", SqlDbType.VarChar).Value = coleccion(12).ToString()
-                .Add("@ValNomV", SqlDbType.Float).Value = CDec(coleccion(13).ToString().TrimEnd("%"))
-                .Add("@UltFCupV", SqlDbType.Date).Value = coleccion(14)
-                .Add("@SigFCupV", SqlDbType.Date).Value = coleccion(15)
-                .Add("@FLiqV", SqlDbType.Date).Value = coleccion(16)
-                .Add("@FVencV", SqlDbType.Date).Value = coleccion(17)
-                .Add("@PorcCupV", SqlDbType.Float).Value = CDec(coleccion(18).ToString().TrimEnd("%"))
-                .Add("@PrecVencV", SqlDbType.Float).Value = CDec(coleccion(19).ToString().TrimEnd("%"))
-                .Add("@PrecioVenta", SqlDbType.Float).Value = CDec(coleccion(20).ToString().TrimEnd("%"))
-                .Add("@DiasBaseV", SqlDbType.Int).Value = CInt(coleccion(21).ToString().TrimEnd("%"))
+                .Add("@ValNomV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(13).ToString())
+                .Add("@UltFCupV", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(14).ToString)
+                .Add("@SigFCupV", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(15).ToString)
+                .Add("@FLiqV", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(16).ToString)
+                .Add("@FVencV", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(17).ToString)
+                .Add("@PorcCupV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString())
+                .Add("@PrecVencV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString())
+                .Add("@PrecioVenta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(20).ToString())
+                .Add("@DiasBaseV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(21).ToString())
                 .Add("@CodInv", SqlDbType.VarChar).Value = coleccion(23).ToString()
-
-                .Add("@ComisionPorCompraCasa", SqlDbType.Float).Value = coleccion(26).ToString()
-                .Add("@ComisionPorCompraBolsa", SqlDbType.Float).Value = coleccion(27).ToString()
-                .Add("@ComisionPorVentaCasa", SqlDbType.Float).Value = coleccion(28).ToString()
-                .Add("@ComisionPorVentaBolsa", SqlDbType.Float).Value = coleccion(29).ToString()
-
-                .Add("@YTMCompra", SqlDbType.Float).Value = coleccion(30).ToString()
-                .Add("@YTMVenta", SqlDbType.Float).Value = coleccion(31).ToString()
-
-
-
-
-                .Add("DiasVenC", SqlDbType.Int).Value = coleccion(32)
-                .Add("@DiasVenV", SqlDbType.Int).Value = coleccion(33)
-                .Add("@DiasAcuC", SqlDbType.Int).Value = coleccion(34)
-                .Add("@DiasAcuV", SqlDbType.Int).Value = coleccion(35)
-                .Add("@YTMVenC", SqlDbType.Float).Value = coleccion(36)
-                .Add("@YTMVenV", SqlDbType.Float).Value = coleccion(37)
-                .Add("@IntAcuC", SqlDbType.Float).Value = coleccion(38)
-                .Add("@IntAcuV", SqlDbType.Float).Value = coleccion(39)
-                .Add("@IntPorAcuC", SqlDbType.Float).Value = coleccion(40)
-                .Add("@IntPorAcuV", SqlDbType.Float).Value = coleccion(41)
-                .Add("@PrecSucioC", SqlDbType.Float).Value = coleccion(42)
-                .Add("@PrecSucioV", SqlDbType.Float).Value = coleccion(43)
-                .Add("@ComisionCasaC", SqlDbType.Float).Value = coleccion(44)
-                .Add("@ComisionCasaV", SqlDbType.Float).Value = coleccion(45)
-                .Add("@ComisionBolsaC", SqlDbType.Float).Value = coleccion(46)
-                .Add("@ComisionBolsaV", SqlDbType.Float).Value = coleccion(47)
-                .Add("@ValTransC", SqlDbType.Float).Value = coleccion(48)
-                .Add("@ValTransV", SqlDbType.Float).Value = coleccion(49)
-                .Add("@MontoPagar", SqlDbType.Float).Value = coleccion(50)
-                .Add("@MontoRecibir", SqlDbType.Float).Value = coleccion(51)
-                .Add("@CostTransC", SqlDbType.Float).Value = coleccion(52)
-                .Add("@CupRecibidos", SqlDbType.Float).Value = coleccion(53)
+                .Add("@ComisionPorCompraCasa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(26).ToString())
+                .Add("@ComisionPorCompraBolsa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(27).ToString())
+                .Add("@ComisionPorVentaCasa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(28).ToString())
+                .Add("@ComisionPorVentaBolsa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(29).ToString())
+                .Add("@YTMCompra", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(30).ToString())
+                .Add("@YTMVenta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(31).ToString())
+                .Add("DiasVenC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(32).ToString)
+                .Add("@DiasVenV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(33).ToString)
+                .Add("@DiasAcuC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(34).ToString)
+                .Add("@DiasAcuV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(35).ToString)
+                .Add("@YTMVenC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(36).ToString)
+                .Add("@YTMVenV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(37).ToString)
+                .Add("@IntAcuC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(38).ToString)
+                .Add("@IntAcuV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(39).ToString)
+                .Add("@IntPorAcuC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(40).ToString)
+                .Add("@IntPorAcuV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(41).ToString)
+                .Add("@PrecSucioC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(42).ToString)
+                .Add("@PrecSucioV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(43).ToString)
+                .Add("@ComisionCasaC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(44).ToString)
+                .Add("@ComisionCasaV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(45).ToString)
+                .Add("@ComisionBolsaC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(46).ToString)
+                .Add("@ComisionBolsaV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(47).ToString)
+                .Add("@ValTransC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(48).ToString)
+                .Add("@ValTransV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(49).ToString)
+                .Add("@MontoPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(50).ToString)
+                .Add("@MontoRecibir", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(51).ToString)
+                .Add("@CostTransC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(52).ToString)
+                .Add("@CupRecibidos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(53).ToString)
 
             End With
             retorno = cmd.ExecuteNonQuery
@@ -717,14 +583,14 @@ Public Class CertificadosDeInversionDAO
                         cmd.Transaction = myTrans
 
                         With cmd.Parameters
-                            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                            .Add("@NumCupon", SqlDbType.VarChar).Value = Coleccion2(1)
-                            .Add("@FechaCupon", SqlDbType.DateTime).Value = Coleccion2(2)
-                            .Add("@Dias", SqlDbType.Int).Value = Coleccion2(3)
-                            .Add("@Ingreso", SqlDbType.Float).Value = Coleccion2(4)
-                            .Add("@PorcImpuesto", SqlDbType.Float).Value = Coleccion2(5)
-                            .Add("@MontoImpuesto", SqlDbType.Float).Value = Coleccion2(6)
-                            .Add("@Liquido", SqlDbType.Float).Value = Coleccion2(7)
+                            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo.ToString
+                            .Add("@NumCupon", SqlDbType.VarChar).Value = Coleccion2(1).ToString
+                            .Add("@FechaCupon", SqlDbType.Date).Value = Operaciones.ConvertirFecha(Coleccion2(2).ToString)
+                            .Add("@Dias", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(3).ToString)
+                            .Add("@Ingreso", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(4).ToString)
+                            .Add("@PorcImpuesto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(5).ToString)
+                            .Add("@MontoImpuesto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(6).ToString)
+                            .Add("@Liquido", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(7).ToString)
                         End With
 
                         retorno = cmd.ExecuteNonQuery
@@ -900,7 +766,7 @@ Public Class CertificadosDeInversionDAO
 
             cmd = New SqlCommand
             cmd.CommandText = sql
-            'Try
+
 
             With cmd.Parameters
                 If (coleccion(1) Is Nothing) Then
@@ -908,93 +774,75 @@ Public Class CertificadosDeInversionDAO
                 Else
                     .Add("@PeriodicC", SqlDbType.VarChar).Value = coleccion(1).ToString()
                 End If
-
-                .Add("@ValNomC", SqlDbType.Float).Value = CDec(coleccion(2).ToString.Trim("%"))
-                .Add("@UltFCupC", SqlDbType.Date).Value = coleccion(3)
-                .Add("@SigFCupC", SqlDbType.Date).Value = coleccion(4)
-                .Add("@FLiqC", SqlDbType.Date).Value = coleccion(5)
-                .Add("@FVencC", SqlDbType.Date).Value = coleccion(6)
-                .Add("@PorcCupC", SqlDbType.Float).Value = CDec(coleccion(7).ToString.Trim("%"))
-                .Add("@PrecVencC", SqlDbType.Float).Value = CDec(coleccion(8).ToString.Trim("%"))
-                .Add("@PrecioCompra", SqlDbType.Float).Value = CDec(coleccion(9).ToString.Trim("%"))
-
+                .Add("@ValNomC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(2).ToString)
+                .Add("@UltFCupC", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(3).ToString)
+                .Add("@SigFCupC", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(4).ToString)
+                .Add("@FLiqC", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(5).ToString)
+                .Add("@FVencC", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(6).ToString)
+                .Add("@PorcCupC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(7).ToString)
+                .Add("@PrecVencC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(8).ToString)
+                .Add("@PrecioCompra", SqlDbType.Float).Value = coleccion(9).ToString
                 If (coleccion(10) Is Nothing) Then
                     .Add("@DiasBaseC", SqlDbType.Int).Value = 365
                 Else
-                    .Add("@DiasBaseC", SqlDbType.Int).Value = CInt(coleccion(10).ToString.Trim("%"))
+                    .Add("@DiasBaseC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(10).ToString)
                 End If
 
-
-                '.Add("@CostoTransC", SqlDbType.Float).Value = Trim(CDec(coleccion(11)))
-
-
                 If (coleccion(12) Is Nothing) Then
                     .Add("@PeriodicV", SqlDbType.VarChar).Value = "M"
                 Else
                     .Add("@PeriodicV", SqlDbType.VarChar).Value = coleccion(12).ToString()
                 End If
-
-
-
-                .Add("@ValNomV", SqlDbType.Float).Value = CDec(coleccion(13).ToString.Trim("%"))
-                .Add("@UltFCupV", SqlDbType.Date).Value = coleccion(14)
-                .Add("@SigFCupV", SqlDbType.Date).Value = coleccion(15)
-                .Add("@FLiqV", SqlDbType.Date).Value = coleccion(16)
-                .Add("@FVencV", SqlDbType.Date).Value = coleccion(17)
-                .Add("@PorcCupV", SqlDbType.Float).Value = CDec(coleccion(18).ToString.Trim("%"))
-                .Add("@PrecVencV", SqlDbType.Float).Value = CDec(coleccion(19).ToString.Trim("%"))
-                .Add("@PrecioVenta", SqlDbType.Float).Value = CDec(coleccion(20).ToString.Trim("%"))
+                .Add("@ValNomV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(13).ToString)
+                .Add("@UltFCupV", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(14).ToString)
+                .Add("@SigFCupV", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(15).ToString)
+                .Add("@FLiqV", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(16).ToString)
+                .Add("@FVencV", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(17).ToString)
+                .Add("@PorcCupV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString)
+                .Add("@PrecVencV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString)
+                .Add("@PrecioVenta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(20).ToString)
                 If (coleccion(21) Is Nothing) Then
                     .Add("@DiasBaseV", SqlDbType.Int).Value = 365
                 Else
-                    .Add("@DiasBaseV", SqlDbType.Int).Value = CInt(coleccion(21).ToString.Trim("%"))
+                    .Add("@DiasBaseV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(21).ToString)
                 End If
 
-                '.Add("@CostoTransV", SqlDbType.Float).Value = CDec(coleccion(22).ToString.Trim("%"))
                 .Add("@CodInv", SqlDbType.VarChar).Value = coleccion(23).ToString()
-
-                .Add("@ComisionPorCompraCasa", SqlDbType.Float).Value = coleccion(26).ToString()
-                .Add("@ComisionPorCompraBolsa", SqlDbType.Float).Value = coleccion(27).ToString()
-                .Add("@ComisionPorVentaCasa", SqlDbType.Float).Value = coleccion(28).ToString()
-                .Add("@ComisionPorVentaBolsa", SqlDbType.Float).Value = coleccion(29).ToString()
-
-                .Add("@YTMCompra", SqlDbType.Float).Value = coleccion(30).ToString()
-                .Add("@YTMVenta", SqlDbType.Float).Value = coleccion(31).ToString()
-
-
-
-
-                .Add("@DiasVenC", SqlDbType.Int).Value = coleccion(32)
-                .Add("@DiasVenV", SqlDbType.Int).Value = coleccion(33)
-                .Add("@DiasAcuC", SqlDbType.Int).Value = coleccion(34)
-                .Add("@DiasAcuV", SqlDbType.Int).Value = coleccion(35)
-                .Add("@YTMVenC", SqlDbType.Float).Value = coleccion(36)
-                .Add("@YTMVenV", SqlDbType.Float).Value = coleccion(37)
-                .Add("@IntAcuC", SqlDbType.Float).Value = coleccion(38)
-                .Add("@IntAcuV", SqlDbType.Float).Value = coleccion(39)
-                .Add("@IntPorAcuC", SqlDbType.Float).Value = coleccion(40)
-                .Add("@IntPorAcuV", SqlDbType.Float).Value = coleccion(41)
-                .Add("@PrecSucioC", SqlDbType.Float).Value = coleccion(42)
-                .Add("@PrecSucioV", SqlDbType.Float).Value = coleccion(43)
-                .Add("@ComisionCasaC", SqlDbType.Float).Value = coleccion(44)
-                .Add("@ComisionCasaV", SqlDbType.Float).Value = coleccion(45)
-                .Add("@ComisionBolsaC", SqlDbType.Float).Value = coleccion(46)
-                .Add("@ComisionBolsaV", SqlDbType.Float).Value = coleccion(47)
-                .Add("@ValTransC", SqlDbType.Float).Value = coleccion(48)
-                .Add("@ValTransV", SqlDbType.Float).Value = coleccion(49)
-                .Add("@MontoPagar", SqlDbType.Float).Value = coleccion(50)
-                .Add("@MontoRecibir", SqlDbType.Float).Value = coleccion(51)
-                .Add("@CostTransC", SqlDbType.Float).Value = coleccion(52)
-                .Add("@CupRecibidos", SqlDbType.Float).Value = coleccion(53)
+                .Add("@ComisionPorCompraCasa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(26).ToString())
+                .Add("@ComisionPorCompraBolsa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(27).ToString())
+                .Add("@ComisionPorVentaCasa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(28).ToString())
+                .Add("@ComisionPorVentaBolsa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(29).ToString())
+                .Add("@YTMCompra", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(30).ToString())
+                .Add("@YTMVenta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(31).ToString())
+                .Add("@DiasVenC", SqlDbType.Int).Value = coleccion(32).ToString
+                .Add("@DiasVenV", SqlDbType.Int).Value = coleccion(33).ToString
+                .Add("@DiasAcuC", SqlDbType.Int).Value = coleccion(34).ToString
+                .Add("@DiasAcuV", SqlDbType.Int).Value = coleccion(35).ToString
+                .Add("@YTMVenC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(36).ToString)
+                .Add("@YTMVenV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(37).ToString)
+                .Add("@IntAcuC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(38).ToString)
+                .Add("@IntAcuV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(39).ToString)
+                .Add("@IntPorAcuC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(40).ToString)
+                .Add("@IntPorAcuV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(41).ToString)
+                .Add("@PrecSucioC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(42).ToString)
+                .Add("@PrecSucioV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(43).ToString)
+                .Add("@ComisionCasaC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(44).ToString)
+                .Add("@ComisionCasaV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(45).ToString)
+                .Add("@ComisionBolsaC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(46).ToString)
+                .Add("@ComisionBolsaV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(47).ToString)
+                .Add("@ValTransC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(48).ToString)
+                .Add("@ValTransV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(49).ToString)
+                .Add("@MontoPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(50).ToString)
+                .Add("@MontoRecibir", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(51).ToString)
+                .Add("@CostTransC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(52).ToString)
+                .Add("@CupRecibidos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(53).ToString)
             End With
 
             cmd.Connection = cn
 
             retorno = cmd.ExecuteNonQuery
             MsgBox("Registro creado éxitosmente")
-            'Catch ex As Exception
-            '    MsgBox("No se pudo ingresar los datos")
-            'End Try
+
         Else
             MsgBox("No se pudo ingresar los datos")
             retorno = 0
@@ -1103,202 +951,6 @@ Public Class CertificadosDeInversionDAO
             MsgBox(ex.Message)
         End Try
         cn.Close()
-
-
-    End Sub
-
-
-
-    Public Function GuardarIngreso(ByVal CodInversion As String, ByVal fecha As Date, ByVal Porcentaje As Double)
-
-
-        Dim objCon As New Conexion
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim numero = CInt(Numeracion())
-        Dim sql = "INSERT INTO CIN1([CodInv],[NumCupon],[FechaCupon],[PorcImpuesto]) values(@cod,@num,@fecha,@PorcImpuesto)"
-
-
-        Dim comando = New SqlCommand()
-        comando.CommandText = sql
-
-        With comando.Parameters
-            .Add("@cod", SqlDbType.VarChar).Value = CodInversion
-            .Add("@num", SqlDbType.Int).Value = numero
-            .Add("@fecha", SqlDbType.DateTime).Value = fecha
-            .Add("@PorcImpuesto", SqlDbType.Float).Value = Porcentaje
-        End With
-        comando.Connection = cn
-        Dim i As Integer = comando.ExecuteNonQuery()
-        cn.Close()
-        If (i > 0) Then
-            Return True
-        Else
-            Return False
-        End If
-    End Function
-
-    Public Function CargarData()
-
-        Dim objCon As New Conexion
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "select * from CIN1"
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-    Public Function Numeracion()
-
-        Dim objCon As New Conexion
-        Dim sql = "select MAX(NumCupon) from CIN1"
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim numero = cmd.ExecuteScalar
-        If (String.IsNullOrEmpty(numero.ToString)) Then
-            numero = 0
-        Else
-            numero = numero + 1
-        End If
-        cn.Close()
-        Return numero
-    End Function
-
-
-
-
-
-
-
-
-
-
-
-
-
-    Private Sub GuardarIngresos(ByVal CodInversion As String, ByVal dt As DataTable)
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim res As Integer
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "DELETE FROM [dbo].[CIN1]
-      WHERE [CodInv]=@CodInv"
-
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = CodInversion
-        cmd.Connection = cn
-
-        res = cmd.ExecuteNonQuery
-
-        sql = String.Empty
-        If dt.Rows.Count > 0 Then
-            For Each dr In dt.Rows
-                cmd = New SqlCommand
-                sql = "INSERT INTO [dbo].[CIN1]
-    ([CodInv]
-    ,[NumCupon]
-    ,[FechaCupon]
-    ,[Dias]
-    ,[Ingreso]
-    ,[PorcImpuesto]
-    ,[MontoImpuesto]
-    ,[Liquido]
-)
-VALUES
-    (@CodInv
-    ,@NumCupon
-    ,@FechaCupon
-    ,@Dias
-    ,@Ingreso
-    ,@PorcImpuesto
-    ,@MontoImpuesto
-    ,@Liquido
-)
-"
-                cmd.CommandText = sql
-                cmd.Parameters.AddWithValue("@CodInv", CodInversion)
-                cmd.Parameters.AddWithValue("@NumCupon", dr("NumCupon"))
-                cmd.Parameters.AddWithValue("@FechaCupon", dr("FechaCupon"))
-                cmd.Parameters.AddWithValue("@Dias", dr("Dias"))
-                cmd.Parameters.AddWithValue("@Ingreso", dr("Ingreso"))
-                cmd.Parameters.AddWithValue("@PorcImpuesto", dr("PorcImpuesto"))
-                cmd.Parameters.AddWithValue("@MontoImpuesto", dr("MontoImpuesto"))
-                cmd.Parameters.AddWithValue("@Liquido", dr("MontoImpuesto"))
-                cmd.Connection = cn
-                res = cmd.ExecuteNonQuery
-
-            Next
-        End If
-        cn.Close()
-    End Sub
-    Private Sub GuardarImpuestosYComisiones(ByVal CodInversion As String, ByVal dt As DataTable)
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim res As Integer
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "DELETE FROM [dbo].[CIN2]
-      WHERE [CodInv]=@CodInv"
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = CodInversion
-        cmd.Connection = cn
-
-        res = cmd.ExecuteNonQuery
-
-        sql = String.Empty
-        If dt.Rows.Count > 0 Then
-            For Each dr In dt.Rows
-                cmd = New SqlCommand
-                sql = "INSERT INTO [dbo].[CIN2]
-           ([CodInv]
-           ,[TipoOper]
-           ,[CodImp]
-           ,[PorcImp]
-           ,[MontoImp]
-           ,[MontoSujeto])
-     VALUES
-           (@CodInv
-           ,@TipoOper
-           ,@CodImp
-           ,@PorcImp
-           ,@MontoImp
-           ,@MontoSujeto)"
-                cmd.CommandText = sql
-                cmd.Parameters.AddWithValue("@CodInv", CodInversion)
-                cmd.Parameters.AddWithValue("@TipoOper", dr("TipoOper"))
-                cmd.Parameters.AddWithValue("@CodImp", dr("CodImp"))
-                cmd.Parameters.AddWithValue("@PorcImp", dr("PorcImp"))
-                cmd.Parameters.AddWithValue("@MontoImp", dr("MontoImp"))
-                cmd.Parameters.AddWithValue("@MontoSujeto", dr("MontoSujeto"))
-                cmd.Connection = cn
-                res = cmd.ExecuteNonQuery
-            Next
-        End If
-        cn.Close()
     End Sub
 End Class
 

+ 0 - 13
DAO/ColaDAO.vb

@@ -6,19 +6,6 @@ Public Class ColaDAO
 
 
     Dim Operaciones As New Operaciones
-
-
-
-
-
-
-
-
-
-
-
-
-
     Public Function EstadoArbitraje() As DataTable
         Dim objCon As New Conexion
         Dim da As New SqlDataAdapter

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 122 - 742
DAO/DAOGeneral.vb


+ 48 - 471
DAO/DAONotaEstructurada.vb

@@ -4,208 +4,10 @@
 Public Class DAONotaEstructurada
 
 
-    Function Nuevo(ByVal oNESTCE As NotaEstructuradaCE) As Integer
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-        sql = "INSERT INTO [dbo].[NEST0]
-           ([CodInv]
-           ,[MontoInv]  
-           ,[FOper]
-           ,[FVenc]
-           ,[Tasa]
-           ,[Plazo]
-           --,[AnBase]
-           ,[Periodic])
-     VALUES
-           (@CodInv
-           ,@MontoInv
-           ,@FOper
-           ,@FVenc
-           ,@Tasa
-           ,@Plazo
-           --,@AnBase
-           ,@Periodic)
-"
-
-        cmd = New SqlCommand
-        cmd.Connection = cn
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = oNESTCE.CodigoInversion
-            .Add("@MontoInv", SqlDbType.Float).Value = oNESTCE.MontoDeInversion
-            .Add("@FOper", SqlDbType.Date).Value = oNESTCE.FechaOperacion
-            .Add("@FVenc", SqlDbType.Date).Value = oNESTCE.FechaVencimiento
-            .Add("@Tasa", SqlDbType.Float).Value = oNESTCE.Tasa
-            .Add("@Plazo", SqlDbType.Int).Value = oNESTCE.Plazo
-            '.Add("@AnBase",SqlDbType.VarChar).Value = oDAPCE.CodigoInversion
-            .Add("@Periodic", SqlDbType.VarChar).Value = oNESTCE.Periodicidad
-        End With
-
-        retorno = cmd.ExecuteNonQuery
-
-        cmd.Dispose()
-        cn.Dispose()
+    Dim Operaciones As New Operaciones
 
-        GuardaIntereses(oNESTCE.CodigoInversion, oNESTCE.dtIntereses)
 
-        Return retorno
-    End Function
-    Function Nuevo(ByVal oNEST As NotaEstructuradaCE, DocId As Integer, Tipo As String) As Integer
-        Dim objCon As New Conexion
-        Dim retorno As Integer = -1
-        Dim Transaccion As SqlTransaction
-        Dim query As String
-        Dim Tabla As String = ""
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-        If Tipo = "P" Then
-            Tabla = "PDAP0"
-        End If
-        If Tipo = "I" Then
-            Tabla = "IDAP0"
-        End If
-
-        Dim cmd As SqlCommand = cn.CreateCommand
-
-        Transaccion = cn.BeginTransaction("NuevoDAP")
-        cmd.Connection = cn
-        cmd.Transaction = Transaccion
-
-        query = "INSERT INTO [dbo].[" & Tabla & "]
-           ([DocId]
-           ,[MontoInv]
-           ,[FOper]
-           ,[FVenc]
-           ,[Tasa]
-           ,[Plazo]
-           ,[AnBase]
-           ,[Periodic]
-           ,[RendBruto]
-           ,[RendNeto]
-           ,[IngrBruto]
-           ,[Impuestos]
-           ,[IngrNeto])
-     VALUES
-           (@DocId
-           ,@MontoInv
-           ,@FOper
-           ,@FVenc
-           ,@Tasa
-           ,@Plazo
-           ,@AnBase
-           ,@Periodic
-           ,@RendBruto
-           ,@RendNeto
-           ,@IngrBruto
-           ,@Impuestos
-           ,@IngrNeto
-		  )"
-
-        cmd.CommandText = query
-
-        With cmd.Parameters
-            .Add("@DocId", SqlDbType.Int).Value = DocId
-            .Add("@MontoInv", SqlDbType.Decimal).Value = oNEST.MontoDeInversion
-            .Add("@FOper", SqlDbType.Date).Value = oNEST.FechaOperacion
-            .Add("@FVenc", SqlDbType.Date).Value = oNEST.FechaVencimiento
-            .Add("@Tasa", SqlDbType.Decimal).Value = oNEST.Tasa
-            .Add("@Plazo", SqlDbType.Int).Value = oNEST.Plazo
-            .Add("@AnBase", SqlDbType.Int).Value = oNEST.AnioBase
-            .Add("@Periodic", SqlDbType.NVarChar).Value = oNEST.Periodicidad
-            .Add("@RendBruto", SqlDbType.Decimal).Value = oNEST.RendimientoBruto
-            .Add("@RendNeto", SqlDbType.Decimal).Value = oNEST.RendimientoNeto
-            .Add("@IngrBruto", SqlDbType.Decimal).Value = oNEST.IngresoBruto
-            .Add("@Impuestos", SqlDbType.Decimal).Value = oNEST.Impuestos
-            .Add("@IngrNeto", SqlDbType.Decimal).Value = oNEST.IngresoNeto
-        End With
 
-        Try
-            cmd.ExecuteNonQuery()
-            Transaccion.Commit()
-            retorno = 0
-        Catch ex As Exception
-            MsgBox("Error al Guardar DAP : " & ex.GetType.ToString)
-            MsgBox("Mensaje: " & ex.Message)
-            retorno = 1
-            Try
-                Transaccion.Rollback()
-                retorno = 2
-            Catch ex2 As Exception
-                MsgBox("Error en Rollback: " & ex2.GetType.ToString)
-                MsgBox("Mensaje Rollbak: " & ex2.Message)
-                retorno = 3
-            End Try
-        End Try
-
-        cmd.Dispose()
-        cn.Dispose()
-
-
-        Return retorno
-    End Function
-
-    Public Sub CargarRegistro(ByVal oNEST As NotaEstructuradaCE, Tipo As String, IdRegistro As Integer)
-        Dim objCon As New Conexion
-        Dim drd As SqlDataReader
-        Dim cmd As SqlCommand
-        Dim sql As String
-        Dim Tabla As String
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        If Tipo = "P" Then
-            Tabla = "PDAP0"
-        End If
-        If Tipo = "I" Then
-            Tabla = "IDAP0"
-        End If
-
-        sql = "SELECT * FROM [dbo].[" & Tabla & "] T0 WHERE T0.[DocId]=@DocId"
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@DocId", SqlDbType.Int).Value = IdRegistro
-        cmd.Connection = cn
-
-        drd = cmd.ExecuteReader
-
-        If drd.HasRows Then
-            'SE ENCONTRO EL REGISTRO
-            If drd.Read Then
-                oNEST.MontoDeInversion = drd.Item("MontoInv")
-                oNEST.FechaOperacion = drd.Item("FOper")
-                oNEST.FechaVencimiento = drd.Item("FVenc")
-                oNEST.Tasa = drd.Item("Tasa")
-                oNEST.Plazo = drd.Item("Plazo")
-                oNEST.AnioBase = drd.Item("AnBase")
-                oNEST.Periodicidad = drd.Item("Periodic")
-                'oDAP.RendimientoBruto = drd.Item("RendBruto")
-                'oDAP.RendimientoNeto = drd.Item("RendNeto")
-                oNEST.IngresoBruto = drd.Item("IngrBruto")
-                oNEST.Impuestos = drd.Item("Impuestos")
-                oNEST.IngresoNeto = drd.Item("IngrNeto")
-            End If
-        Else
-            'NO SE ENCONTRO EL REGISTRO
-        End If
-        drd.Close()
-        cmd.Dispose()
-        cn.Dispose()
-
-    End Sub
     Public Function CargarRegistro(ByVal vCodigoInversion As String) As NotaEstructuradaCE
         Dim objCon As New Conexion
         Dim oNESTCE As New NotaEstructuradaCE
@@ -238,10 +40,10 @@ Public Class DAONotaEstructurada
             'SE ENCONTRO EL REGISTRO
             If drd.Read Then
                 oNESTCE.CodigoInversion = vCodigoInversion.ToString
-                oNESTCE.MontoDeInversion = drd.Item("MontoInv").ToString
-                oNESTCE.FechaOperacion = drd.Item("FOper").ToString
-                oNESTCE.FechaVencimiento = drd.Item("FVenc").ToString
-                oNESTCE.Tasa = drd.Item("Tasa").ToString
+                oNESTCE.MontoDeInversion = Operaciones.ConvertirDecimal(drd.Item("MontoInv").ToString)
+                oNESTCE.FechaOperacion = Operaciones.ConvertirFecha(drd.Item("FOper").ToString)
+                oNESTCE.FechaVencimiento = Operaciones.ConvertirFecha(drd.Item("FVenc").ToString)
+                oNESTCE.Tasa = Operaciones.ConvertirFecha(drd.Item("Tasa").ToString)
                 oNESTCE.Plazo = drd.Item("Plazo").ToString
                 oNESTCE.Periodicidad = drd.Item("Periodic").ToString
 
@@ -258,115 +60,9 @@ Public Class DAONotaEstructurada
 
     End Function
 
-    Public Function Actualizar(ByVal oNESTCE As NotaEstructuradaCE) As Integer
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim retorno As Integer
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-        sql = "UPDATE [dbo].[NEST0]
-   SET [MontoInv] = @MontoInv
-      ,[FOper] = @FOper
-      ,[FVenc] = @FVenc
-      ,[Tasa] = @Tasa
-      ,[Plazo] = @Plazo
-      --,[AnBase] = @AnBase
-      ,[Periodic] = @Periodic
- WHERE [CodInv] = @CodInv"
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-
-
-        With cmd.Parameters
-            .Add("@MontoInv", SqlDbType.Float).Value = oNESTCE.MontoDeInversion
-            .Add("@FOper", SqlDbType.Date).Value = oNESTCE.FechaOperacion
-            .Add("@FVenc", SqlDbType.Date).Value = oNESTCE.FechaVencimiento
-            .Add("@Tasa", SqlDbType.Float).Value = oNESTCE.Tasa
-            .Add("@Plazo", SqlDbType.Int).Value = oNESTCE.Plazo
-            .Add("@Periodic", SqlDbType.VarChar).Value = oNESTCE.Periodicidad
-        End With
-
-        cmd.Connection = cn
-        retorno = cmd.ExecuteNonQuery
-
-        cmd.Dispose()
-        cn.Dispose()
-
-        GuardaIntereses(oNESTCE.CodigoInversion, oNESTCE.dtIntereses)
-
-        Return retorno
-    End Function
-    Private Sub GuardaIntereses(ByVal vCodInversion As String, dt As DataTable)
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim res As Integer
-
-        sql = "DELETE FROM [dbo].[NEST1]
-      WHERE [CodInv]=@CodInv"
 
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = vCodInversion
 
 
-        cmd.Connection = cn
-        res = cmd.ExecuteNonQuery
-        sql = String.Empty
-
-        If dt.Rows.Count > 0 Then
-            For Each dr In dt.Rows
-                cmd = New SqlCommand
-                sql = "INSERT INTO [dbo].[NEST1]
-           ([CodInv]
-           ,[Plazo]
-           ,[Fecha]
-           ,[IngrBruto]
-           ,[PorcImp]
-           ,[MontoImp]
-           ,[IngrNeto]
-           ,[Estado])
-     VALUES
-           (@CodInv
-           ,@Plazo
-           ,@Fecha
-           ,@IngrBruto
-           ,@PorcImp
-           ,@MontoImp
-           ,@IngrNeto
-           ,@Estado)"
-
-                cmd.CommandText = sql
-                With cmd.Parameters
-                    .AddWithValue("@CodInv", vCodInversion)
-                    .AddWithValue("@Plazo", dr("Plazo"))
-                    .AddWithValue("@Fecha", dr("Fecha"))
-                    .AddWithValue("@IngrBruto", dr("IngrBruto"))
-                    .AddWithValue("@PorcImp", dr("PorcImp"))
-                    .AddWithValue("@MontoImp", dr("MontoImp"))
-                    .AddWithValue("@IngrNeto", dr("IngrNeto"))
-                    .AddWithValue("@Estado", dr("Estado"))
-                End With
-                cmd.Connection = cn
-                res = cmd.ExecuteNonQuery
-            Next
-        End If
-
-        cmd.Dispose()
-        cn.Dispose()
-
-    End Sub
-
 
 
     Public Function NuevoDato(ByVal Coleccion As Collection, ByVal Diccionario As Dictionary(Of String, Collection), ByVal Codigo As String)
@@ -425,18 +121,17 @@ Public Class DAONotaEstructurada
             cmd.Transaction = myTrans
             With cmd.Parameters
                 .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-                .Add("@MontoInv", SqlDbType.Decimal).Value = Coleccion(1)
-                .Add("@FOper", SqlDbType.DateTime).Value = Coleccion(2)
-                .Add("@FVenc", SqlDbType.DateTime).Value = Coleccion(3)
-                .Add("@Tasa", SqlDbType.Decimal).Value = Coleccion(4)
-                .Add("@Plazo", SqlDbType.Int).Value = Coleccion(5)
-                .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(6)
-                .Add("@RendBr", SqlDbType.VarChar).Value = Coleccion(7)
-                .Add("@RendNet", SqlDbType.VarChar).Value = Coleccion(8)
-
-                .Add("@IngrBrutoTot", SqlDbType.Float).Value = Coleccion(9)
-                .Add("@IngrNetoTot", SqlDbType.Float).Value = Coleccion(10)
-                .Add("@Renta", SqlDbType.Float).Value = Coleccion(11)
+                .Add("@MontoInv", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(1).ToString)
+                .Add("@FOper", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@FVenc", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+                .Add("@Tasa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(5).ToString)
+                .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(6).ToString
+                .Add("@RendBr", SqlDbType.VarChar).Value = Coleccion(7).ToString
+                .Add("@RendNet", SqlDbType.VarChar).Value = Coleccion(8).ToString
+                .Add("@IngrBrutoTot", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(9).ToString)
+                .Add("@IngrNetoTot", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(10).ToString)
+                .Add("@Renta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(11).ToString)
             End With
 
             retorno = cmd.ExecuteNonQuery
@@ -483,13 +178,13 @@ Public Class DAONotaEstructurada
                     cmd.Transaction = myTrans
                     With cmd.Parameters
                         .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-                        .Add("@Correlativo", SqlDbType.Int).Value = Coleccion2(1)
-                        .Add("@Plazo", SqlDbType.Int).Value = Coleccion2(2)
-                        .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion2(3)
-                        .Add("@IngrBruto", SqlDbType.Decimal).Value = Coleccion2(4)
-                        .Add("@PorcImp", SqlDbType.Decimal).Value = Coleccion2(5)
-                        .Add("@MontoImp", SqlDbType.Decimal).Value = Coleccion2(6)
-                        .Add("@IngrNeto", SqlDbType.Decimal).Value = Coleccion2(7)
+                        .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(1).ToString)
+                        .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(2).ToString)
+                        .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion2(3).ToString)
+                        .Add("@IngrBruto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(4).ToString)
+                        .Add("@PorcImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(5).ToString)
+                        .Add("@MontoImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(6).ToString)
+                        .Add("@IngrNeto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(7).ToString)
                     End With
 
                     retorno = cmd.ExecuteNonQuery
@@ -573,13 +268,13 @@ Public Class DAONotaEstructurada
 
 
             .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-            .Add("@Correlativo", SqlDbType.Int).Value = Coleccion(1)
-            .Add("@Plazo", SqlDbType.Int).Value = Coleccion(2)
-            .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion(3)
-            .Add("@IngrBruto", SqlDbType.Decimal).Value = Coleccion(4)
-            .Add("@PorcImp", SqlDbType.Decimal).Value = Coleccion(5)
-            .Add("@MontoImp", SqlDbType.Decimal).Value = Coleccion(6)
-            .Add("@IngrNeto", SqlDbType.Decimal).Value = Coleccion(7)
+            .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(1).ToString)
+            .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(2).ToString)
+            .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+            .Add("@IngrBruto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+            .Add("@PorcImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+            .Add("@MontoImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@IngrNeto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
         End With
 
 
@@ -594,55 +289,6 @@ Public Class DAONotaEstructurada
 
 
 
-    Public Function ModificarElemento(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "UPDATE  [dbo].[NEST1] SET
-
-           [Plazo]=@Plazo
-           ,[Fecha]=@Fecha
-           ,[IngrBruto]=@IngrBruto
-           ,[PorcImp]=@PorcImp
-           ,[MontoImp]=@MontoImp
-           ,[IngrNeto]=@IngrNeto
-            where  [CodInv]=@CodInv AND [Correlativo]=@Correlativo
-
-    "
-
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-
-
-
-            .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-            .Add("@Correlativo", SqlDbType.Int).Value = Coleccion(1)
-            .Add("@Plazo", SqlDbType.Int).Value = Coleccion(2)
-            .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion(3)
-            .Add("@IngrBruto", SqlDbType.Decimal).Value = Coleccion(4)
-            .Add("@PorcImp", SqlDbType.Decimal).Value = Coleccion(5)
-            .Add("@MontoImp", SqlDbType.Decimal).Value = Coleccion(6)
-            .Add("@IngrNeto", SqlDbType.Decimal).Value = Coleccion(7)
-        End With
-
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Close()
-        Return retorno
-
-    End Function
 
 
     Public Sub EliminarElemento(ByVal Codigo As String)
@@ -717,18 +363,17 @@ Public Class DAONotaEstructurada
             cmd.Transaction = myTrans
             With cmd.Parameters
                 .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-                .Add("@MontoInv", SqlDbType.Decimal).Value = Coleccion(1)
-                .Add("@FOper", SqlDbType.DateTime).Value = Coleccion(2)
-                .Add("@FVenc", SqlDbType.DateTime).Value = Coleccion(3)
-                .Add("@Tasa", SqlDbType.Decimal).Value = Coleccion(4)
-                .Add("@Plazo", SqlDbType.Int).Value = Coleccion(5)
-                .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(6)
-                .Add("@RendBr", SqlDbType.VarChar).Value = Coleccion(7)
-                .Add("@RendNet", SqlDbType.VarChar).Value = Coleccion(8)
-
-                .Add("@IngrBrutoTot", SqlDbType.Float).Value = Coleccion(9)
-                .Add("@IngrNetoTot", SqlDbType.Float).Value = Coleccion(10)
-                .Add("@Renta", SqlDbType.Float).Value = Coleccion(11)
+                .Add("@MontoInv", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(1).ToString)
+                .Add("@FOper", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@FVenc", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+                .Add("@Tasa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(5).ToString)
+                .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(6).ToString
+                .Add("@RendBr", SqlDbType.VarChar).Value = Coleccion(7).ToString
+                .Add("@RendNet", SqlDbType.VarChar).Value = Coleccion(8).ToString
+                .Add("@IngrBrutoTot", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(9).ToString)
+                .Add("@IngrNetoTot", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(10).ToString)
+                .Add("@Renta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(11).ToString)
             End With
             retorno = cmd.ExecuteNonQuery
 
@@ -800,13 +445,13 @@ Public Class DAONotaEstructurada
                     cmd.Transaction = myTrans
                     With cmd.Parameters
                         .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-                        .Add("@Correlativo", SqlDbType.Int).Value = Coleccion2(1)
-                        .Add("@Plazo", SqlDbType.Int).Value = Coleccion2(2)
-                        .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion2(3)
-                        .Add("@IngrBruto", SqlDbType.Decimal).Value = Coleccion2(4)
-                        .Add("@PorcImp", SqlDbType.Decimal).Value = Coleccion2(5)
-                        .Add("@MontoImp", SqlDbType.Decimal).Value = Coleccion2(6)
-                        .Add("@IngrNeto", SqlDbType.Decimal).Value = Coleccion2(7)
+                        .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(1).ToString)
+                        .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(2).ToString)
+                        .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion2(3).ToString)
+                        .Add("@IngrBruto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(4).ToString)
+                        .Add("@PorcImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(5).ToString)
+                        .Add("@MontoImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(6).ToString)
+                        .Add("@IngrNeto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(7).ToString)
                     End With
 
                     retorno = cmd.ExecuteNonQuery
@@ -833,78 +478,10 @@ Public Class DAONotaEstructurada
         cn.Close()
 
         Return retorno
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
     End Function
 
 
 
-    'Public Sub EliminarDato(ByVal Codigo As String)
-    '    Dim sql As String
-    '    Dim cmd As SqlCommand
-    '    Dim res As Integer
-
-    '    sql = "DELETE FROM [dbo].[DAP0]
-    '  WHERE [CodInv]=@CodInv"
-
-
-
-    '    cn = objCon.Conectar
-
-    '    If Not cn.State = ConnectionState.Open Then
-    '        cn.Open()
-    '    End If
-
-    '    cmd = New SqlCommand
-    '    cmd.CommandText = sql
-    '    cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-    '    cmd.Connection = cn
-
-    '    res = cmd.ExecuteNonQuery
-
-    'End Sub
 
 
 

+ 15 - 315
DAO/DAOPropuestaInversion.vb

@@ -4,7 +4,7 @@ Public Class DAOPropuestaInversion
     Dim CambiarEstArbCE As New CambiarEstArbCE
     Dim da As SqlDataAdapter
     Dim Operaciones As New Operaciones
-    'Dim cmd As SqlCommand
+
 
 
     Function ExisteInstrumento(ByVal CodigoInversion As String)
@@ -28,105 +28,9 @@ Public Class DAOPropuestaInversion
         End If
     End Function
 
-    Public Function TraerMontosPrecio(ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim diccionario As New Dictionary(Of String, Collection)
-        Dim Coleccion As New Collection
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "SP_CargarMontoPrecio"
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        cmd.CommandType = CommandType.StoredProcedure
-
-        cmd.Parameters.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
-
-
-
-
-
-
-
-        Dim dr As SqlDataReader
-        Dim SumaVal As Double = 0
-        dr = cmd.ExecuteReader
-        Dim CodigoEmpresa As String = String.Empty
-        Dim CodigoInstrumento As String = String.Empty
-
-        Dim MontoPrimario As Double = 0
-
-        Dim MontoSecundario As Double = 0
-        Dim PrecioV As Double = 0
-        Dim precioC As Double = 0
-
-
-
-        While dr.Read
-            If String.IsNullOrEmpty(dr.GetName(0)) Then
-                Return Coleccion
-            End If
-
-
-
-            CodigoEmpresa = dr("CodigoEmpresa")
-            CodigoInstrumento = dr("CodigoInstrumento")
-
-
-            If Not String.IsNullOrEmpty(dr("MontoPrimario").ToString) Then
-                MontoPrimario = dr("MontoPrimario")
-            End If
-
-            If Not String.IsNullOrEmpty(dr("MontoSecundario").ToString) Then
-                MontoSecundario = dr("MontoSecundario")
-            End If
-
-            If Not String.IsNullOrEmpty(dr("PrecioV").ToString) Then
-                PrecioV = dr("PrecioV")
-            End If
-
-            If Not String.IsNullOrEmpty(dr("PrecioC").ToString) Then
-
-                precioC = dr("PrecioC")
-            End If
-
-
-
 
 
 
-            If CodigoInstrumento.IndexOf("REPO") > -1 Then
-                SumaVal += MontoPrimario
-
-            Else
-
-                Coleccion.Add(CodigoEmpresa)
-                Coleccion.Add(CodigoInstrumento)
-                Coleccion.Add(MontoPrimario)
-                Coleccion.Add(MontoSecundario)
-
-                Coleccion.Add(PrecioV)
-                Coleccion.Add(precioC)
-                Return Coleccion
-            End If
-
-        End While
-        Coleccion.Add(CodigoEmpresa)
-        Coleccion.Add(CodigoInstrumento)
-        Coleccion.Add(SumaVal)
-        Coleccion.Add(MontoSecundario)
-
-        Coleccion.Add(PrecioV)
-
-        Coleccion.Add(precioC)
-
-        cn.Close()
-        Return Coleccion
-    End Function
-
-
 
 
 
@@ -192,9 +96,7 @@ Public Class DAOPropuestaInversion
         da.Fill(ds, "Resultado")
         Return ds
 
-        ds.Dispose()
-        da.Dispose()
-        cn.Dispose()
+
 
     End Function
 
@@ -644,9 +546,7 @@ Public Class DAOPropuestaInversion
 
         Return ds
 
-        ds.Dispose()
-        da.Dispose()
-        cn.Dispose()
+
 
     End Function
 
@@ -1151,201 +1051,11 @@ Public Class DAOPropuestaInversion
 
 
 
-    Public Function SoloNuevaPropuesta(ByVal ObjPropuesta As CEPropuestaInversion, ByVal CodigoPrincipal As String, ByVal CodigoSecundario As String)
-        Dim objCon As New Conexion
-        Dim Transaccion As SqlTransaction
-        Dim query As String
-        Dim Retornar As Boolean
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-
-        Dim NuevoDocId As Integer
-
-
-
-
-        Dim cmd As SqlCommand = cn.CreateCommand
-
-        Transaccion = cn.BeginTransaction("NuevaPropuesta")
-
-        cmd.Connection = cn
-        cmd.Transaction = Transaccion
-
-        'TRAE ULTIMO DOCID
-        cmd.CommandText = "SELECT ISNULL(MAX(DocId),0) FROM [dbo].[PIN0]"
-        NuevoDocId = cmd.ExecuteScalar()
-        NuevoDocId = NuevoDocId + 1
-
-
-        query = "INSERT INTO [dbo].[PIN0]
-           ([CodInv]
-            ,[VCodInv]
-           ,[DocEst]
-           ,[Asunto]
-           ,[CodEmpr]
-           ,[CodIF]
-           ,[CodEmis]
-           ,[CodCalRi]
-           ,[CodECalRi]
-           ,[OFon]
-           ,[Coment]
-           ,[Just]
-           ,[TipoOper]
-           ,[MontoInv]
-           ,[Precio]
-           ,[Rendimiento]
-           ,[Plazo]
-           ,[PlazoFact]
-           ,[Ingresos]
-           ,[FechaDoc]
-           ,[AutEstado]
-           ,[TipoMerc]
-           ,[CodPais]
-           ,[TipoRenta]
-           ,[TipoTasa]
-           ,[Periodicidad]
-           ,[NombreManual]
-            
-
-)
-     VALUES
-           (@CodInv
-            ,@VCodInv
-           ,@DocEst
-           ,@Asunto
-           ,@CodEmpr
-           ,@CodIF
-           ,@CodEmis
-           ,@CodCalRi
-           ,@CodECalRi
-           ,@OFon
-           ,@Coment
-           ,@Just
-           ,@TipoOper
-           ,@MontoInv
-           ,@Precio
-           ,@Rendimiento
-           ,@Plazo
-           ,@PlazoFact
-           ,@Ingresos
-           ,@FechaDoc
-           ,@AutEstado
-           ,@TipoMerc
-           ,@CodPais
-           ,@TipoRenta
-           ,@TipoTasa
-           ,@Periodicidad
-           ,@NombreManual
-		   )"
-
-        cmd.CommandText = query
-
-        With cmd.Parameters
-
-            .Add("@CodInv", SqlDbType.VarChar).Value = CodigoPrincipal
-            .Add("@VCodInv", SqlDbType.VarChar).Value = CodigoSecundario
-            .Add("@DocEst", SqlDbType.VarChar).Value = ObjPropuesta.EstadoDocumento.ToString
-            .Add("@Asunto", SqlDbType.VarChar).Value = ObjPropuesta.Asunto.ToString
-            .Add("@CodEmpr", SqlDbType.VarChar).Value = ObjPropuesta.CodigoEmpresa.ToString
-            .Add("@CodIF", SqlDbType.VarChar).Value = ObjPropuesta.CodigoInstrumentoFinanciero.ToString
-            .Add("@CodEmis", SqlDbType.Int).Value = ObjPropuesta.CodigoEmisor.ToString
-            .Add("@CodCalRi", SqlDbType.VarChar).Value = ObjPropuesta.CodigoCalificacionDeRiesgo.ToString
-            .Add("@CodECalRi", SqlDbType.VarChar).Value = ObjPropuesta.CodigoEmpresaCalificadora.ToString
-            .Add("@OFon", SqlDbType.VarChar).Value = ObjPropuesta.OrigenDeFondos.ToString
-            .Add("@Coment", SqlDbType.VarChar).Value = ObjPropuesta.Comentarios.ToString
-            .Add("@Just", SqlDbType.VarChar).Value = ObjPropuesta.Justificacion.ToString
-            .Add("@TipoOper", SqlDbType.VarChar).Value = ObjPropuesta.TipoOperacion.ToString
-            .Add("@MontoInv", SqlDbType.Float).Value = ObjPropuesta.MontoInversion.ToString
-            .Add("@Precio", SqlDbType.Float).Value = ObjPropuesta.Precio.ToString
-            .Add("@Rendimiento", SqlDbType.Float).Value = ObjPropuesta.Rendimiento.ToString
-            .Add("@Plazo", SqlDbType.Int).Value = ObjPropuesta.PlazoNumero.ToString
-            .Add("@PlazoFact", SqlDbType.VarChar).Value = ObjPropuesta.PlazoFactor.ToString
-            .Add("@Ingresos", SqlDbType.Float).Value = ObjPropuesta.Ingresos.ToString
-            .Add("@FechaDoc", SqlDbType.Date).Value = ObjPropuesta.FechaDocumento.ToString
-            .Add("@AutEstado", SqlDbType.VarChar).Value = ObjPropuesta.EstadoAutorizacion.ToString
-            .Add("@TipoMerc", SqlDbType.VarChar).Value = ObjPropuesta.TipoMercado.ToString
-            .Add("@CodPais", SqlDbType.VarChar).Value = ObjPropuesta.Pais.ToString
-
-            .Add("@TipoRenta", SqlDbType.VarChar).Value = ObjPropuesta.TipoRenta.ToString
-            .Add("@TipoTasa", SqlDbType.VarChar).Value = ObjPropuesta.TipoTasa.ToString
-            .Add("@Periodicidad", SqlDbType.VarChar).Value = ObjPropuesta.Periodicidad.ToString
-            .Add("@NombreManual", SqlDbType.VarChar).Value = ObjPropuesta.NombreManual.ToString
-        End With
-        cmd.ExecuteNonQuery()
-
-
-        cmd = New SqlCommand
 
 
 
 
 
-        query = "INSERT INTO [dbo].[Propuesta]
-           ([CodigoPropuesta]
-            ,[Nombre]
-            ,[Descrip]
-            ,[Estado]
-)
-     VALUES
-           (@CodigoPropuesta
-            ,@Nombre
-            ,@Descrip
-            ,@Estado
-		   )"
-
-
-
-
-
-        cmd.CommandText = query
-        cmd.Connection = cn
-        cmd.Transaction = Transaccion
-
-        With cmd.Parameters
-            .Add("@CodigoPropuesta", SqlDbType.VarChar).Value = CodigoPrincipal
-            .Add("@Nombre", SqlDbType.VarChar).Value = "ProCre"
-            .Add("@Descrip", SqlDbType.VarChar).Value = "Propuesta de Inversion Inicial Creada"
-            .Add("@Estado", SqlDbType.VarChar).Value = "En Propuesta"
-        End With
-
-
-        Retornar = cmd.ExecuteNonQuery
-
-
-        Try
-
-            Transaccion.Commit()
-            MsgBox("Registro Guardado")
-            Retornar = True
-
-
-
-        Catch ex As Exception
-            MsgBox("Error en Transaccion: " & ex.GetType.ToString)
-            MsgBox("Mensaje: " & ex.Message)
-
-            Try
-                Transaccion.Rollback()
-            Catch ex2 As Exception
-                MsgBox("Error en Rollback: " & ex.GetType.ToString)
-                MsgBox("Mensaje Rollbak: " & ex.Message)
-            End Try
-            Retornar = False
-        End Try
-
-        cmd.Dispose()
-        da.Dispose()
-        cn.Dispose()
-
-        Return Retornar
-    End Function
-
-
-
-
 
 
 
@@ -1464,32 +1174,29 @@ Public Class DAOPropuestaInversion
                 oPropuesta.Asunto = drd.Item("Asunto").ToString
                 oPropuesta.CodigoEmpresa = drd.Item("CodEmpr").ToString
                 oPropuesta.CodigoInstrumentoFinanciero = drd.Item("CodIF").ToString
-                oPropuesta.CodigoEmisor = drd.Item("CodEmis").ToString
+                oPropuesta.CodigoEmisor = Operaciones.ConvertirEntero(drd.Item("CodEmis").ToString)
                 oPropuesta.CodigoCalificacionDeRiesgo = drd.Item("CodCalRi").ToString
                 oPropuesta.CodigoEmpresaCalificadora = drd.Item("CodECalRi").ToString
                 oPropuesta.OrigenDeFondos = drd.Item("OFon").ToString
                 oPropuesta.Justificacion = drd.Item("Just").ToString
                 oPropuesta.Comentarios = drd.Item("Coment").ToString
-                oPropuesta.MontoInversion = drd.Item("MontoInv").ToString
-                oPropuesta.Precio = drd.Item("Precio").ToString
-                oPropuesta.Rendimiento = drd.Item("Rendimiento").ToString
-                oPropuesta.PlazoNumero = drd.Item("Plazo").ToString
+                oPropuesta.MontoInversion = Operaciones.ConvertirDecimal(drd.Item("MontoInv").ToString)
+                oPropuesta.Precio = Operaciones.ConvertirDecimal(drd.Item("Precio").ToString)
+                oPropuesta.Rendimiento = Operaciones.ConvertirDecimal(drd.Item("Rendimiento").ToString)
+                oPropuesta.PlazoNumero = Operaciones.ConvertirEntero(drd.Item("Plazo").ToString)
                 oPropuesta.PlazoFactor = drd.Item("PlazoFact").ToString
-                oPropuesta.Ingresos = drd.Item("Ingresos").ToString
-                oPropuesta.FechaDocumento = drd.Item("FechaDoc").ToString
+                oPropuesta.Ingresos = Operaciones.ConvertirDecimal(drd.Item("Ingresos").ToString)
+                oPropuesta.FechaDocumento = Operaciones.ConvertirFecha(drd.Item("FechaDoc").ToString)
                 oPropuesta.EstadoAutorizacion = drd.Item("AutEstado").ToString
                 oPropuesta.TipoMercado = drd.Item("TipoMerc").ToString
                 oPropuesta.Pais = drd.Item("CodPais").ToString
-
-
                 oPropuesta.TipoRenta = drd.Item("TipoRenta").ToString
                 oPropuesta.TipoTasa = drd.Item("TipoTasa").ToString
                 oPropuesta.Periodicidad = drd.Item("Periodicidad").ToString
                 oPropuesta.NombreManual = drd.Item("NombreManual").ToString
-                oPropuesta.IdFlujo = Operaciones.ConvertirDecimal(drd.Item("IdFlujo").ToString)
-                oPropuesta.IdEA = Operaciones.ConvertirDecimal(drd.Item("IdEA").ToString)
+                oPropuesta.IdFlujo = Operaciones.ConvertirEntero(Operaciones.ConvertirDecimal(drd.Item("IdFlujo").ToString))
+                oPropuesta.IdEA = Operaciones.ConvertirEntero(Operaciones.ConvertirDecimal(drd.Item("IdEA").ToString))
                 oPropuesta.EstadoReporto = drd.Item("EstadoReporto").ToString
-
                 oPropuesta.CodigoAsociado = drd.Item("CodigoAsociado").ToString
             End If
             drd.Close()
@@ -1697,23 +1404,17 @@ Public Class DAOPropuestaInversion
             oCEInversion.Pais = oCEPropuesta.Pais
             oCEInversion.TipoMercado = oCEPropuesta.TipoMercado
             oCEInversion.DocumentoBase = oCEPropuesta.IdDeDocumento
-
             oCEInversion.EstadoDocumento = oCEPropuesta.EstadoDocumento
-
-
-
             oCEInversion.NombreManual = oCEPropuesta.NombreManual
             oCEInversion.TipoRenta = oCEPropuesta.TipoRenta
             oCEInversion.TipoTasa = oCEPropuesta.TipoTasa
             oCEInversion.Periodicidad = oCEPropuesta.Periodicidad
-
             oCEInversion.PlazoFactor = oCEPropuesta.PlazoFactor
             oCEInversion.PlazoNumero = oCEPropuesta.PlazoNumero
             oCEInversion.OFondo = oCEPropuesta.OrigenDeFondos
             oCEInversion.CodigoCompra = oCEPropuesta.CodigoCompra
             oCEInversion.EstadoProceso = "R"
             oCEInversion.FechaDocumento = oCEPropuesta.FechaDocumento
-
             oCEInversion.EstadoReporto = oCEPropuesta.EstadoReporto
 
             If oCEPropuesta.EstadoReporto = "SECUNDARIO" Then
@@ -1726,19 +1427,18 @@ Public Class DAOPropuestaInversion
             vResNuevo = oDAOInversion.Nuevo(oCEInversion)
 
             If vResNuevo > 0 Then
-                'MsgBox("Completado.")
-                'CERRAR PROPUESTA
+
                 Cerrar(IdPropuesta)
                 vRetorno = 1
             Else
-                'NO SE PUDO
+
                 vRetorno = -2
                 MsgBox("Falla al convertir en Inversion")
             End If
 
 
         Else
-            'NO ES NADA
+
             vRetorno = -1
         End If
 

+ 49 - 475
DAO/DepositosAPlazoDAO.vb

@@ -1,209 +1,9 @@
 Imports System.Data.SqlClient
 Public Class DepositosAPlazoDAO
 
+    Dim Operaciones As New Operaciones
 
-    Function Nuevo(ByVal oDAPCE As DepositosAPlazoCE) As Integer
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-        sql = "INSERT INTO [dbo].[DAP0]
-           ([CodInv]
-           ,[MontoInv]
-           ,[FOper]
-           ,[FVenc]
-           ,[Tasa]
-           ,[Plazo]
-           --,[AnBase]
-           ,[Periodic])
-     VALUES
-           (@CodInv
-           ,@MontoInv
-           ,@FOper
-           ,@FVenc
-           ,@Tasa
-           ,@Plazo
-           --,@AnBase
-           ,@Periodic)
-"
-
-        cmd = New SqlCommand
-        cmd.Connection = cn
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = oDAPCE.CodigoInversion
-            .Add("@MontoInv", SqlDbType.Float).Value = oDAPCE.MontoDeInversion
-            .Add("@FOper", SqlDbType.Date).Value = oDAPCE.FechaOperacion
-            .Add("@FVenc", SqlDbType.Date).Value = oDAPCE.FechaVencimiento
-            .Add("@Tasa", SqlDbType.Float).Value = oDAPCE.Tasa
-            .Add("@Plazo", SqlDbType.Int).Value = oDAPCE.Plazo
-            '.Add("@AnBase",SqlDbType.VarChar).Value = oDAPCE.CodigoInversion
-            .Add("@Periodic", SqlDbType.VarChar).Value = oDAPCE.Periodicidad
-        End With
-
-        retorno = cmd.ExecuteNonQuery
-
-        cmd.Dispose()
-        cn.Dispose()
-
-        GuardaIntereses(oDAPCE.CodigoInversion, oDAPCE.dtIntereses)
 
-        Return retorno
-    End Function
-    Function Nuevo(ByVal oDAP As DepositosAPlazoCE, DocId As Integer, Tipo As String) As Integer
-        Dim objCon As New Conexion
-        Dim retorno As Integer = -1
-        Dim Transaccion As SqlTransaction
-        Dim query As String
-        Dim Tabla As String = ""
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-        If Tipo = "P" Then
-            Tabla = "PDAP0"
-        End If
-        If Tipo = "I" Then
-            Tabla = "IDAP0"
-        End If
-
-        Dim cmd As SqlCommand = cn.CreateCommand
-
-        Transaccion = cn.BeginTransaction("NuevoDAP")
-        cmd.Connection = cn
-        cmd.Transaction = Transaccion
-
-        query = "INSERT INTO [dbo].[" & Tabla & "]
-           ([DocId]
-           ,[MontoInv]
-           ,[FOper]
-           ,[FVenc]
-           ,[Tasa]
-           ,[Plazo]
-           ,[AnBase]
-           ,[Periodic]
-           ,[RendBruto]
-           ,[RendNeto]
-           ,[IngrBruto]
-           ,[Impuestos]
-           ,[IngrNeto])
-     VALUES
-           (@DocId
-           ,@MontoInv
-           ,@FOper
-           ,@FVenc
-           ,@Tasa
-           ,@Plazo
-           ,@AnBase
-           ,@Periodic
-           ,@RendBruto
-           ,@RendNeto
-           ,@IngrBruto
-           ,@Impuestos
-           ,@IngrNeto
-		  )"
-
-        cmd.CommandText = query
-
-        With cmd.Parameters
-            .Add("@DocId", SqlDbType.Int).Value = DocId
-            .Add("@MontoInv", SqlDbType.Decimal).Value = oDAP.MontoDeInversion
-            .Add("@FOper", SqlDbType.Date).Value = oDAP.FechaOperacion
-            .Add("@FVenc", SqlDbType.Date).Value = oDAP.FechaVencimiento
-            .Add("@Tasa", SqlDbType.Decimal).Value = oDAP.Tasa
-            .Add("@Plazo", SqlDbType.Int).Value = oDAP.Plazo
-            .Add("@AnBase", SqlDbType.Int).Value = oDAP.AnioBase
-            .Add("@Periodic", SqlDbType.NVarChar).Value = oDAP.Periodicidad
-            .Add("@RendBruto", SqlDbType.Decimal).Value = oDAP.RendimientoBruto
-            .Add("@RendNeto", SqlDbType.Decimal).Value = oDAP.RendimientoNeto
-            .Add("@IngrBruto", SqlDbType.Decimal).Value = oDAP.IngresoBruto
-            .Add("@Impuestos", SqlDbType.Decimal).Value = oDAP.Impuestos
-            .Add("@IngrNeto", SqlDbType.Decimal).Value = oDAP.IngresoNeto
-        End With
-
-        Try
-            cmd.ExecuteNonQuery()
-            Transaccion.Commit()
-            retorno = 0
-        Catch ex As Exception
-            MsgBox("Error al Guardar DAP : " & ex.GetType.ToString)
-            MsgBox("Mensaje: " & ex.Message)
-            retorno = 1
-            Try
-                Transaccion.Rollback()
-                retorno = 2
-            Catch ex2 As Exception
-                MsgBox("Error en Rollback: " & ex2.GetType.ToString)
-                MsgBox("Mensaje Rollbak: " & ex2.Message)
-                retorno = 3
-            End Try
-        End Try
-
-        cmd.Dispose()
-        cn.Dispose()
-
-
-        Return retorno
-    End Function
-
-    Public Sub CargarRegistro(ByVal oDAP As DepositosAPlazoCE, Tipo As String, IdRegistro As Integer)
-        Dim objCon As New Conexion
-        Dim drd As SqlDataReader
-        Dim cmd As SqlCommand
-        Dim sql As String
-        Dim Tabla As String
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        If Tipo = "P" Then
-            Tabla = "PDAP0"
-        End If
-        If Tipo = "I" Then
-            Tabla = "IDAP0"
-        End If
-
-        sql = "SELECT * FROM [dbo].[" & Tabla & "] T0 WHERE T0.[DocId]=@DocId"
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@DocId", SqlDbType.Int).Value = IdRegistro
-        cmd.Connection = cn
-
-        drd = cmd.ExecuteReader
-
-        If drd.HasRows Then
-            'SE ENCONTRO EL REGISTRO
-            If drd.Read Then
-                oDAP.MontoDeInversion = drd.Item("MontoInv")
-                oDAP.FechaOperacion = drd.Item("FOper")
-                oDAP.FechaVencimiento = drd.Item("FVenc")
-                oDAP.Tasa = drd.Item("Tasa")
-                oDAP.Plazo = drd.Item("Plazo")
-                oDAP.AnioBase = drd.Item("AnBase")
-                oDAP.Periodicidad = drd.Item("Periodic")
-                'oDAP.RendimientoBruto = drd.Item("RendBruto")
-                'oDAP.RendimientoNeto = drd.Item("RendNeto")
-                oDAP.IngresoBruto = drd.Item("IngrBruto")
-                oDAP.Impuestos = drd.Item("Impuestos")
-                oDAP.IngresoNeto = drd.Item("IngrNeto")
-            End If
-        Else
-            'NO SE ENCONTRO EL REGISTRO
-        End If
-        drd.Close()
-        cmd.Dispose()
-        cn.Dispose()
-
-    End Sub
     Public Function CargarRegistro(ByVal vCodigoInversion As String) As DepositosAPlazoCE
         Dim objCon As New Conexion
         Dim oDAPCE As New DepositosAPlazoCE
@@ -235,11 +35,11 @@ Public Class DepositosAPlazoDAO
             'SE ENCONTRO EL REGISTRO
             If drd.Read Then
                 oDAPCE.CodigoInversion = vCodigoInversion.ToString
-                oDAPCE.MontoDeInversion = drd.Item("MontoInv").ToString
-                oDAPCE.FechaOperacion = drd.Item("FOper").ToString
-                oDAPCE.FechaVencimiento = drd.Item("FVenc").ToString
-                oDAPCE.Tasa = drd.Item("Tasa").ToString
-                oDAPCE.Plazo = drd.Item("Plazo").ToString
+                oDAPCE.MontoDeInversion = Operaciones.ConvertirDecimal(drd.Item("MontoInv").ToString)
+                oDAPCE.FechaOperacion = Operaciones.ConvertirFecha(drd.Item("FOper").ToString)
+                oDAPCE.FechaVencimiento = Operaciones.ConvertirFecha(drd.Item("FVenc").ToString)
+                oDAPCE.Tasa = Operaciones.ConvertirDecimal(drd.Item("Tasa").ToString)
+                oDAPCE.Plazo = Operaciones.ConvertirDecimal(drd.Item("Plazo").ToString)
                 oDAPCE.Periodicidad = drd.Item("Periodic").ToString
 
             End If
@@ -255,114 +55,8 @@ Public Class DepositosAPlazoDAO
 
     End Function
 
-    Public Function Actualizar(ByVal oDAPCE As DepositosAPlazoCE) As Integer
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim retorno As Integer
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-        sql = "UPDATE [dbo].[DAP0]
-   SET [MontoInv] = @MontoInv
-      ,[FOper] = @FOper
-      ,[FVenc] = @FVenc
-      ,[Tasa] = @Tasa
-      ,[Plazo] = @Plazo
-      --,[AnBase] = @AnBase
-      ,[Periodic] = @Periodic
- WHERE [CodInv] = @CodInv"
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-
-
-        With cmd.Parameters
-            .Add("@MontoInv", SqlDbType.Float).Value = oDAPCE.MontoDeInversion
-            .Add("@FOper", SqlDbType.Date).Value = oDAPCE.FechaOperacion
-            .Add("@FVenc", SqlDbType.Date).Value = oDAPCE.FechaVencimiento
-            .Add("@Tasa", SqlDbType.Float).Value = oDAPCE.Tasa
-            .Add("@Plazo", SqlDbType.Int).Value = oDAPCE.Plazo
-            .Add("@Periodic", SqlDbType.VarChar).Value = oDAPCE.Periodicidad
-        End With
-
-        cmd.Connection = cn
-        retorno = cmd.ExecuteNonQuery
-
-        cmd.Dispose()
-        cn.Dispose()
-
-        GuardaIntereses(oDAPCE.CodigoInversion, oDAPCE.dtIntereses)
-
-        Return retorno
-    End Function
-    Private Sub GuardaIntereses(ByVal vCodInversion As String, dt As DataTable)
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim res As Integer
-
-        sql = "DELETE FROM [dbo].[DAP1]
-      WHERE [CodInv]=@CodInv"
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = vCodInversion
-
-
-        cmd.Connection = cn
-        res = cmd.ExecuteNonQuery
-        sql = String.Empty
-
-        If dt.Rows.Count > 0 Then
-            For Each dr In dt.Rows
-                cmd = New SqlCommand
-                sql = "INSERT INTO [dbo].[DAP1]
-           ([CodInv]
-           ,[Plazo]
-           ,[Fecha]
-           ,[IngrBruto]
-           ,[PorcImp]
-           ,[MontoImp]
-           ,[IngrNeto]
-           ,[Estado])
-     VALUES
-           (@CodInv
-           ,@Plazo
-           ,@Fecha
-           ,@IngrBruto
-           ,@PorcImp
-           ,@MontoImp
-           ,@IngrNeto
-           ,@Estado)"
-
-                cmd.CommandText = sql
-                With cmd.Parameters
-                    .AddWithValue("@CodInv", vCodInversion)
-                    .AddWithValue("@Plazo", dr("Plazo"))
-                    .AddWithValue("@Fecha", dr("Fecha"))
-                    .AddWithValue("@IngrBruto", dr("IngrBruto"))
-                    .AddWithValue("@PorcImp", dr("PorcImp"))
-                    .AddWithValue("@MontoImp", dr("MontoImp"))
-                    .AddWithValue("@IngrNeto", dr("IngrNeto"))
-                    .AddWithValue("@Estado", dr("Estado"))
-                End With
-                cmd.Connection = cn
-                res = cmd.ExecuteNonQuery
-            Next
-        End If
 
-        cmd.Dispose()
-        cn.Dispose()
 
-    End Sub
 
 
 
@@ -422,18 +116,17 @@ Public Class DepositosAPlazoDAO
             cmd.Transaction = myTrans
             With cmd.Parameters
                 .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-                .Add("@MontoInv", SqlDbType.Decimal).Value = Coleccion(1)
-                .Add("@FOper", SqlDbType.DateTime).Value = Coleccion(2)
-                .Add("@FVenc", SqlDbType.DateTime).Value = Coleccion(3)
-                .Add("@Tasa", SqlDbType.Decimal).Value = Coleccion(4)
-                .Add("@Plazo", SqlDbType.Int).Value = Coleccion(5)
-                .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(6)
-                .Add("@RendBr", SqlDbType.VarChar).Value = Coleccion(7)
-                .Add("@RendNet", SqlDbType.VarChar).Value = Coleccion(8)
-
-                .Add("@IngrBrutoTot", SqlDbType.Float).Value = Coleccion(9)
-                .Add("@IngrNetoTot", SqlDbType.Float).Value = Coleccion(10)
-                .Add("@Renta", SqlDbType.Float).Value = Coleccion(11)
+                .Add("@MontoInv", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(1).ToString)
+                .Add("@FOper", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@FVenc", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+                .Add("@Tasa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(5).ToString)
+                .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(6).ToString
+                .Add("@RendBr", SqlDbType.VarChar).Value = Coleccion(7).ToString
+                .Add("@RendNet", SqlDbType.VarChar).Value = Coleccion(8).ToString
+                .Add("@IngrBrutoTot", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(9).ToString)
+                .Add("@IngrNetoTot", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(10).ToString)
+                .Add("@Renta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(11).ToString)
             End With
 
             retorno = cmd.ExecuteNonQuery
@@ -480,13 +173,13 @@ Public Class DepositosAPlazoDAO
                     cmd.Transaction = myTrans
                     With cmd.Parameters
                         .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-                        .Add("@Correlativo", SqlDbType.Int).Value = Coleccion2(1)
-                        .Add("@Plazo", SqlDbType.Int).Value = Coleccion2(2)
-                        .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion2(3)
-                        .Add("@IngrBruto", SqlDbType.Decimal).Value = Coleccion2(4)
-                        .Add("@PorcImp", SqlDbType.Decimal).Value = Coleccion2(5)
-                        .Add("@MontoImp", SqlDbType.Decimal).Value = Coleccion2(6)
-                        .Add("@IngrNeto", SqlDbType.Decimal).Value = Coleccion2(7)
+                        .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(1).ToString)
+                        .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(2).ToString)
+                        .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion2(3).ToString)
+                        .Add("@IngrBruto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(4).ToString)
+                        .Add("@PorcImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(5).ToString)
+                        .Add("@MontoImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(6).ToString)
+                        .Add("@IngrNeto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(7).ToString)
                     End With
 
                     retorno = cmd.ExecuteNonQuery
@@ -570,13 +263,13 @@ Public Class DepositosAPlazoDAO
 
 
             .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-            .Add("@Correlativo", SqlDbType.Int).Value = Coleccion(1)
-            .Add("@Plazo", SqlDbType.Int).Value = Coleccion(2)
-            .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion(3)
-            .Add("@IngrBruto", SqlDbType.Decimal).Value = Coleccion(4)
-            .Add("@PorcImp", SqlDbType.Decimal).Value = Coleccion(5)
-            .Add("@MontoImp", SqlDbType.Decimal).Value = Coleccion(6)
-            .Add("@IngrNeto", SqlDbType.Decimal).Value = Coleccion(7)
+            .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(1).ToString)
+            .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(2).ToString)
+            .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+            .Add("@IngrBruto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+            .Add("@PorcImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+            .Add("@MontoImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@IngrNeto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
         End With
 
 
@@ -591,55 +284,6 @@ Public Class DepositosAPlazoDAO
 
 
 
-    Public Function ModificarElemento(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "UPDATE  [dbo].[DAP1] SET
-
-           [Plazo]=@Plazo
-           ,[Fecha]=@Fecha
-           ,[IngrBruto]=@IngrBruto
-           ,[PorcImp]=@PorcImp
-           ,[MontoImp]=@MontoImp
-           ,[IngrNeto]=@IngrNeto
-            where  [CodInv]=@CodInv AND [Correlativo]=@Correlativo
-
-    "
-
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-
-
-
-            .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-            .Add("@Correlativo", SqlDbType.Int).Value = Coleccion(1)
-            .Add("@Plazo", SqlDbType.Int).Value = Coleccion(2)
-            .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion(3)
-            .Add("@IngrBruto", SqlDbType.Decimal).Value = Coleccion(4)
-            .Add("@PorcImp", SqlDbType.Decimal).Value = Coleccion(5)
-            .Add("@MontoImp", SqlDbType.Decimal).Value = Coleccion(6)
-            .Add("@IngrNeto", SqlDbType.Decimal).Value = Coleccion(7)
-        End With
-
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Close()
-        Return retorno
-
-    End Function
 
 
     Public Sub EliminarElemento(ByVal Codigo As String)
@@ -714,18 +358,17 @@ Public Class DepositosAPlazoDAO
             cmd.Transaction = myTrans
             With cmd.Parameters
                 .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-                .Add("@MontoInv", SqlDbType.Decimal).Value = Coleccion(1)
-                .Add("@FOper", SqlDbType.DateTime).Value = Coleccion(2)
-                .Add("@FVenc", SqlDbType.DateTime).Value = Coleccion(3)
-                .Add("@Tasa", SqlDbType.Decimal).Value = Coleccion(4)
-                .Add("@Plazo", SqlDbType.Int).Value = Coleccion(5)
-                .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(6)
-                .Add("@RendBr", SqlDbType.VarChar).Value = Coleccion(7)
-                .Add("@RendNet", SqlDbType.VarChar).Value = Coleccion(8)
-
-                .Add("@IngrBrutoTot", SqlDbType.Float).Value = Coleccion(9)
-                .Add("@IngrNetoTot", SqlDbType.Float).Value = Coleccion(10)
-                .Add("@Renta", SqlDbType.Float).Value = Coleccion(11)
+                .Add("@MontoInv", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(1).ToString)
+                .Add("@FOper", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@FVenc", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+                .Add("@Tasa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(5).ToString)
+                .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(6).ToString
+                .Add("@RendBr", SqlDbType.VarChar).Value = Coleccion(7).ToString
+                .Add("@RendNet", SqlDbType.VarChar).Value = Coleccion(8).ToString
+                .Add("@IngrBrutoTot", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(9).ToString)
+                .Add("@IngrNetoTot", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(10).ToString)
+                .Add("@Renta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(11).ToString)
             End With
             retorno = cmd.ExecuteNonQuery
 
@@ -797,13 +440,13 @@ Public Class DepositosAPlazoDAO
                     cmd.Transaction = myTrans
                     With cmd.Parameters
                         .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-                        .Add("@Correlativo", SqlDbType.Int).Value = Coleccion2(1)
-                        .Add("@Plazo", SqlDbType.Int).Value = Coleccion2(2)
-                        .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion2(3)
-                        .Add("@IngrBruto", SqlDbType.Decimal).Value = Coleccion2(4)
-                        .Add("@PorcImp", SqlDbType.Decimal).Value = Coleccion2(5)
-                        .Add("@MontoImp", SqlDbType.Decimal).Value = Coleccion2(6)
-                        .Add("@IngrNeto", SqlDbType.Decimal).Value = Coleccion2(7)
+                        .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(1).ToString)
+                        .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(2).ToString)
+                        .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion2(3).ToString)
+                        .Add("@IngrBruto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(4).ToString)
+                        .Add("@PorcImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(5).ToString)
+                        .Add("@MontoImp", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(6).ToString)
+                        .Add("@IngrNeto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion2(7).ToString)
                     End With
 
                     retorno = cmd.ExecuteNonQuery
@@ -830,79 +473,10 @@ Public Class DepositosAPlazoDAO
         cn.Close()
 
         Return retorno
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
     End Function
 
 
 
-    'Public Sub EliminarDato(ByVal Codigo As String)
-    '    Dim sql As String
-    '    Dim cmd As SqlCommand
-    '    Dim res As Integer
-
-    '    sql = "DELETE FROM [dbo].[DAP0]
-    '  WHERE [CodInv]=@CodInv"
-
-
-
-    '    cn = objCon.Conectar
-
-    '    If Not cn.State = ConnectionState.Open Then
-    '        cn.Open()
-    '    End If
-
-    '    cmd = New SqlCommand
-    '    cmd.CommandText = sql
-    '    cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-    '    cmd.Connection = cn
-
-    '    res = cmd.ExecuteNonQuery
-
-    'End Sub
-
 
 
     Public Sub Eliminar(ByVal Codigo As String)

+ 0 - 260
DAO/FondoInversionDAO.vb

@@ -6,68 +6,6 @@ Public Class FondoInversionDAO
     Dim Operaciones As New Operaciones
 
 
-    Public Function Modificar(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-
-
-
-        sql = "UPDATE [dbo].[FINV]
-       SET 
-           [CuoPart]=@CuoPart
-           ,[VaPart]=@VaPart
-           ,[CoCasa]=@CoCasa
-           ,[CoBolsa]=@CoBolsa
-           ,[DiasLiq]=@DiasLiq
-           ,[FechaOpe]=@FechaOpe
-           ,[FechaVen]=@FechaVen
-           ,[Periodic]=@Periodic
-           ,[Base]=@Base
-           ,[PlaInv]=@PlaInv
-           ,[RendOfre]=@RendOfre
-           ,[Dividendo]=@Dividendo
-   where [CodInv]=@CodInv  "
-
-
-
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-
-            .Add("@CuoPart", SqlDbType.Float).Value = CDec(Coleccion(1).TrimEnd("%"))
-            .Add("@VaPart", SqlDbType.Float).Value = CDec(Coleccion(2).TrimEnd("%"))
-            .Add("@CoCasa", SqlDbType.Float).Value = CDec(Coleccion(3).TrimEnd("%"))
-            .Add("@CoBolsa", SqlDbType.Float).Value = CDec(Coleccion(4).TrimEnd("%"))
-            .Add("@DiasLiq", SqlDbType.Int).Value = CInt(Coleccion(5))
-            .Add("@FechaOpe", SqlDbType.DateTime).Value = CDate(Coleccion(6))
-            .Add("@FechaVen", SqlDbType.DateTime).Value = CDate(Coleccion(7))
-            .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(8).ToString
-            .Add("@Base", SqlDbType.Int).Value = CInt(Coleccion(9))
-            .Add("@PlaInv", SqlDbType.VarChar).Value = Coleccion(10).ToString
-            .Add("@RendOfre", SqlDbType.Float).Value = CDec(Coleccion(11).TrimEnd("%"))
-            .Add("@Dividendo", SqlDbType.Float).Value = CDec(Coleccion(12).TrimEnd("%"))
-            .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-        End With
-
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Close()
-        Return retorno
-
-    End Function
 
 
     Public Function ProcesoDatos(ByVal Coleccion As Collection, ByVal Codigo As String, ByVal Diccionario As Dictionary(Of String, Collection), ByVal Estado As String)
@@ -304,79 +242,6 @@ Public Class FondoInversionDAO
     End Function
 
 
-    Public Function Nuevo(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "INSERT INTO [dbo].[FINV](
-
-           [CuoPart]
-           ,[VaPart]
-           ,[CoCasa]
-           ,[CoBolsa]
-           ,[DiasLiq]
-           ,[FechaOpe]
-           ,[FechaVen]
-           ,[Periodic]
-           ,[Base]
-           ,[PlaInv]
-           ,[RendOfre]
-           ,[Dividendo]
-           ,[CodInv]
-) VALUES(
-           @CuoPart
-           ,@VaPart
-           ,@CoCasa
-           ,@CoBolsa
-           ,@DiasLiq
-           ,@FechaOpe
-           ,@FechaVen
-           ,@Periodic
-           ,@Base
-           ,@PlaInv
-           ,@RendOfre
-           ,@Dividendo
-           ,@CodInv
-)
-    "
-
-
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-
-            .Add("@CuoPart", SqlDbType.Float).Value = CDec(Coleccion(1).TrimEnd("%"))
-            .Add("@VaPart", SqlDbType.Float).Value = CDec(Coleccion(2).TrimEnd("%"))
-            .Add("@CoCasa", SqlDbType.Float).Value = CDec(Coleccion(3).TrimEnd("%"))
-            .Add("@CoBolsa", SqlDbType.Float).Value = CDec(Coleccion(4).TrimEnd("%"))
-            .Add("@DiasLiq", SqlDbType.Int).Value = CInt(Coleccion(5))
-            .Add("@FechaOpe", SqlDbType.DateTime).Value = CDate(Coleccion(6))
-            .Add("@FechaVen", SqlDbType.DateTime).Value = CDate(Coleccion(7))
-            .Add("@Periodic", SqlDbType.VarChar).Value = Coleccion(8).ToString
-            .Add("@Base", SqlDbType.Int).Value = CInt(Coleccion(9))
-            .Add("@PlaInv", SqlDbType.VarChar).Value = Coleccion(10).ToString
-            .Add("@RendOfre", SqlDbType.Float).Value = CDec(Coleccion(11).TrimEnd("%"))
-            .Add("@Dividendo", SqlDbType.Float).Value = CDec(Coleccion(12).TrimEnd("%"))
-            .Add("@CodInv ", SqlDbType.VarChar).Value = Codigo.ToString
-        End With
-
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Close()
-        Return retorno
-
-    End Function
 
     Public Function Cargar(ByVal CodInv As String)
         Dim objCon As New Conexion
@@ -432,113 +297,11 @@ Public Class FondoInversionDAO
     End Function
 
 
-    Function GuardarDataGrid(ByVal coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "INSERT INTO [dbo].[FINV1](
-
-           [CodInv]
-           ,[correlativo]
-           ,[FechaCorte]
-           ,[Dias]
-           ,[Dividendo]
-           ,[Ingreso]
-           ,[RendMensual]
-         
-      
-) VALUES(
-           @CodInv
-           ,@correlativo
-           ,@FechaCorte
-           ,@Dias
-           ,@Dividendo
-           ,@Ingreso
-           ,@RendMensual
-)
-    "
 
 
 
 
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@correlativo", SqlDbType.Int).Value = CInt(coleccion(1))
-            .Add("@FechaCorte", SqlDbType.DateTime).Value = coleccion(2)
-            .Add("@Dias", SqlDbType.Int).Value = coleccion(3)
-            .Add("@Dividendo", SqlDbType.Float).Value = coleccion(4)
-            .Add("@Ingreso", SqlDbType.Float).Value = coleccion(5)
-            .Add("@RendMensual", SqlDbType.VarChar).Value = coleccion(6)
-
-
-        End With
-
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Close()
-        Return retorno
-
-    End Function
-
-
-
-
-    Function ModificarDataGrid(ByVal coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "UPDATE [dbo].[FINV1] SET
-           [FechaCorte]=@FechaCorte
-           ,[Dias]=@Dias
-           ,[Dividendo]=@Dividendo
-           ,[Ingreso]=@Ingreso
-           ,[RendMensual]=@RendMensual
-            WHERE  [CodInv]=@CodInv AND [correlativo]=@correlativo
 
-    "
-
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@correlativo", SqlDbType.Int).Value = CInt(coleccion(1))
-            .Add("@FechaCorte", SqlDbType.DateTime).Value = coleccion(2)
-            .Add("@Dias", SqlDbType.Int).Value = coleccion(3)
-            .Add("@Dividendo", SqlDbType.Float).Value = coleccion(4)
-            .Add("@Ingreso", SqlDbType.Float).Value = coleccion(5)
-            .Add("@RendMensual", SqlDbType.VarChar).Value = coleccion(6)
-
-
-        End With
-
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Close()
-        Return retorno
-
-    End Function
 
 
     Public Function CargarFilas(ByVal codigo As String)
@@ -644,28 +407,5 @@ Public Class FondoInversionDAO
         cn.Close()
     End Sub
 
-    Public Sub EliminarDatGrid(ByVal Codigo As String, ByVal correlativo As Integer)
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim res As Integer
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "DELETE FROM [dbo].[FINV1]
-      WHERE [CodInv]=@CodInv AND [correlativo]=@correlativo"
-
-
 
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-        cmd.Parameters.Add("@correlativo", SqlDbType.Int).Value = correlativo
-        cmd.Connection = cn
-
-        res = cmd.ExecuteNonQuery
-        cn.Close()
-    End Sub
 End Class

+ 91 - 114
DAO/FuturosDAO.vb

@@ -4,7 +4,7 @@ Imports System.Data.SqlClient
 Public Class FuturosDAO
 
 
-
+    Dim Operaciones As New Operaciones
 
 
 
@@ -55,35 +55,29 @@ where  [CodInv]=@CodInv
 
             With cmd.Parameters
                 .Add("@CodInv", SqlDbType.VarChar).Value = Codigo.ToString
-                .Add("@FOperC", SqlDbType.DateTime).Value = CDate(Coleccion(1))
-                .Add("@FLiqC", SqlDbType.DateTime).Value = CDate(Coleccion(2))
-                .Add("@FVenC", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-                .Add("@VaUnidadC", SqlDbType.Float).Value = CDec(Coleccion(4))
-                .Add("@ValorTransadoC", SqlDbType.Float).Value = CDec(Coleccion(5))
-                .Add("@CoBrokerC", SqlDbType.Float).Value = CDec(Coleccion(6))
-                .Add("@VaRecC", SqlDbType.Float).Value = CDec(Coleccion(7))
+                .Add("@FOperC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(1).ToString)
+                .Add("@FLiqC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@FVenC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+                .Add("@VaUnidadC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@ValorTransadoC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+                .Add("@CoBrokerC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+                .Add("@VaRecC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
                 .Add("@IdContratoC", SqlDbType.VarChar).Value = Coleccion(8).ToString
-                .Add("@CantContratoC", SqlDbType.Int).Value = CInt(Coleccion(9))
-                .Add("@UniContraC", SqlDbType.Int).Value = CInt(Coleccion(10))
-
-
-                .Add("@FOperV", SqlDbType.DateTime).Value = CDate(Coleccion(11))
-                .Add("@FLiqV", SqlDbType.DateTime).Value = CDate(Coleccion(12))
-                .Add("@FVenV", SqlDbType.DateTime).Value = CDate(Coleccion(13))
-                .Add("@VaUnidadV", SqlDbType.Float).Value = CDec(Coleccion(14))
-                .Add("@ValorTransadoV", SqlDbType.Float).Value = CDec(Coleccion(15))
-                .Add("@CoBrokerV", SqlDbType.Float).Value = CDec(Coleccion(16))
-                .Add("@VaRecV", SqlDbType.Float).Value = CDec(Coleccion(17))
+                .Add("@CantContratoC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(9).ToString)
+                .Add("@UniContraC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(10).ToString)
+                .Add("@FOperV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(11).ToString)
+                .Add("@FLiqV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(12).ToString)
+                .Add("@FVenV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(13).ToString)
+                .Add("@VaUnidadV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(14).ToString)
+                .Add("@ValorTransadoV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(15).ToString)
+                .Add("@CoBrokerV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(16).ToString)
+                .Add("@VaRecV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(17).ToString)
                 .Add("@IdContratoV", SqlDbType.VarChar).Value = Coleccion(18).ToString
-                .Add("@CantContratoV", SqlDbType.Int).Value = CInt(Coleccion(19))
-                .Add("@UniContraV", SqlDbType.Int).Value = CInt(Coleccion(20))
-
-                .Add("@GP", SqlDbType.Float).Value = CDec(Coleccion(21))
-                .Add("@Rendimiento", SqlDbType.Float).Value = CDec(Coleccion(22))
+                .Add("@CantContratoV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(19).ToString)
+                .Add("@UniContraV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(20).ToString)
+                .Add("@GP", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(21).ToString)
+                .Add("@Rendimiento", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(22).ToString)
                 .Add("@TipoOperacion", SqlDbType.VarChar).Value = Coleccion(23).ToString
-
-
-
             End With
 
 
@@ -148,35 +142,30 @@ where  [CodInv]=@CodInv
 
             With cmd.Parameters
                 .Add("@CodInv", SqlDbType.VarChar).Value = Codigo.ToString
-                .Add("@FOperC", SqlDbType.DateTime).Value = CDate(Coleccion(1))
-                .Add("@FLiqC", SqlDbType.DateTime).Value = CDate(Coleccion(2))
-                .Add("@FVenC", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-                .Add("@VaUnidadC", SqlDbType.Float).Value = CDec(Coleccion(4))
-                .Add("@ValorTransadoC", SqlDbType.Float).Value = CDec(Coleccion(5))
-                .Add("@CoBrokerC", SqlDbType.Float).Value = CDec(Coleccion(6))
-                .Add("@VaRecC", SqlDbType.Float).Value = CDec(Coleccion(7))
+                .Add("@FOperC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(1).ToString)
+                .Add("@FLiqC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@FVenC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+                .Add("@VaUnidadC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@ValorTransadoC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+                .Add("@CoBrokerC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+                .Add("@VaRecC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
                 .Add("@IdContratoC", SqlDbType.VarChar).Value = Coleccion(8).ToString
-                .Add("@CantContratoC", SqlDbType.Int).Value = CInt(Coleccion(9))
-                .Add("@UniContraC", SqlDbType.Int).Value = CInt(Coleccion(10))
-
-
-                .Add("@FOperV", SqlDbType.DateTime).Value = CDate(Coleccion(11))
-                .Add("@FLiqV", SqlDbType.DateTime).Value = CDate(Coleccion(12))
-                .Add("@FVenV", SqlDbType.DateTime).Value = CDate(Coleccion(13))
-                .Add("@VaUnidadV", SqlDbType.Float).Value = CDec(Coleccion(14))
-                .Add("@ValorTransadoV", SqlDbType.Float).Value = CDec(Coleccion(15))
-                .Add("@CoBrokerV", SqlDbType.Float).Value = CDec(Coleccion(16))
-                .Add("@VaRecV", SqlDbType.Float).Value = CDec(Coleccion(17))
+                .Add("@CantContratoC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(9).ToString)
+                .Add("@UniContraC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(10).ToString)
+                .Add("@FOperV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(11).ToString)
+                .Add("@FLiqV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(12).ToString)
+                .Add("@FVenV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(13).ToString)
+                .Add("@VaUnidadV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(14).ToString)
+                .Add("@ValorTransadoV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(15).ToString)
+                .Add("@CoBrokerV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(16).ToString)
+                .Add("@VaRecV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(17).ToString)
                 .Add("@IdContratoV", SqlDbType.VarChar).Value = Coleccion(18).ToString
-                .Add("@CantContratoV", SqlDbType.Int).Value = CInt(Coleccion(19))
-                .Add("@UniContraV", SqlDbType.Int).Value = CInt(Coleccion(20))
-
-                .Add("@GP", SqlDbType.Float).Value = CDec(Coleccion(21))
-                .Add("@Rendimiento", SqlDbType.Float).Value = CDec(Coleccion(22))
+                .Add("@CantContratoV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(19).ToString)
+                .Add("@UniContraV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(20).ToString)
+                .Add("@GP", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(21).ToString)
+                .Add("@Rendimiento", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(22).ToString)
                 .Add("@TipoOperacion", SqlDbType.VarChar).Value = Coleccion(23).ToString
 
-
-
             End With
 
 
@@ -271,51 +260,44 @@ where  [CodInv]=@CodInv
         cmd = New SqlCommand
             cmd.CommandText = sql
 
-        'Try
-
-
-
-        With cmd.Parameters
-                .Add("@CodInv", SqlDbType.VarChar).Value = Codigo.ToString
-                .Add("@FOperC", SqlDbType.DateTime).Value = CDate(Coleccion(1))
-                .Add("@FLiqC", SqlDbType.DateTime).Value = CDate(Coleccion(2))
-                .Add("@FVenC", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-                .Add("@VaUnidadC", SqlDbType.Float).Value = CDec(Coleccion(4))
-                .Add("@ValorTransadoC", SqlDbType.Float).Value = CDec(Coleccion(5))
-                .Add("@CoBrokerC", SqlDbType.Float).Value = CDec(Coleccion(6))
-                .Add("@VaRecC", SqlDbType.Float).Value = CDec(Coleccion(7))
-                .Add("@IdContratoC", SqlDbType.VarChar).Value = Coleccion(8).ToString
-                .Add("@CantContratoC", SqlDbType.Int).Value = CInt(Coleccion(9))
-                .Add("@UniContraC", SqlDbType.Int).Value = CInt(Coleccion(10))
-
-
-                .Add("@FOperV", SqlDbType.DateTime).Value = CDate(Coleccion(11))
-                .Add("@FLiqV", SqlDbType.DateTime).Value = CDate(Coleccion(12))
-                .Add("@FVenV", SqlDbType.DateTime).Value = CDate(Coleccion(13))
-                .Add("@VaUnidadV", SqlDbType.Float).Value = CDec(Coleccion(14))
-                .Add("@ValorTransadoV", SqlDbType.Float).Value = CDec(Coleccion(15))
-                .Add("@CoBrokerV", SqlDbType.Float).Value = CDec(Coleccion(16))
-                .Add("@VaRecV", SqlDbType.Float).Value = CDec(Coleccion(17))
-                .Add("@IdContratoV", SqlDbType.VarChar).Value = Coleccion(18).ToString
-                .Add("@CantContratoV", SqlDbType.Int).Value = CInt(Coleccion(19))
-                .Add("@UniContraV", SqlDbType.Int).Value = CInt(Coleccion(20))
 
-                .Add("@GP", SqlDbType.Float).Value = CDec(Coleccion(21))
-                .Add("@Rendimiento", SqlDbType.Float).Value = CDec(Coleccion(22))
-                .Add("@TipoOperacion", SqlDbType.VarChar).Value = Coleccion(23).ToString
 
 
 
-            End With
+        With cmd.Parameters
+            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo.ToString
+            .Add("@FOperC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(1).ToString)
+            .Add("@FLiqC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+            .Add("@FVenC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+            .Add("@VaUnidadC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+            .Add("@ValorTransadoC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+            .Add("@CoBrokerC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@VaRecC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
+            .Add("@IdContratoC", SqlDbType.VarChar).Value = Coleccion(8).ToString
+            .Add("@CantContratoC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(9).ToString)
+            .Add("@UniContraC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(10).ToString)
+            .Add("@FOperV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(11).ToString)
+            .Add("@FLiqV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(12).ToString)
+            .Add("@FVenV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(13).ToString)
+            .Add("@VaUnidadV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(14).ToString)
+            .Add("@ValorTransadoV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(15).ToString)
+            .Add("@CoBrokerV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(16).ToString)
+            .Add("@VaRecV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(17).ToString)
+            .Add("@IdContratoV", SqlDbType.VarChar).Value = Coleccion(18).ToString
+            .Add("@CantContratoV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(19).ToString)
+            .Add("@UniContraV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(20).ToString)
+            .Add("@GP", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(21).ToString)
+            .Add("@Rendimiento", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(22).ToString)
+            .Add("@TipoOperacion", SqlDbType.VarChar).Value = Coleccion(23).ToString
+
+        End With
 
 
             cmd.Connection = cn
 
             retorno = cmd.ExecuteNonQuery
             MsgBox("Registro Creado")
-        'Catch ex As Exception
-        '    MsgBox("Error al crear el registro")
-        'End Try
+
         cn.Close()
         Return retorno
 
@@ -398,35 +380,30 @@ where  [CodInv]=@CodInv
 
             With cmd.Parameters
                 .Add("@CodInv", SqlDbType.VarChar).Value = Codigo.ToString
-                .Add("@FOperC", SqlDbType.DateTime).Value = CDate(Coleccion(1))
-                .Add("@FLiqC", SqlDbType.DateTime).Value = CDate(Coleccion(2))
-                .Add("@FVenC", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-                .Add("@VaUnidadC", SqlDbType.Float).Value = CDec(Coleccion(4))
-                .Add("@ValorTransadoC", SqlDbType.Float).Value = CDec(Coleccion(5))
-                .Add("@CoBrokerC", SqlDbType.Float).Value = CDec(Coleccion(6))
-                .Add("@VaRecC", SqlDbType.Float).Value = CDec(Coleccion(7))
+                .Add("@FOperC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(1).ToString)
+                .Add("@FLiqC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@FVenC", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+                .Add("@VaUnidadC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@ValorTransadoC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+                .Add("@CoBrokerC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+                .Add("@VaRecC", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
                 .Add("@IdContratoC", SqlDbType.VarChar).Value = Coleccion(8).ToString
-                .Add("@CantContratoC", SqlDbType.Int).Value = CInt(Coleccion(9))
-                .Add("@UniContraC", SqlDbType.Int).Value = CInt(Coleccion(10))
-
-
-                .Add("@FOperV", SqlDbType.DateTime).Value = CDate(Coleccion(11))
-                .Add("@FLiqV", SqlDbType.DateTime).Value = CDate(Coleccion(12))
-                .Add("@FVenV", SqlDbType.DateTime).Value = CDate(Coleccion(13))
-                .Add("@VaUnidadV", SqlDbType.Float).Value = CDec(Coleccion(14))
-                .Add("@ValorTransadoV", SqlDbType.Float).Value = CDec(Coleccion(15))
-                .Add("@CoBrokerV", SqlDbType.Float).Value = CDec(Coleccion(16))
-                .Add("@VaRecV", SqlDbType.Float).Value = CDec(Coleccion(17))
+                .Add("@CantContratoC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(9).ToString)
+                .Add("@UniContraC", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(10).ToString)
+                .Add("@FOperV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(11).ToString)
+                .Add("@FLiqV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(12).ToString)
+                .Add("@FVenV", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(13).ToString)
+                .Add("@VaUnidadV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(14).ToString)
+                .Add("@ValorTransadoV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(15).ToString)
+                .Add("@CoBrokerV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(16).ToString)
+                .Add("@VaRecV", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(17).ToString)
                 .Add("@IdContratoV", SqlDbType.VarChar).Value = Coleccion(18).ToString
-                .Add("@CantContratoV", SqlDbType.Int).Value = CInt(Coleccion(19))
-                .Add("@UniContraV", SqlDbType.Int).Value = CInt(Coleccion(20))
-
-                .Add("@GP", SqlDbType.Float).Value = CDec(Coleccion(21))
-                .Add("@Rendimiento", SqlDbType.Float).Value = CDec(Coleccion(22))
+                .Add("@CantContratoV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(19).ToString)
+                .Add("@UniContraV", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(20).ToString)
+                .Add("@GP", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(21).ToString)
+                .Add("@Rendimiento", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(22).ToString)
                 .Add("@TipoOperacion", SqlDbType.VarChar).Value = Coleccion(23).ToString
 
-
-
             End With
 
 
@@ -463,7 +440,7 @@ where  [CodInv]=@CodInv
         cmd.Parameters.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
         cmd.Connection = cn
 
-        ' Dim Datos = cmd.ExecuteScalar
+
         Dim Datos = cmd.ExecuteReader
         If Datos.HasRows Then
             'SE ENCONTRO EL REGISTRO
@@ -540,7 +517,7 @@ where  [CodInv]=@CodInv
         cmd.Parameters.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
         cmd.Connection = cn
 
-        ' Dim Datos = cmd.ExecuteScalar
+
         Dim Datos = cmd.ExecuteReader
         If Datos.HasRows Then
             'SE ENCONTRO EL REGISTRO

+ 2 - 161
DAO/InversionDAO.vb

@@ -2,7 +2,6 @@
 Public Class InversionDAO
 
 
-    'Private frmPIN As New frmPIN
     Private Operaciones As New Operaciones
     Dim CambiarEstArbCE As New CambiarEstArbCE
 
@@ -40,14 +39,7 @@ Public Class InversionDAO
         Return valor
     End Function
 
-    Public Function ResumenPorInstrumento() As DataTable
-        Dim dt As DataTable = VistaInversiones_ValorNominal()
 
-
-
-
-
-    End Function
     Public Function VistaInversiones_ValorNominal() As DataTable
         Dim oVistaInversiones As DataTable = Me.VistaInversiones
         Dim vCodigoInstrumento As String
@@ -158,78 +150,6 @@ Public Class InversionDAO
 
 
     End Function
-
-
-    Public Function ListaCodigosPropuesta() As DataTable
-        Dim objCon As New Conexion
-        Dim cn As SqlConnection = objCon.Conectar
-        Dim sql As String
-        Dim da As SqlDataAdapter
-
-        Dim dt As New DataTable
-
-        sql = "SELECT 
-[DocId]
-,[CodEmpr]
-,[Asunto]
-,[CodIF]
-,[MontoInv]
-,[Precio]
-,[Rendimiento]
-,[Plazo]
-,[PlazoFact]
-,[Ingresos]
-,[OFon]
-,[CodEmis]
-,[CodCalRi]
-,[CodECalRi]
-,[CodPais]
-,[TipoMerc]
-,[CodInv]
-,[DocEst]
-,[TipoOper]
-,[FechaDoc]
-,[AutEstado] 
-FROM [dbo].[PIN0] ORDER BY [CodInv]"
-        If cn Is Nothing Then
-            cn = objCon.Conectar
-        End If
-        If cn.State = ConnectionState.Open Then
-            cn.Close()
-            cn.Dispose()
-            cn = objCon.Conectar
-            cn.Open()
-        Else
-            cn = objCon.Conectar
-            cn.Open()
-        End If
-
-        da = New SqlDataAdapter(sql, cn)
-        da.Fill(dt)
-
-        Return dt
-        dt.Dispose()
-        da.Dispose()
-        cn.Dispose()
-
-    End Function
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
     Public Function Eliminar(ByVal Codigo As String, ByVal Tabla As String, ByVal Validar As Boolean) As Integer
         Dim objCon As New Conexion
         Dim cn As SqlConnection = objCon.Conectar
@@ -741,7 +661,6 @@ FROM [dbo].[PIN0] ORDER BY [CodInv]"
         Dim vPuedoContinuar As Boolean = True
         Dim vCodigoNuevo As String
         vCodigoNuevo = oInversionesCE.CodigoIversion
-        '        vCodigoNuevo = SeriesDAO.SiguienteCodigoInversion(oInversionesCE.CodigoEmpresa, oInversionesCE.CodigoInstrumentoFinanciero)
 
         If oInversionesCE Is Nothing Then
 
@@ -1246,7 +1165,6 @@ VALUES
         Dim vPuedoContinuar As Boolean = True
         Dim vCodigoNuevo As String
         vCodigoNuevo = oInversionesCE.CodigoIversion
-        '        vCodigoNuevo = SeriesDAO.SiguienteCodigoInversion(oInversionesCE.CodigoEmpresa, oInversionesCE.CodigoInstrumentoFinanciero)
 
         If oInversionesCE Is Nothing Then
 
@@ -1509,14 +1427,13 @@ VALUES
 
 
             Else
-                'NADA?
+
                 vRetorno = 0
             End If
 
 
         Else
-            cn.Close()
-            'NO VIENE
+
             vRetorno = -1
         End If
 
@@ -2147,14 +2064,11 @@ VALUES
                 oInversion.Periodicidad = dr.Item("Periodicidad").ToString
                 oInversion.TipoTasa = dr.Item("TipTasa").ToString
                 oInversion.TipoRenta = dr.Item("TipRenta").ToString
-
-
                 If String.IsNullOrEmpty(dr.Item("Plazo").ToString) Then
                     oInversion.PlazoNumero = 0
                 Else
                     oInversion.PlazoNumero = dr.Item("Plazo")
                 End If
-
                 oInversion.PlazoFactor = dr.Item("PlazoFact").ToString
                 oInversion.Comentarios = dr.Item("Coment").ToString
                 oInversion.TipoOperacion = dr.Item("TipoOper").ToString
@@ -2173,83 +2087,10 @@ VALUES
         End If
 
 
-        'oSqlConnection.Dispose()
-
-        cn.Close()
-        Return oInversion
-    End Function
-
-
-
-
-    Public Function CargarRegistroPropuesta(ByVal IdRegistro As Integer) As InversionesCE
-        Dim objCon As New Conexion
-        Dim cn As SqlConnection = objCon.Conectar
-        Dim oInversion As InversionesCE
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim dr As SqlDataReader
-
-        sql = "SELECT * FROM [dbo].[PIN0] WHERE [DocId]=@DocId"
-        If cn Is Nothing Then
-            cn = objCon.Conectar
-        End If
-        If cn.State = ConnectionState.Open Then
-            cn.Close()
-            cn.Dispose()
-            cn = objCon.Conectar
-            cn.Open()
-        Else
-            cn = objCon.Conectar
-            cn.Open()
-        End If
-        cmd = New SqlCommand(sql, cn)
-        cmd.Parameters.Add("@DocId", SqlDbType.Int).Value = IdRegistro
-
-        dr = cmd.ExecuteReader
-
-        If dr.HasRows Then
-            oInversion = New InversionesCE
-            While dr.Read
-                'oInversion.CodigoEmpresa = dr.Item("CodEmpr")
-                'oInversion.CodigoInstrumentoFinanciero = dr.Item("CodIF")
-                oInversion.CodigoEmisor = dr.Item("CodEmis")
-                'oInversion.CodigoCalificacionDeRiesgo = dr.Item("CodCalRi").ToString
-                'oInversion.CodigoEmpresaCalificadora = dr.Item("CodECalRi").ToString
-                'oInversion.Pais = dr.Item("CodPais").ToString
-                'oInversion.TipoMercado = dr.Item("TipoMerc").ToString
-                'oInversion.CodigoIversion = dr.Item("CodInv").ToString
-                'oInversion.EstadoDocumento = dr.Item("DocEst").ToString
-                'oInversion.NombreManual = dr.Item("NombreManIF").ToString
-                'oInversion.CodigoManual = dr.Item("CodManIF").ToString
-                'oInversion.Periodicidad = dr.Item("Periodicidad").ToString
-                'oInversion.TipoTasa = dr.Item("TipTasa").ToString
-                'oInversion.TipoRenta = dr.Item("TipRenta").ToString
-                'oInversion.PlazoNumero = dr.Item("Plazo").ToString
-                'oInversion.PlazoFactor = dr.Item("PlazoFact").ToString
-                'oInversion.Comentarios = dr.Item("Coment").ToString
-
-
-            End While
-            dr.Close()
-            cmd.Dispose()
-
-
-            '    oInversion.TipoInstrumentoFinanciero = Me.ObtenerTipoInstrumentoFinanciero(oInversion.CodigoInstrumentoFinanciero)
 
-        Else
-
-        End If
-
-
-        'oSqlConnection.Dispose()
 
         cn.Close()
         Return oInversion
     End Function
 
-
-
-
-
 End Class

+ 131 - 422
DAO/LETESDAO.vb

@@ -2,72 +2,14 @@
 Public Class LETESDAO
 
 
+    Dim Operaciones As New Operaciones
 
-    Public Function Nuevo(ByVal objLete As LETESCE) As Integer
-        Dim retorno As Integer
-
-
-        Return retorno
-    End Function
-    Public Function Nuevo(ByVal coleccion As Collection)
-        Dim objCon As New Conexion
-        Dim retorno As Integer = -1
-        Dim query As String
-
-        Dim Tabla As String = ""
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-
-
-
-
-        Dim cmd As SqlCommand
-
-
-
-
-        query = "INSERT INTO [dbo].[LET0]
-           (
-           [ValNom]
-           ,[FOper]
-           ,[FLiq]
-           ,[RendBruto]
-           ,[Plazo])
-     VALUES
-           (@ValNom
-           ,@FOper
-           ,@FLiq
-           ,@RendBruto
-           ,@Plazo
-		   )"
-
-        cmd = New SqlCommand
-        cmd.CommandText = query
-
-        With cmd.Parameters
-            .Add("@ValNom", SqlDbType.Decimal).Value = coleccion(1)
-            .Add("@FOper", SqlDbType.DateTime).Value = coleccion(2)
-            .Add("@FLiq", SqlDbType.DateTime).Value = coleccion(3)
-
-            .Add("@RendBruto", SqlDbType.Decimal).Value = coleccion(4)
-            .Add("@Plazo", SqlDbType.Int).Value = coleccion(5)
-        End With
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-        cn.Close()
-        Return retorno
-    End Function
 
 
     Public Function ActualizarLETE(ByVal coleccion As Collection, ByVal Instrumento As String)
         Dim objCon As New Conexion
         Dim retorno As Integer
-        Dim sql As String
+        Dim sql As String = String.Empty
         Dim cmd As SqlCommand
         Dim cn As SqlConnection = objCon.Conectar
         If cn.State = ConnectionState.Closed Then
@@ -202,93 +144,87 @@ where [CodInv]=   @CodInv
 "
         End If
 
-        'Try
+
 
 
         cmd = New SqlCommand
             cmd.CommandText = sql
 
             With cmd.Parameters
-                .Add("@ValNom", SqlDbType.Decimal).Value = coleccion(1)
-
-                .Add("@FOper", SqlDbType.DateTime).Value = coleccion(2)
-                .Add("@FLiq", SqlDbType.DateTime).Value = coleccion(3)
-                .Add("@RendBruto", SqlDbType.Decimal).Value = coleccion(4)
-                .Add("@Plazo", SqlDbType.Int).Value = CInt(coleccion(5))
-                .Add("@CodInv", SqlDbType.VarChar).Value = coleccion(6)
-                .Add("@ComisionCasa", SqlDbType.Decimal).Value = CDec(coleccion(7))
-                .Add("@ComisionBolsa", SqlDbType.Decimal).Value = CDec(coleccion(8))
-                .Add("@Periodic", SqlDbType.VarChar).Value = coleccion(9)
-
-                .Add("@AnioBase", SqlDbType.Int).Value = CInt(coleccion(10))
-
-                .Add("@CasasCorredoras", SqlDbType.VarChar).Value = coleccion(11)
-
-                If Instrumento = "LETE" Then
-                    .Add("ValTrans", SqlDbType.Float).Value = coleccion(12)
-                    .Add("Precio", SqlDbType.Float).Value = coleccion(13)
-                    .Add("TotPagar", SqlDbType.Float).Value = coleccion(14)
-                    .Add("RendNeto", SqlDbType.Float).Value = coleccion(15)
-                    .Add("IngrBruto", SqlDbType.Float).Value = coleccion(16)
-                    .Add("IngrNeto", SqlDbType.Float).Value = coleccion(17)
-                    .Add("ComisionCasaValor", SqlDbType.Float).Value = coleccion(18)
-                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = coleccion(19)
-                    .Add("FUlt", SqlDbType.Date).Value = coleccion(20)
-                    .Add("FRed", SqlDbType.Date).Value = coleccion(21)
-                    .Add("FVenc", SqlDbType.Date).Value = coleccion(22)
-                End If
+            .Add("@ValNom", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(1).ToString)
+            .Add("@FOper", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(coleccion(2).ToString)
+            .Add("@FLiq", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(coleccion(3).ToString)
+            .Add("@RendBruto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(4).ToString)
+            .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(5).ToString)
+            .Add("@CodInv", SqlDbType.VarChar).Value = coleccion(6).ToString
+            .Add("@ComisionCasa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(7).ToString)
+            .Add("@ComisionBolsa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(8).ToString)
+            .Add("@Periodic", SqlDbType.VarChar).Value = coleccion(9).ToString
+            .Add("@AnioBase", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(10).ToString)
+            .Add("@CasasCorredoras", SqlDbType.VarChar).Value = coleccion(11).ToString
+
+            If Instrumento = "LETE" Then
+                .Add("ValTrans", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(12).ToString)
+                .Add("Precio", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(13).ToString)
+                .Add("TotPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(14).ToString)
+                .Add("RendNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(15).ToString)
+                .Add("IngrBruto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(16).ToString)
+                .Add("IngrNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(17).ToString)
+                .Add("ComisionCasaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString)
+                .Add("ComisionBolsaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString)
+                .Add("FUlt", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(20).ToString)
+                .Add("FRed", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(21).ToString)
+                .Add("FVenc", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(22).ToString)
+            End If
 
                 If (Instrumento = "VCN" Or Instrumento = "PBUR") Then
 
 
                     .Add("@ValorPar", SqlDbType.Bit).Value = CByte(coleccion(12))
-                    .Add("@FechaUltima", SqlDbType.DateTime).Value = CDate(coleccion(13))
-
-
-
-                ElseIf Instrumento = "CETE" Then
-                    .Add("@FechaUltima", SqlDbType.DateTime).Value = CDate(coleccion(12))
-                    .Add("ValTrans", SqlDbType.Float).Value = coleccion(13)
-                    .Add("Precio", SqlDbType.Float).Value = coleccion(14)
-                    .Add("TotPagar", SqlDbType.Float).Value = coleccion(15)
-                    .Add("RendNeto", SqlDbType.Float).Value = coleccion(16)
-                    .Add("IngrBruto", SqlDbType.Float).Value = coleccion(17)
-                    .Add("IngrNeto", SqlDbType.Float).Value = coleccion(18)
-                    .Add("ComisionCasaValor", SqlDbType.Float).Value = coleccion(19)
-                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = coleccion(20)
-                    .Add("FUlt", SqlDbType.Date).Value = coleccion(21)
-                    .Add("FRed", SqlDbType.Date).Value = coleccion(22)
-                .Add("FVenc", SqlDbType.Date).Value = coleccion(23)
-                .Add("@IntAcumulado", SqlDbType.Float).Value = coleccion(24)
+                .Add("@FechaUltima", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(coleccion(13).ToString)
+            ElseIf Instrumento = "CETE" Then
+                .Add("@FechaUltima", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(coleccion(12).ToString)
+                .Add("ValTrans", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(13).ToString)
+                .Add("Precio", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(14).ToString)
+                .Add("TotPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(15).ToString)
+                .Add("RendNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(16).ToString)
+                .Add("IngrBruto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(17).ToString)
+                .Add("IngrNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString)
+                .Add("ComisionCasaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString)
+                .Add("ComisionBolsaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(20).ToString)
+                .Add("FUlt", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(21).ToString)
+                .Add("FRed", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(22).ToString)
+                .Add("FVenc", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(23).ToString)
+                .Add("@IntAcumulado", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(24).ToString)
             End If
                 If Instrumento = "VCN" Then
-                    .Add("@OtrosCostos", SqlDbType.Decimal).Value = CDec(coleccion(14))
-                    .Add("ValTrans", SqlDbType.Float).Value = coleccion(15)
-                    .Add("Precio", SqlDbType.Float).Value = coleccion(16)
-                    .Add("TotPagar", SqlDbType.Float).Value = coleccion(17)
-                    .Add("RendNeto", SqlDbType.Float).Value = coleccion(18)
-                    .Add("IngrBruto", SqlDbType.Float).Value = coleccion(19)
-                    .Add("IngrNeto", SqlDbType.Float).Value = coleccion(20)
-                    .Add("ComisionCasaValor", SqlDbType.Float).Value = coleccion(21)
-                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = coleccion(22)
-                    .Add("FUlt", SqlDbType.Date).Value = coleccion(23)
-                    .Add("FRed", SqlDbType.Date).Value = coleccion(24)
-                .Add("FVenc", SqlDbType.Date).Value = coleccion(25)
-                .Add("@IntAcumulado", SqlDbType.Float).Value = coleccion(26)
+                .Add("@OtrosCostos", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(14).ToString)
+                .Add("ValTrans", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(15).ToString)
+                .Add("Precio", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(16).ToString)
+                .Add("TotPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(17).ToString)
+                .Add("RendNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString)
+                .Add("IngrBruto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString)
+                .Add("IngrNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(20).ToString)
+                .Add("ComisionCasaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(21).ToString)
+                .Add("ComisionBolsaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(22).ToString)
+                .Add("FUlt", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(23).ToString)
+                .Add("FRed", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(24).ToString)
+                .Add("FVenc", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(25).ToString)
+                .Add("@IntAcumulado", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(26).ToString)
             End If
                 If Instrumento = "PBUR" Then
-                    .Add("ValTrans", SqlDbType.Float).Value = coleccion(14)
-                    .Add("Precio", SqlDbType.Float).Value = coleccion(15)
-                    .Add("TotPagar", SqlDbType.Float).Value = coleccion(16)
-                    .Add("RendNeto", SqlDbType.Float).Value = coleccion(17)
-                    .Add("IngrBruto", SqlDbType.Float).Value = coleccion(18)
-                    .Add("IngrNeto", SqlDbType.Float).Value = coleccion(19)
-                    .Add("ComisionCasaValor", SqlDbType.Float).Value = coleccion(20)
-                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = coleccion(21)
-                    .Add("FUlt", SqlDbType.Date).Value = coleccion(22)
-                    .Add("FRed", SqlDbType.Date).Value = coleccion(23)
-                .Add("FVenc", SqlDbType.Date).Value = coleccion(24)
-                .Add("@IntAcumulado", SqlDbType.Float).Value = coleccion(25)
+                .Add("ValTrans", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(14).ToString)
+                .Add("Precio", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(15).ToString)
+                .Add("TotPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(16).ToString)
+                .Add("RendNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(17).ToString)
+                .Add("IngrBruto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString)
+                .Add("IngrNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString)
+                .Add("ComisionCasaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(20).ToString)
+                .Add("ComisionBolsaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(21).ToString)
+                .Add("FUlt", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(22).ToString)
+                .Add("FRed", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(23).ToString)
+                .Add("FVenc", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(24).ToString)
+                .Add("@IntAcumulado", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(25).ToString)
             End If
 
             End With
@@ -298,9 +234,7 @@ where [CodInv]=   @CodInv
 
             retorno = cmd.ExecuteNonQuery
             MsgBox("Registro Modificado con éxito")
-        'Catch ex As Exception
-        '    MsgBox("Error al modificar el registro")
-        'End Try
+
         cn.Close()
         Return retorno
     End Function
@@ -561,86 +495,83 @@ where [CodInv]=   @CodInv
             cmd.CommandText = sql
 
             With cmd.Parameters
-                .Add("@ValNom", SqlDbType.Decimal).Value = coleccion(1)
-
-                .Add("@FOper", SqlDbType.DateTime).Value = coleccion(2)
-                .Add("@FLiq", SqlDbType.DateTime).Value = coleccion(3)
-                .Add("@RendBruto", SqlDbType.Decimal).Value = coleccion(4)
-                .Add("@Plazo", SqlDbType.Int).Value = CInt(coleccion(5))
-                .Add("@CodInv", SqlDbType.VarChar).Value = coleccion(6)
-                .Add("@ComisionCasa", SqlDbType.Decimal).Value = CDec(coleccion(7))
-                .Add("@ComisionBolsa", SqlDbType.Decimal).Value = CDec(coleccion(8))
-                .Add("@Periodic", SqlDbType.VarChar).Value = coleccion(9)
-
-                .Add("@AnioBase", SqlDbType.Int).Value = CInt(coleccion(10))
-
-                .Add("@CasasCorredoras", SqlDbType.VarChar).Value = coleccion(11)
+                .Add("@ValNom", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(1).ToString)
+                .Add("@FOper", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(coleccion(2).ToString)
+                .Add("@FLiq", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(coleccion(3).ToString)
+                .Add("@RendBruto", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(4).ToString)
+                .Add("@Plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(5).ToString)
+                .Add("@CodInv", SqlDbType.VarChar).Value = coleccion(6).ToString
+                .Add("@ComisionCasa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(7).ToString)
+                .Add("@ComisionBolsa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(8).ToString)
+                .Add("@Periodic", SqlDbType.VarChar).Value = coleccion(9).ToString
+                .Add("@AnioBase", SqlDbType.Int).Value = Operaciones.ConvertirEntero(coleccion(10).ToString)
+                .Add("@CasasCorredoras", SqlDbType.VarChar).Value = coleccion(11).ToString
 
                 If Instrumento = "LETE" Then
-                    .Add("ValTrans", SqlDbType.Float).Value = coleccion(12)
-                    .Add("Precio", SqlDbType.Float).Value = coleccion(13)
-                    .Add("TotPagar", SqlDbType.Float).Value = coleccion(14)
-                    .Add("RendNeto", SqlDbType.Float).Value = coleccion(15)
-                    .Add("IngrBruto", SqlDbType.Float).Value = coleccion(16)
-                    .Add("IngrNeto", SqlDbType.Float).Value = coleccion(17)
-                    .Add("ComisionCasaValor", SqlDbType.Float).Value = coleccion(18)
-                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = coleccion(19)
-                    .Add("FUlt", SqlDbType.Date).Value = coleccion(20)
-                    .Add("FRed", SqlDbType.Date).Value = coleccion(21)
-                    .Add("FVenc", SqlDbType.Date).Value = coleccion(22)
+                    .Add("ValTrans", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(12).ToString)
+                    .Add("Precio", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(13).ToString)
+                    .Add("TotPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(14).ToString)
+                    .Add("RendNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(15).ToString)
+                    .Add("IngrBruto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(16).ToString)
+                    .Add("IngrNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(17).ToString)
+                    .Add("ComisionCasaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString)
+                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString)
+                    .Add("FUlt", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(20).ToString)
+                    .Add("FRed", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(21).ToString)
+                    .Add("FVenc", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(22).ToString)
                 End If
 
                 If (Instrumento = "VCN" Or Instrumento = "PBUR") Then
 
 
                     .Add("@ValorPar", SqlDbType.Bit).Value = CByte(coleccion(12))
-                    .Add("@FechaUltima", SqlDbType.DateTime).Value = CDate(coleccion(13))
+                    .Add("@FechaUltima", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(coleccion(13).ToString)
 
 
 
                 ElseIf Instrumento = "CETE" Then
-                    .Add("@FechaUltima", SqlDbType.DateTime).Value = CDate(coleccion(12))
-                    .Add("ValTrans", SqlDbType.Float).Value = coleccion(13)
-                    .Add("Precio", SqlDbType.Float).Value = coleccion(14)
-                    .Add("TotPagar", SqlDbType.Float).Value = coleccion(15)
-                    .Add("RendNeto", SqlDbType.Float).Value = coleccion(16)
-                    .Add("IngrBruto", SqlDbType.Float).Value = coleccion(17)
-                    .Add("IngrNeto", SqlDbType.Float).Value = coleccion(18)
-                    .Add("ComisionCasaValor", SqlDbType.Float).Value = coleccion(19)
-                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = coleccion(20)
-                    .Add("FUlt", SqlDbType.Date).Value = coleccion(21)
-                    .Add("FRed", SqlDbType.Date).Value = coleccion(22)
-                    .Add("FVenc", SqlDbType.Date).Value = coleccion(23)
-                    .Add("@IntAcumulado", SqlDbType.Float).Value = coleccion(24)
+                    .Add("@FechaUltima", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(coleccion(12).ToString)
+                    .Add("ValTrans", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(13).ToString)
+                    .Add("Precio", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(14).ToString)
+                    .Add("TotPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(15).ToString)
+                    .Add("RendNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(16).ToString)
+                    .Add("IngrBruto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(17).ToString)
+                    .Add("IngrNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString)
+                    .Add("ComisionCasaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString)
+                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(20).ToString)
+                    .Add("FUlt", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(21).ToString)
+                    .Add("FRed", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(22).ToString)
+                    .Add("FVenc", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(23).ToString)
+                    .Add("@IntAcumulado", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(24).ToString)
                 End If
                 If Instrumento = "VCN" Then
-                    .Add("@OtrosCostos", SqlDbType.Decimal).Value = CDec(coleccion(14))
-                    .Add("ValTrans", SqlDbType.Float).Value = coleccion(15)
-                    .Add("Precio", SqlDbType.Float).Value = coleccion(16)
-                    .Add("TotPagar", SqlDbType.Float).Value = coleccion(17)
-                    .Add("RendNeto", SqlDbType.Float).Value = coleccion(18)
-                    .Add("IngrBruto", SqlDbType.Float).Value = coleccion(19)
-                    .Add("IngrNeto", SqlDbType.Float).Value = coleccion(20)
-                    .Add("ComisionCasaValor", SqlDbType.Float).Value = coleccion(21)
-                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = coleccion(22)
-                    .Add("FUlt", SqlDbType.Date).Value = coleccion(23)
-                    .Add("FRed", SqlDbType.Date).Value = coleccion(24)
-                    .Add("FVenc", SqlDbType.Date).Value = coleccion(25)
-                    .Add("@IntAcumulado", SqlDbType.Float).Value = coleccion(26)
+                    .Add("@OtrosCostos", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(coleccion(14).ToString)
+                    .Add("ValTrans", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(15).ToString)
+                    .Add("Precio", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(16).ToString)
+                    .Add("TotPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(17).ToString)
+                    .Add("RendNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString)
+                    .Add("IngrBruto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString)
+                    .Add("IngrNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(20).ToString)
+                    .Add("ComisionCasaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(21).ToString)
+                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(22).ToString)
+                    .Add("FUlt", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(23).ToString)
+                    .Add("FRed", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(24).ToString)
+                    .Add("FVenc", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(25).ToString)
+                    .Add("@IntAcumulado", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(26).ToString)
                 End If
                 If Instrumento = "PBUR" Then
-                    .Add("ValTrans", SqlDbType.Float).Value = coleccion(14)
-                    .Add("Precio", SqlDbType.Float).Value = coleccion(15)
-                    .Add("TotPagar", SqlDbType.Float).Value = coleccion(16)
-                    .Add("RendNeto", SqlDbType.Float).Value = coleccion(17)
-                    .Add("IngrBruto", SqlDbType.Float).Value = coleccion(18)
-                    .Add("IngrNeto", SqlDbType.Float).Value = coleccion(19)
-                    .Add("ComisionCasaValor", SqlDbType.Float).Value = coleccion(20)
-                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = coleccion(21)
-                    .Add("FUlt", SqlDbType.Date).Value = coleccion(22)
-                    .Add("FRed", SqlDbType.Date).Value = coleccion(23)
-                    .Add("FVenc", SqlDbType.Date).Value = coleccion(24)
-                    .Add("@IntAcumulado", SqlDbType.Float).Value = coleccion(25)
+                    .Add("ValTrans", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(14).ToString)
+                    .Add("Precio", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(15).ToString)
+                    .Add("TotPagar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(16).ToString)
+                    .Add("RendNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(17).ToString)
+                    .Add("IngrBruto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(18).ToString)
+                    .Add("IngrNeto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(19).ToString)
+                    .Add("ComisionCasaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(20).ToString)
+                    .Add("ComisionBolsaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(21).ToString)
+                    .Add("FUlt", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(22).ToString)
+                    .Add("FRed", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(23).ToString)
+                    .Add("FVenc", SqlDbType.Date).Value = Operaciones.ConvertirFecha(coleccion(24).ToString)
+                    .Add("@IntAcumulado", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(coleccion(25).ToString)
                 End If
 
             End With
@@ -701,234 +632,12 @@ where [CodInv]=   @CodInv
         End Try
         cn.Close()
     End Sub
-    Public Function Nuevo(ByVal oLete As LETESCE, CodigoInversion As String) As Integer
-        Dim Resultado As Integer = 0
-        Dim objCon As New Conexion
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        If Not oLete Is Nothing Then
-            Dim Transaccion As SqlTransaction
-            Dim query As String
 
-            Dim cmd As SqlCommand = cn.CreateCommand
 
-            Transaccion = cn.BeginTransaction("NuevoLete")
-            cmd.Connection = cn
-            cmd.Transaction = Transaccion
 
-            query = "INSERT INTO [dbo].[LET0]
-           ([CodInv]
-           ,[CodCasa]
-           ,[ValNom]
-           ,[ValTrans]
-           ,[Precio]
-           ,[Impuestos]
-           ,[TotPagar]
-           ,[FOper]
-           ,[FLiq]
-           ,[RendBruto]
-           ,[RendNeto]
-           ,[Periodic]
-           ,[Plazo]
-           ,[IngrBruto]
-           ,[IngrNeto])
-     VALUES
-           (@CodInv
-           ,@CodCasa
-           ,@ValNom
-           ,@ValTrans
-           ,@Precio
-           ,@Impuestos
-           ,@TotPagar
-           ,@FOper
-           ,@FLiq
-           ,@RendBruto
-           ,@RendNeto
-           ,@Periodic
-           ,@Plazo
-           ,@IngrBruto
-           ,@IngrNeto
-		   )"
-
-            cmd.CommandText = query
 
-            With cmd.Parameters
-                '.Add("@DocId", SqlDbType.Int).Value = DocId
-                .Add("@CodInv", SqlDbType.VarChar).Value = CodigoInversion
-                .Add("@CodCasa", SqlDbType.VarChar).Value = oLete.CodigoCasa
-                .Add("@ValNom", SqlDbType.Float).Value = oLete.ValorNominal
-                .Add("@ValTrans", SqlDbType.Float).Value = oLete.ValorTransado
-                .Add("@Precio", SqlDbType.Float).Value = oLete.Precio
-                .Add("@Impuestos", SqlDbType.Float).Value = oLete.Impuestos
-                .Add("@TotPagar", SqlDbType.Float).Value = oLete.TotalaPagar
-                .Add("@FOper", SqlDbType.DateTime).Value = oLete.FechaOperacion
-                .Add("@FLiq", SqlDbType.DateTime).Value = oLete.FechaLiquidacion
-                .Add("@RendBruto", SqlDbType.Float).Value = oLete.RendimientoBruto
-                .Add("@RendNeto", SqlDbType.Float).Value = oLete.RendimientoNeto
-                .Add("@Periodic", SqlDbType.VarChar).Value = oLete.Periodicidad
-                .Add("@Plazo", SqlDbType.Int).Value = oLete.Plazo
-                .Add("@IngrBruto", SqlDbType.Float).Value = oLete.IngresoBruto
-                .Add("@IngrNeto", SqlDbType.Float).Value = oLete.IngresoNeto
-            End With
-
-            Try
-                Resultado = cmd.ExecuteNonQuery()
-                Transaccion.Commit()
-
-            Catch ex As Exception
-                MsgBox("Error al Guardar Lete : " & ex.GetType.ToString)
-                MsgBox("Mensaje: " & ex.Message)
-                Resultado = 0
-                Try
-                    Transaccion.Rollback()
-                Catch ex2 As Exception
-                    MsgBox("Error en Rollback: " & ex2.GetType.ToString)
-                    MsgBox("Mensaje Rollbak: " & ex2.Message)
-                End Try
-            End Try
-
-            cmd.Dispose()
-            cn.Dispose()
-        Else
-            Resultado = -1
-        End If
-
-        Return Resultado
-    End Function
 
 
-    Public Sub CargarRegistro(ByVal oLetes As LETESCE, Tipo As String, IdRegistro As Integer)
-        Dim objCon As New Conexion
-        Dim drd As SqlDataReader
-        Dim cmd As SqlCommand
-        Dim sql As String
-        Dim Tabla As String
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        If Tipo = "P" Then
-            Tabla = "PLET0"
-        End If
-        If Tipo = "I" Then
-            Tabla = "ILET0"
-        End If
-
-        sql = "SELECT * FROM [dbo].[" & Tabla & "] T0 WHERE T0.[DocId]=@DocId"
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@DocId", SqlDbType.Int).Value = IdRegistro
-        cmd.Connection = cn
-
-        drd = cmd.ExecuteReader
-
-        If drd.HasRows Then
-            'SE ENCONTRO EL REGISTRO
-            If drd.Read Then
-                oLetes.ValorNominal = drd.Item("ValNom")
-                oLetes.FechaOperacion = drd.Item("FOper")
-                oLetes.FechaLiquidacion = drd.Item("FLiq")
-
-                oLetes.Plazo = drd.Item("Plazo")
-                oLetes.CodigoCasa = drd.Item("CodCasa")
-                oLetes.Impuestos = drd.Item("Impuestos")
-                oLetes.Periodicidad = drd.Item("Periodic")
-                oLetes.RendimientoBruto = drd.Item("RendBruto")
-                oLetes.RendimientoNeto = drd.Item("RendNeto")
-                oLetes.IngresoBruto = drd.Item("IngrBruto")
-                oLetes.IngresoNeto = drd.Item("IngrNeto")
-                oLetes.ValorTransado = drd.Item("ValTrans")
-                oLetes.Precio = drd.Item("Precio")
-                oLetes.TotalaPagar = drd.Item("TotPagar")
-            End If
-
-        Else
-            'NO SE ENCONTRO EL REGISTRO
-        End If
-        drd.Close()
-        cmd.Dispose()
-        cn.Dispose()
-
-    End Sub
-    Public Function CargarRegistro(ByVal CodInversion As String) As LETESCE
-        Dim objCon As New Conexion
-        Dim oLETES As LETESCE
-        Dim cmd As SqlCommand
-        Dim drd As SqlDataReader
-        Dim vComprobar As Integer = 0
-        Dim sql As String
-        Dim vCodigoInversion As String = CodInversion
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        vComprobar = Comprobar(vCodigoInversion)
-        If vComprobar > 0 Then
-            oLETES = New LETESCE
-
-            sql = "SELECT * FROM [dbo].[LET0] T0 WHERE T0.[CodInv]=@CodInv"
-
-            cmd = New SqlCommand
-            cmd.CommandText = sql
-            cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = vCodigoInversion
-            cmd.Connection = cn
-
-            drd = cmd.ExecuteReader
-            If drd.HasRows Then
-                'SE ENCONTRO EL REGISTRO
-                If drd.Read Then
-                    'oLETES.ValorNominal = drd.Item("ValNom").ToString
-                    'oLETES.FechaOperacion = drd.Item("FOper").ToString
-                    'oLETES.FechaLiquidacion = drd.Item("FLiq").ToString
-                    'oLETES.Plazo = drd.Item("Plazo").ToString
-                    'oLETES.CodigoCasa = drd.Item("CodCasa").ToString
-                    'oLETES.Impuestos = drd.Item("Impuestos").ToString
-                    'oLETES.Periodicidad = drd.Item("Periodic").ToString
-                    'oLETES.RendimientoBruto = drd.Item("RendBruto").ToString
-                    'oLETES.RendimientoNeto = drd.Item("RendNeto").ToString
-                    'oLETES.IngresoBruto = drd.Item("IngrBruto").ToString
-                    'oLETES.IngresoNeto = drd.Item("IngrNeto").ToString
-                    'oLETES.ValorTransado = drd.Item("ValTrans").ToString
-                    'oLETES.Precio = drd.Item("Precio").ToString
-                    'oLETES.TotalaPagar = drd.Item("TotPagar").ToString
-                End If
-
-            Else
-                'NO SE ENCONTRO EL REGISTRO
-            End If
-            drd.Close()
-            cmd.Dispose()
-            cn.Dispose()
-
-        End If
-
-        Return oLETES
-    End Function
-    Public Function Comprobar(ByVal CodInversion As String) As Integer
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim count As Integer = 0
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "SELECT COUNT('A') FROM [dbo].[LET0] T0 WHERE T0.CodInv=@CodInversion"
-        cmd = New SqlCommand
-
-
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInversion", SqlDbType.VarChar).Value = CodInversion
-        cmd.Connection = cn
-
-        count = cmd.ExecuteScalar
-        cn.Close()
-        Return count
-    End Function
     Public Function Cargar(ByVal CodInversion As String, ByVal Instrumento As String)
         Dim objCon As New Conexion
         Dim sql As String
@@ -954,7 +663,7 @@ where [CodInv]=   @CodInv
         cmd.Parameters.Add("@CodInversion", SqlDbType.VarChar).Value = CodInversion
         cmd.Connection = cn
 
-        ' Dim Datos = cmd.ExecuteScalar
+
         Dim Datos = cmd.ExecuteReader
         If Datos.HasRows Then
             'SE ENCONTRO EL REGISTRO

+ 33 - 231
DAO/PrestamoEmpresarialDAO.vb

@@ -2,7 +2,7 @@
 Public Class PrestamoEmpresarialDAO
 
 
-
+    Dim Operaciones As New Operaciones
 
     Public Function ProcesoDatos(ByVal Coleccion As Collection, ByVal Codigo As String, ByVal Diccionario2 As Dictionary(Of String, Collection), ByVal Estado As String)
         Dim objCon As New Conexion
@@ -75,15 +75,15 @@ Public Class PrestamoEmpresarialDAO
             cmd.Transaction = myTrans
             With cmd.Parameters
                 .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@monto", SqlDbType.Float).Value = CDec(Coleccion(1))
-                .Add("@fechaoper", SqlDbType.DateTime).Value = CDate(Coleccion(2))
-                .Add("@fechaven", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-                .Add("@tasa", SqlDbType.Float).Value = CDec(Coleccion(4))
-                .Add("@periodicidad", SqlDbType.VarChar).Value = Coleccion(5)
-                .Add("@base", SqlDbType.Int).Value = CInt(Coleccion(6))
-                .Add("@tipotasa", SqlDbType.VarChar).Value = Coleccion(7)
-                .Add("@comisiondesembolso", SqlDbType.Float).Value = CDec(Coleccion(8))
-                .Add("@plazodias", SqlDbType.Int).Value = CInt(Coleccion(9))
+                .Add("@monto", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(1).ToString)
+                .Add("@fechaoper", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@fechaven", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+                .Add("@tasa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@periodicidad", SqlDbType.VarChar).Value = Coleccion(5).ToString
+                .Add("@base", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(6).ToString)
+                .Add("@tipotasa", SqlDbType.VarChar).Value = Coleccion(7).ToString
+                .Add("@comisiondesembolso", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(8).ToString)
+                .Add("@plazodias", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(9).ToString)
 
 
             End With
@@ -165,33 +165,23 @@ Public Class PrestamoEmpresarialDAO
 
 
                         .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                        .Add("@correlativo", SqlDbType.Int).Value = Coleccion2(1)
-                        .Add("@plazo", SqlDbType.Int).Value = Coleccion2(2)
-                        .Add("@fechapago", SqlDbType.Date).Value = Coleccion2(3)
-                        .Add("@ingresarcomision", SqlDbType.Float).Value = Coleccion2(4)
-                        .Add("@ingresarinteres", SqlDbType.Float).Value = Coleccion2(5)
-                        .Add("@IVA", SqlDbType.Float).Value = Coleccion2(6)
-                        .Add("@amortizacion", SqlDbType.Float).Value = Coleccion2(7)
-                        .Add("@saldopendiente", SqlDbType.Float).Value = Coleccion2(8)
-                        .Add("@montorecibir", SqlDbType.Float).Value = Coleccion2(9)
-
-
-                    If Coleccion2(10) Is DBNull.Value Then
-                        .Add("@fechacorte", SqlDbType.Date).Value = DBNull.Value
-                    Else
+                        .Add("@correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(1).ToString)
+                        .Add("@plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(2).ToString)
+                        .Add("@fechapago", SqlDbType.Date).Value = Operaciones.ConvertirFecha(Coleccion2(3).ToString)
+                        .Add("@ingresarcomision", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(4).ToString)
+                        .Add("@ingresarinteres", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(5).ToString)
+                        .Add("@IVA", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(6).ToString)
+                        .Add("@amortizacion", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(7).ToString)
+                        .Add("@saldopendiente", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(8))
+                        .Add("@montorecibir", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(9).ToString)
+                        .Add("@fechacorte", SqlDbType.Date).Value = Operaciones.ConvertirFechaBaseDatos(Coleccion2(10).ToString)
 
 
-                        If String.IsNullOrEmpty(Coleccion2(10)) Then
-                            .Add("@fechacorte", SqlDbType.Date).Value = DBNull.Value
-                        Else
-                            .Add("@fechacorte", SqlDbType.Date).Value = Coleccion2(10)
-                        End If
 
 
-                    End If
 
 
-                End With
+                    End With
 
                     retorno = cmd.ExecuteNonQuery
 
@@ -232,125 +222,14 @@ Public Class PrestamoEmpresarialDAO
 
     End Function
 
-    Public Function NuevoDato(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "INSERT INTO [dbo].[PEMP0](
-           [CodInv]
-            ,[monto]
-            ,[fechaoper]
-            ,[fechaven]
-            ,[tasa]
-            ,[periodicidad]
-            ,[base]
-            ,[tipotasa]
-            ,[comisiondesembolso]
-            ,[plazodias]
 
-) VALUES(
-           @CodInv
-            ,@monto
-            ,@fechaoper
-            ,@fechaven
-            ,@tasa
-            ,@periodicidad
-            ,@base
-            ,@tipotasa
-            ,@comisiondesembolso
-            ,@plazodias
-)
-    "
 
 
-        cmd = New SqlCommand
-        cmd.CommandText = sql
 
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@monto", SqlDbType.Float).Value = CDec(Coleccion(1))
-            .Add("@fechaoper", SqlDbType.DateTime).Value = CDate(Coleccion(2))
-            .Add("@fechaven", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-            .Add("@tasa", SqlDbType.Float).Value = CDec(Coleccion(4))
-            .Add("@periodicidad", SqlDbType.VarChar).Value = Coleccion(5)
-            .Add("@base", SqlDbType.Int).Value = CInt(Coleccion(6))
-            .Add("@tipotasa", SqlDbType.VarChar).Value = Coleccion(7)
-            .Add("@comisiondesembolso", SqlDbType.Float).Value = CDec(Coleccion(8))
-            .Add("@plazodias", SqlDbType.Int).Value = CInt(Coleccion(9))
 
 
-        End With
 
 
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Close()
-        Return retorno
-
-    End Function
-
-
-
-
-
-    Public Function ModificarDato(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "UPDATE [dbo].[PEMP0] SET
-          
-            [monto]=@monto
-            ,[fechaoper]=@fechaoper
-            ,[fechaven]=@fechaven
-            ,[tasa]=@tasa
-            ,[periodicidad]=@periodicidad
-            ,[base]=@base
-            ,[tipotasa]=@tipotasa
-            ,[comisiondesembolso]=@comisiondesembolso
-            ,[plazodias]=@plazodias
-            where  [CodInv]=@CodInv
-    "
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@monto", SqlDbType.Float).Value = CDec(Coleccion(1))
-            .Add("@fechaoper", SqlDbType.DateTime).Value = CDate(Coleccion(2))
-            .Add("@fechaven", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-            .Add("@tasa", SqlDbType.Float).Value = CDec(Coleccion(4))
-            .Add("@periodicidad", SqlDbType.VarChar).Value = Coleccion(5)
-            .Add("@base", SqlDbType.Int).Value = CInt(Coleccion(6))
-            .Add("@tipotasa", SqlDbType.VarChar).Value = Coleccion(7)
-            .Add("@comisiondesembolso", SqlDbType.Float).Value = CDec(Coleccion(8))
-            .Add("@plazodias", SqlDbType.Int).Value = CInt(Coleccion(9))
-
-
-        End With
-
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Close()
-        Return retorno
-
-    End Function
-
 
 
 
@@ -404,30 +283,25 @@ Public Class PrestamoEmpresarialDAO
         With cmd.Parameters
 
 
-                .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@correlativo", SqlDbType.Int).Value = Coleccion(1)
-                .Add("@plazo", SqlDbType.Int).Value = Coleccion(2)
-                .Add("@fechapago", SqlDbType.Date).Value = Coleccion(3)
-                .Add("@ingresarcomision", SqlDbType.Float).Value = Coleccion(4)
-                .Add("@ingresarinteres", SqlDbType.Float).Value = Coleccion(5)
-                .Add("@IVA", SqlDbType.Float).Value = Coleccion(6)
-                .Add("@amortizacion", SqlDbType.Float).Value = Coleccion(7)
-                .Add("@saldopendiente", SqlDbType.Float).Value = Coleccion(8)
-                .Add("@montorecibir", SqlDbType.Float).Value = Coleccion(9)
-
+            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
+            .Add("@correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(1).ToString)
+            .Add("@plazo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(2).ToString)
+            .Add("@fechapago", SqlDbType.Date).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+            .Add("@ingresarcomision", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+            .Add("@ingresarinteres", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+            .Add("@IVA", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@amortizacion", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
+            .Add("@saldopendiente", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(8))
+            .Add("@montorecibir", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(9).ToString)
+            .Add("@fechacorte", SqlDbType.Date).Value = Operaciones.ConvertirFechaBaseDatos(Coleccion(10).ToString)
 
 
-                If String.IsNullOrEmpty(Coleccion(10)) Then
-                    .Add("@fechacorte", SqlDbType.Date).Value = DBNull.Value
-                Else
-                    .Add("@fechacorte", SqlDbType.Date).Value = Coleccion(10)
-                End If
 
 
 
 
 
-            End With
+        End With
 
 
             cmd.Connection = cn
@@ -447,79 +321,7 @@ Public Class PrestamoEmpresarialDAO
 
 
 
-    Public Function ModificarDetalle(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "UPDATE [dbo].[PEMP1] SET
-            [plazo]=@plazo
-            ,[fechapago]=@fechapago
-            ,[ingresarcomision]=@ingresarcomision
-            ,[ingresarinteres]=@ingresarinteres
-            ,[IVA]=@IVA
-            ,[amortizacion]=@amortizacion
-            ,[montorecibir]=@montorecibir
-            ,[saldopendiente]=@saldopendiente
-            ,[fechacorte]=@fechacorte
-            where [CodInv]=@CodInv AND [correlativo]=@correlativo
-          
-    "
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        Try
-
-
-
-            With cmd.Parameters
-
-
-                .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@correlativo", SqlDbType.Int).Value = Coleccion(1)
-                .Add("@plazo", SqlDbType.Int).Value = Coleccion(2)
-                .Add("@fechapago", SqlDbType.Date).Value = Coleccion(3)
-                .Add("@ingresarcomision", SqlDbType.Float).Value = Coleccion(4)
-                .Add("@ingresarinteres", SqlDbType.Float).Value = Coleccion(5)
-                .Add("@IVA", SqlDbType.Float).Value = Coleccion(6)
-                .Add("@amortizacion", SqlDbType.Float).Value = Coleccion(7)
-                .Add("@saldopendiente", SqlDbType.Float).Value = Coleccion(8)
-                .Add("@montorecibir", SqlDbType.Float).Value = Coleccion(9)
-
-
-                If Coleccion(10) Is DBNull.Value Then
-                    .Add("@fechacorte", SqlDbType.Date).Value = DBNull.Value
-
-
-                Else
-                    If String.IsNullOrEmpty(Coleccion(10)) Then
-                        .Add("@fechacorte", SqlDbType.Date).Value = DBNull.Value
-                    Else
-                        .Add("@fechacorte", SqlDbType.Date).Value = Coleccion(10)
-                    End If
-
-
-                End If
-
-
-
-            End With
-
-            cmd.Connection = cn
 
-            retorno = cmd.ExecuteNonQuery
-        Catch ex As Exception
-            Return Nothing
-        End Try
-        cn.Close()
-        Return retorno
-
-    End Function
 
 
 

+ 47 - 360
DAO/PrestamoPersonalDAO.vb

@@ -1,12 +1,6 @@
 Imports System.Data.SqlClient
 Public Class PrestamoPersonalDAO
-
-
-
-
-
-
-
+    Dim Operaciones As New Operaciones
 
     Public Function ProcesoDatos(ByVal Coleccion As Collection, ByVal Coleccion2 As Collection, ByVal Codigo As String, ByVal Diccionario As Dictionary(Of String, Collection), ByVal EstadoDeudor As String, ByVal EstadoDetalles As String)
         Dim objCon As New Conexion
@@ -68,12 +62,11 @@ Public Class PrestamoPersonalDAO
 
             With cmd.Parameters
                 .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@nombredeudor", SqlDbType.VarChar).Value = Coleccion(1)
-                .Add("@numerodeudor", SqlDbType.VarChar).Value = Coleccion(2)
-                .Add("@fechaotorga", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-                .Add("@fechapago", SqlDbType.DateTime).Value = CDate(Coleccion(4))
-
-                .Add("@periodogracia", SqlDbType.Float).Value = CDec(Coleccion(5))
+                .Add("@nombredeudor", SqlDbType.VarChar).Value = Coleccion(1).ToString
+                .Add("@numerodeudor", SqlDbType.VarChar).Value = Coleccion(2).ToString
+                .Add("@fechaotorga", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(3).ToString)
+                .Add("@fechapago", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(4).ToString)
+                .Add("@periodogracia", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
 
             End With
 
@@ -139,13 +132,13 @@ Public Class PrestamoPersonalDAO
             cmd.Transaction = myTrans
             With cmd.Parameters
                 .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@tasainteres", SqlDbType.Float).Value = CDec(Coleccion2(1))
-                .Add("@duracionprestamo", SqlDbType.Float).Value = CDec(Coleccion2(2))
-                .Add("@totalcuotas", SqlDbType.Float).Value = CDec(Coleccion2(3))
-                .Add("@montoprestamo", SqlDbType.Float).Value = CDec(Coleccion2(4))
-                .Add("@seguro", SqlDbType.Float).Value = CDec(Coleccion2(5))
-                .Add("@CuotaSinSeguro", SqlDbType.Float).Value = CDec(Coleccion2(6))
-                .Add("@CuotaReal", SqlDbType.Float).Value = CDec(Coleccion2(7))
+                .Add("@tasainteres", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(1).ToString)
+                .Add("@duracionprestamo", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(2).ToString)
+                .Add("@totalcuotas", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(3).ToString)
+                .Add("@montoprestamo", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(4).ToString)
+                .Add("@seguro", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(5).ToString)
+                .Add("@CuotaSinSeguro", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(6).ToString)
+                .Add("@CuotaReal", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(7).ToString)
             End With
 
 
@@ -239,27 +232,23 @@ Public Class PrestamoPersonalDAO
 
                     With cmd.Parameters
                         .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                        .Add("@correlativo", SqlDbType.Int).Value = CInt(Coleccion3(1))
-                        .Add("@fecha", SqlDbType.DateTime).Value = CDate(Coleccion3(2))
-                        .Add("@Periodo", SqlDbType.Int).Value = CInt(Coleccion3(3))
-                        .Add("@saldoinicial", SqlDbType.Float).Value = CDec(Coleccion3(4))
-                        .Add("@pagocuota", SqlDbType.Float).Value = CDec(Coleccion3(5))
-                        .Add("@pagointeresIVA", SqlDbType.Float).Value = CDec(Coleccion3(6))
-                        .Add("@IVAinteres", SqlDbType.Float).Value = CDec(Coleccion3(7))
-                        .Add("@pagointeres", SqlDbType.Float).Value = CDec(Coleccion3(8))
-                        .Add("@abono", SqlDbType.Float).Value = CDec(Coleccion3(9))
-                        .Add("@prestamoremanente", SqlDbType.Float).Value = CDec(Coleccion3(10))
-                        .Add("@pagodanos", SqlDbType.Float).Value = CDec(Coleccion3(11))
-                        .Add("@pagovivienta", SqlDbType.Float).Value = CDec(Coleccion3(12))
-                        .Add("@totalcuota", SqlDbType.Float).Value = CDec(Coleccion3(13))
-                        .Add("@totalpagado", SqlDbType.Float).Value = CDec(Coleccion3(14))
-                        .Add("@abonoextra", SqlDbType.Float).Value = CDec(Coleccion3(15))
-                        If String.IsNullOrEmpty(Coleccion3(16).ToString) Then
-                            .Add("@fechacorte", SqlDbType.Date).Value = DBNull.Value
-                        Else
-
-                            .Add("@fechacorte", SqlDbType.Date).Value = Coleccion3(16)
-                        End If
+                        .Add("@correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion3(1).ToString)
+                        .Add("@fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion3(2).ToString)
+                        .Add("@Periodo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion3(3).ToString)
+                        .Add("@saldoinicial", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(4).ToString)
+                        .Add("@pagocuota", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(5).ToString)
+                        .Add("@pagointeresIVA", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(6).ToString)
+                        .Add("@IVAinteres", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(7).ToString)
+                        .Add("@pagointeres", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(8).ToString)
+                        .Add("@abono", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(9).ToString)
+                        .Add("@prestamoremanente", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(10).ToString)
+                        .Add("@pagodanos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(11).ToString)
+                        .Add("@pagovivienta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(12).ToString)
+                        .Add("@totalcuota", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(13).ToString)
+                        .Add("@totalpagado", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(14).ToString)
+                        .Add("@abonoextra", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion3(15).ToString)
+                        .Add("@fechacorte", SqlDbType.Date).Value = Operaciones.ConvertirFechaBaseDatos(Coleccion3(16).ToString)
+
 
                     End With
 
@@ -320,115 +309,6 @@ Public Class PrestamoPersonalDAO
 
 
 
-    Public Function NuevoDeudor(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "INSERT INTO [dbo].[PPER0](
-           [CodInv]
-           ,[nombredeudor]
-           ,[numerodeudor]
-           ,[fechaotorga]
-           ,[fechapago]
-           ,[periodogracia]
-) VALUES(
-           @CodInv
-           ,@nombredeudor
-           ,@numerodeudor
-           ,@fechaotorga
-           ,@fechapago
-           ,@periodogracia
-)
-    "
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@nombredeudor", SqlDbType.VarChar).Value = Coleccion(1)
-            .Add("@numerodeudor", SqlDbType.VarChar).Value = Coleccion(2)
-            .Add("@fechaotorga", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-            .Add("@fechapago", SqlDbType.DateTime).Value = CDate(Coleccion(4))
-
-            .Add("@periodogracia", SqlDbType.Float).Value = CDec(Coleccion(5))
-
-        End With
-
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Dispose()
-        cn.Close()
-        Return retorno
-
-    End Function
-
-
-
-
-
-
-
-    Public Function ModificarDeudor(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "UPDATE [dbo].[PPER0] SET
-           
-           [nombredeudor]=@nombredeudor
-           ,[numerodeudor]=@numerodeudor
-           ,[fechaotorga]=@fechaotorga
-           ,[fechapago]=@fechapago
-           ,[periodogracia]=@periodogracia
-           where [CodInv]=@CodInv
-
-    "
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@nombredeudor", SqlDbType.VarChar).Value = Coleccion(1)
-            .Add("@numerodeudor", SqlDbType.VarChar).Value = Coleccion(2)
-            .Add("@fechaotorga", SqlDbType.DateTime).Value = CDate(Coleccion(3))
-            .Add("@fechapago", SqlDbType.DateTime).Value = CDate(Coleccion(4))
-            .Add("@periodogracia", SqlDbType.Float).Value = CDec(Coleccion(5))
-
-        End With
-
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Dispose()
-        cn.Close()
-        Return retorno
-
-    End Function
-
-
-
-
-
-
-
-
-
 
 
 
@@ -438,112 +318,25 @@ Public Class PrestamoPersonalDAO
 
 
 
-    Public Function NuevoDetalle(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "INSERT INTO [dbo].[PPER1](        
-           [CodInv]
-           ,[tasainteres]
-           ,[duracionprestamo]
-           ,[totalcuotas]
-           ,[montoprestamo]
-           ,[seguro]
-            ,[CuotaSinSeguro]
-            ,[CuotaReal]
-
-) VALUES(
-           @CodInv
-           ,@tasainteres
-           ,@duracionprestamo
-           ,@totalcuotas
-           ,@montoprestamo
-           ,@seguro
-           ,@CuotaSinSeguro
-           ,@CuotaReal
 
-)
-    "
 
-        cmd = New SqlCommand
-        cmd.CommandText = sql
 
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@tasainteres", SqlDbType.Float).Value = CDec(Coleccion(1))
-            .Add("@duracionprestamo", SqlDbType.Float).Value = CDec(Coleccion(2))
-            .Add("@totalcuotas", SqlDbType.Float).Value = CDec(Coleccion(3))
-            .Add("@montoprestamo", SqlDbType.Float).Value = CDec(Coleccion(4))
-            .Add("@seguro", SqlDbType.Float).Value = CDec(Coleccion(5))
-            .Add("@CuotaSinSeguro", SqlDbType.Float).Value = CDec(Coleccion(6))
-            .Add("@CuotaReal", SqlDbType.Float).Value = CDec(Coleccion(7))
-        End With
 
 
-        cmd.Connection = cn
 
-        retorno = cmd.ExecuteNonQuery
-        cn.Dispose()
-        cn.Close()
 
-        Return retorno
 
-    End Function
 
-    Public Function ModificarDetalle(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "UPDATE  [dbo].[PPER1] SET       
-           
-           [tasainteres]=@tasainteres
-           ,[duracionprestamo]=@duracionprestamo
-           ,[totalcuotas]=@totalcuotas
-           ,[montoprestamo]=@montoprestamo
-           ,[seguro]=@seguro
-            ,[CuotaSinSeguro]=@CuotaSinSeguro
-            ,[CuotaReal]=@CuotaReal
-           where [CodInv]=@CodInv
- 
 
 
-    "
 
-        cmd = New SqlCommand
-        cmd.CommandText = sql
 
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@tasainteres", SqlDbType.Float).Value = CDec(Coleccion(1))
-            .Add("@duracionprestamo", SqlDbType.Float).Value = CDec(Coleccion(2))
-            .Add("@totalcuotas", SqlDbType.Float).Value = CDec(Coleccion(3))
-            .Add("@montoprestamo", SqlDbType.Float).Value = CDec(Coleccion(4))
-            .Add("@seguro", SqlDbType.Float).Value = CDec(Coleccion(5))
-            .Add("@CuotaSinSeguro", SqlDbType.Float).Value = CDec(Coleccion(6))
-            .Add("@CuotaReal", SqlDbType.Float).Value = CDec(Coleccion(7))
 
-        End With
 
 
-        cmd.Connection = cn
 
-        retorno = cmd.ExecuteNonQuery
 
-        cn.Dispose()
-        cn.Close()
-        Return retorno
 
-    End Function
 
 
 
@@ -603,27 +396,23 @@ Public Class PrestamoPersonalDAO
 
         With cmd.Parameters
             .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@correlativo", SqlDbType.Int).Value = CInt(Coleccion(1))
-            .Add("@fecha", SqlDbType.DateTime).Value = CDate(Coleccion(2))
-            .Add("@Periodo", SqlDbType.Int).Value = CInt(Coleccion(3))
-            .Add("@saldoinicial", SqlDbType.Float).Value = CDec(Coleccion(4))
-            .Add("@pagocuota", SqlDbType.Float).Value = CDec(Coleccion(5))
-            .Add("@pagointeresIVA", SqlDbType.Float).Value = CDec(Coleccion(6))
-            .Add("@IVAinteres", SqlDbType.Float).Value = CDec(Coleccion(7))
-            .Add("@pagointeres", SqlDbType.Float).Value = CDec(Coleccion(8))
-            .Add("@abono", SqlDbType.Float).Value = CDec(Coleccion(9))
-            .Add("@prestamoremanente", SqlDbType.Float).Value = CDec(Coleccion(10))
-            .Add("@pagodanos", SqlDbType.Float).Value = CDec(Coleccion(11))
-            .Add("@pagovivienta", SqlDbType.Float).Value = CDec(Coleccion(12))
-            .Add("@totalcuota", SqlDbType.Float).Value = CDec(Coleccion(13))
-            .Add("@totalpagado", SqlDbType.Float).Value = CDec(Coleccion(14))
-            .Add("@abonoextra", SqlDbType.Float).Value = CDec(Coleccion(15))
-            If String.IsNullOrEmpty(Coleccion(16).ToString) Then
-                .Add("@fechacorte", SqlDbType.Date).Value = DBNull.Value
-            Else
+            .Add("@correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(1).ToString)
+            .Add("@fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+            .Add("@Periodo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(3).ToString)
+            .Add("@saldoinicial", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+            .Add("@pagocuota", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+            .Add("@pagointeresIVA", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@IVAinteres", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
+            .Add("@pagointeres", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(8).ToString)
+            .Add("@abono", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(9).ToString)
+            .Add("@prestamoremanente", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(10).ToString)
+            .Add("@pagodanos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(11).ToString)
+            .Add("@pagovivienta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(12).ToString)
+            .Add("@totalcuota", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(13).ToString)
+            .Add("@totalpagado", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(14).ToString)
+            .Add("@abonoextra", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(15).ToString)
+            .Add("@fechacorte", SqlDbType.Date).Value = Operaciones.ConvertirFechaBaseDatos(Coleccion(16).ToString)
 
-                .Add("@fechacorte", SqlDbType.date).Value = Coleccion(16)
-            End If
 
         End With
 
@@ -640,66 +429,7 @@ Public Class PrestamoPersonalDAO
 
 
 
-    Public Function ModificarAmortizacion(ByVal Coleccion As Collection, ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "UPDATE [dbo].[PPER2] SET
-           
-           [fecha]=@fecha
-           ,[Periodo]=@Periodo
-           ,[saldoinicial]=@saldoinicial
-           ,[pagocuota]=@pagocuota
-           ,[pagointeresIVA]=@pagointeresIVA
-           ,[IVAinteres]=@IVAinteres
-           ,[pagointeres]=@pagointeres
-           ,[abono]=@abono
-           ,[prestamoremanente]=@prestamoremanente
-           ,[pagodanos]=@pagodanos
-           ,[pagovivienta]=@pagovivienta
-           ,[totalcuota]=@totalcuota
-           ,[totalpagado]=@totalpagado
-           ,[abonoextra]=@abonoextra
-           ,[correlativo]=@correlativo
-           where [CodInv]=@CodInv 
-    "
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@fecha", SqlDbType.DateTime).Value = CDate(Coleccion(1))
-            .Add("@Periodo", SqlDbType.Int).Value = CInt(Coleccion(2))
-            .Add("@saldoinicial", SqlDbType.Float).Value = CDec(Coleccion(3))
-            .Add("@pagocuota", SqlDbType.Float).Value = CDec(Coleccion(4))
-            .Add("@pagointeresIVA", SqlDbType.Float).Value = CDec(Coleccion(5))
-            .Add("@IVAinteres", SqlDbType.Float).Value = CDec(Coleccion(6))
-            .Add("@pagointeres", SqlDbType.Float).Value = CDec(Coleccion(7))
-            .Add("@abono", SqlDbType.Float).Value = CDec(Coleccion(8))
-            .Add("@prestamoremanente", SqlDbType.Float).Value = CDec(Coleccion(9))
-            .Add("@pagodanos", SqlDbType.Float).Value = CDec(Coleccion(10))
-            .Add("@pagovivienta", SqlDbType.Float).Value = CDec(Coleccion(11))
-            .Add("@totalcuota", SqlDbType.Float).Value = CDec(Coleccion(12))
-            .Add("@totalpagado", SqlDbType.Float).Value = CDec(Coleccion(13))
-            .Add("@abonoextra", SqlDbType.Float).Value = CDec(Coleccion(14))
-            .Add("@correlativo", SqlDbType.Int).Value = CInt(Coleccion(15))
-
-        End With
-
-        cmd.Connection = cn
 
-        retorno = cmd.ExecuteNonQuery
-        cn.Dispose()
-        cn.Close()
-        Return retorno
-
-    End Function
 
 
 
@@ -724,7 +454,7 @@ Public Class PrestamoPersonalDAO
         cmd.Parameters.Add("@Codigo", SqlDbType.VarChar).Value = Codigo
         cmd.Connection = cn
 
-        ' Dim Datos = cmd.ExecuteScalar
+
         Dim Datos = cmd.ExecuteReader
         If Datos.HasRows Then
             'SE ENCONTRO EL REGISTRO
@@ -880,50 +610,7 @@ Public Class PrestamoPersonalDAO
 
     End Sub
 
-    Public Sub EliminarDetalle(ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim res As Integer
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "DELETE FROM [dbo].[PPER1]
-      WHERE [CodInv]=@CodInv"
 
 
 
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-        cmd.Connection = cn
-
-        res = cmd.ExecuteNonQuery
-        cn.Close()
-    End Sub
-
-
-    Public Sub EliminarAmortizacion(ByVal Codigo As String)
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim res As Integer
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "DELETE FROM [dbo].[PPER2]
-      WHERE [CodInv]=@CodInv "
-
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-        cmd.Connection = cn
-
-        res = cmd.ExecuteNonQuery
-        cn.Close()
-    End Sub
 End Class

+ 0 - 235
DAO/RegistrosDAO.vb

@@ -1,239 +1,4 @@
 Imports System.Data.SqlClient
 Public Class RegistrosDAO
 
-
-
-
-
-
-
-    Public Function CargarInv(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodInv Like '%" + codigo + "%') a left join REP0 on REP0.CodInv=a.CodInv where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-    Public Function CargarInvLETE(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodInv Like '%" + codigo + "%') a inner join LET0 on LET0.CodInv=a.CodInv where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-
-
-    Public Function CargarInvVCN(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodInv Like '%" + codigo + "%') a inner join VCN on VCN.CodInv=a.CodInv where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-
-    Public Function CargarInvPBUR(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodInv Like '%" + codigo + "%') a inner join PBUR on PBUR.CodInv=a.CodInv where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-    Public Function CargarInvPPER(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodInv Like '%" + codigo + "%') a inner join PPER0 on PPER0.CodInv=a.CodInv right join PPER1 on PPER1.CodInv=a.CodInv right join PPER2 on PPER2.CodInv=a.CodInv  where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-
-
-    Public Function CargarInvFUTU(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodInv Like '%" + codigo + "%') a inner join FUT0 on FUT0.CodInv=a.CodInv   where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-    Public Function CargarInvOPC(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodInv Like '%" + codigo + "%') a inner join OPC0 on OPC0.CodInv=a.CodInv   where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-
-    Public Function CargarInvACCC(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodIF Like '%" + codigo + "%') a inner join ACC0 on ACC0.CodInv=a.CodInv    where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-        ' Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodIF Like '%" + codigo + "%') a inner join ACC0 on ACC0.CodInv=a.CodInv inner join ACC1 on ACC1.CodInv=a.CodInv   where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-
-    Public Function CargarInvPEMP(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodInv Like '%" + codigo + "%') a inner join PEMP0 on PEMP0.CodInv=a.CodInv inner join PEMP1 on PEMP1.CodInv=a.CodInv where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-
-
-
-    Public Function CargarInvFINV(ByVal codigo As String, ByVal Ini As Integer, ByVal final As Integer)
-        Dim objCon As New Conexion
-        If (Ini = 1) Then
-            Ini = Ini - 1
-        End If
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "Select * FROM( SELECT *, ROW_NUMBER() OVER (ORDER BY CodInv)  As row FROM INV0 where CodInv Like '%" + codigo + "%') a inner join FINV on FINV.CodInv=a.CodInv inner join FINV1 on FINV1.CodInv=a.CodInv where row > " + Ini.ToString + " and row <= " + final.ToString + ""
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        Dim dr As SqlDataReader
-        dr = cmd.ExecuteReader
-
-        Return dr
-    End Function
-
-    Public Function Contador(ByVal codigo As String)
-        Dim objCon As New Conexion
-        Dim Cantidad As Integer
-        Dim sql As String
-        Dim Valor, tamaño
-        Dim cmd As SqlCommand = New SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "select count(*) from INV0 where CodInv Like '%" + codigo + "%'"
-        cmd.CommandText = sql
-        cmd.Connection = cn
-
-
-        Cantidad = cmd.ExecuteScalar
-        cn.Close()
-        Valor = Math.Round(Cantidad / 100, 0)
-        If (Cantidad > Valor) Then
-            tamaño = Valor + 1
-        Else
-            tamaño = Valor
-        End If
-        Return tamaño
-    End Function
-
-
-
-
 End Class

+ 28 - 533
DAO/ReportosDAO.vb

@@ -5,12 +5,7 @@ Public Class ReportosDAO
 
     Dim Operaciones As New Operaciones
 
-    Public Function Nuevo(ByVal oReporto As ReportosCE) As Integer
-        Dim retorno As Integer
-
 
-        Return retorno
-    End Function
 
 
     Public Function ProcesoDatos(ByVal Diccionario As Dictionary(Of String, Collection), ByVal Codigo As String, ByVal Tabla As String)
@@ -367,216 +362,9 @@ Public Class ReportosDAO
 
 
 
-    Public Function Nuevo(ByVal oReporto As ReportosCE, DocId As Integer, Tipo As String) As Integer
-        Dim objCon As New Conexion
-        Dim retorno As Integer = -1
-        Dim Transaccion As SqlTransaction
-        Dim query As String
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim Tabla As String = ""
-
-
-        If Tipo = "P" Then
-            Tabla = "PREP"
-        End If
-        If Tipo = "I" Then
-            Tabla = "IREP"
-        End If
-
-        Dim cmd As SqlCommand = cn.CreateCommand
-
-        Transaccion = cn.BeginTransaction("NuevoLete")
-        cmd.Connection = cn
-        cmd.Transaction = Transaccion
-
-        query = "INSERT INTO [dbo].[PREP]
-           ([DocId]
-           ,[CodInv]           
-           ,[ValTrans]
-           ,[Dias]
-           ,[FVenc]
-           ,[Rend]
-           ,[OtrosCostos]
-           ,[TotCostos]
-           ,[MontoLiq]
-           ,[InterGen]
-           ,[CostoTransfr]
-           ,[RendNetoAntImp]
-           ,[ValReCompra]
-           ,[ImpLiquidacion]
-           ,[IngrNeto]
-           ,[ValNeto]
-           ,[RendNetoDespImp])
-     VALUES
-           (@DocId
-           ,@CodInv
-           ,@ValTrans
-           ,@Dias
-           ,@FVenc
-           ,@Rend
-           ,@OtrosCostos
-           ,@TotCostos
-           ,@MontoLiq
-           ,@InterGen
-           ,@CostoTransfr
-           ,@RendNetoAntImp
-           ,@ValReCompra
-           ,@ImpLiquidacion
-           ,@IngrNeto
-           ,@ValNeto
-           ,@RendNetoDespImp
-		   )"
-
-
-        cmd.CommandText = query
-
-        With cmd.Parameters
-            .Add("@DocId", SqlDbType.Int).Value = DocId
-            .Add("@CodInv", SqlDbType.VarChar).Value = oReporto.ValorTransado
-            .Add("@ValTrans", SqlDbType.Decimal).Value = oReporto.ValorTransado
-            .Add("@Dias", SqlDbType.Int).Value = oReporto.Dias
-            .Add("@FVenc", SqlDbType.DateTime).Value = oReporto.FechaVencimiento
-            .Add("@Rend", SqlDbType.Decimal).Value = oReporto.Rendimiento
-            .Add("@OtrosCostos", SqlDbType.Decimal).Value = oReporto.OtrosCostos
-            .Add("@TotCostos", SqlDbType.Decimal).Value = oReporto.TotalCostos
-            .Add("@MontoLiq", SqlDbType.Decimal).Value = oReporto.MontoALiquidar
-            .Add("@InterGen", SqlDbType.Decimal).Value = oReporto.InteresAGenerar
-            .Add("@CostoTransfr", SqlDbType.Decimal).Value = oReporto.CostoDeTransferencia
-            .Add("@RendNetoAntImp", SqlDbType.Decimal).Value = oReporto.RendimientoNetoAntesDeImpuestos
-            .Add("@ValReCompra", SqlDbType.Decimal).Value = oReporto.ValorReCompra
-            .Add("@ImpLiquidacion", SqlDbType.Decimal).Value = oReporto.ImpuestosLiquidacion
-            .Add("@IngrNeto", SqlDbType.Decimal).Value = oReporto.IngresoNeto
-            .Add("@ValNeto", SqlDbType.Decimal).Value = oReporto.ValorNeto
-            .Add("@RendNetoDespImp", SqlDbType.Decimal).Value = oReporto.RendimientoNetoDespuesDeImpuestos
-        End With
-
-        Try
-            cmd.ExecuteNonQuery()
-            Transaccion.Commit()
-            retorno = 0
-        Catch ex As Exception
-            MsgBox("Error al Guardar Reporto : " & ex.GetType.ToString)
-            MsgBox("Mensaje: " & ex.Message)
-            retorno = 1
-            Try
-                Transaccion.Rollback()
-                retorno = 2
-            Catch ex2 As Exception
-                MsgBox("Error en Rollback: " & ex2.GetType.ToString)
-                MsgBox("Mensaje Rollbak: " & ex2.Message)
-                retorno = 3
-            End Try
-        End Try
-
-        cmd.Dispose()
-        cn.Dispose()
-        Return retorno
-    End Function
-
-    Public Sub CargarRegistro(ByVal oReportos As ReportosCE, Tipo As String, IdRegistro As Integer)
-        Dim objCon As New Conexion
-        Dim drd As SqlDataReader
-        Dim cmd As SqlCommand
-        Dim sql As String
-        Dim Tabla As String
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        If Tipo = "P" Then
-            Tabla = "PREP"
-        End If
-        If Tipo = "I" Then
-            Tabla = "IREP"
-        End If
-
-        sql = "SELECT * FROM [dbo].[" & Tabla & "] T0 WHERE T0.[DocId]=@DocId"
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@DocId", SqlDbType.Int).Value = IdRegistro
-        cmd.Connection = cn
 
-        drd = cmd.ExecuteReader
-        If drd.HasRows Then
-            'SE ENCONTRO EL REGISTRO
-            If drd.Read Then
-                oReportos.CodigoCasa = drd.Item("CodCasa")
-                oReportos.Nombre = drd.Item("Nombre")
-                oReportos.FechaDeCompra = drd.Item("FCompra")
-                oReportos.ValorTransado = drd.Item("ValTrans")
-                oReportos.Dias = drd.Item("Dias")
-                oReportos.FechaVencimiento = drd.Item("FVenc")
-                oReportos.Rendimiento = drd.Item("Rend")
-                oReportos.Impuestos = drd.Item("Impuestos")
-                oReportos.OtrosCostos = drd.Item("OtrosCostos")
-                'oReportos.TotalCostos = drd.Item("TotCostos")
-                oReportos.MontoALiquidar = drd.Item("MontoLiq")
-                'oReportos.InteresAGenerar = drd.Item("InterGen")
-                oReportos.CostoDeTransferencia = drd.Item("CostoTransfr")
-                'oReportos.RendimientoNetoAntesDeImpuestos = drd.Item("RendNetoAntImp")
-                oReportos.ValorReCompra = drd.Item("ValReCompra")
-                oReportos.ImpuestosLiquidacion = drd.Item("ImpLiquidacion")
-                'oReportos.IngresoNeto = drd.Item("IngrNeto")
-                oReportos.ValorNeto = drd.Item("ValNeto")
-                'oReportos.RendimientoNetoDespuesDeImpuestos = drd.Item("RendNetoDespImp")
-            End If
-        Else
-            'NO SE ENCONTRO EL REGISTRO
-        End If
-        drd.Close()
-        cmd.Dispose()
-        cn.Dispose()
 
 
-    End Sub
-
-    Public Function CargarRegistro(ByVal vCodigoInversion As String) As ReportosCE
-        Dim objCon As New Conexion
-        Dim oReportosCE As ReportosCE
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim drd As SqlDataReader
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        oReportosCE = New ReportosCE
-        sql = "SELECT * FROM [dbo].[REP0] T0 WHERE T0.[CodInv]=@CodInv"
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = vCodigoInversion
-        cmd.Connection = cn
-
-        drd = cmd.ExecuteReader
-        If drd.HasRows Then
-            'SE ENCONTRO EL REGISTRO
-            If drd.Read Then
-                oReportosCE.CodigoInversion = vCodigoInversion
-                oReportosCE.Nombre = drd.Item("Nombre")
-                oReportosCE.FechaDeCompra = drd.Item("FCompra")
-                oReportosCE.ValorTransado = drd.Item("ValTrans")
-                oReportosCE.Dias = drd.Item("Dias")
-                oReportosCE.FechaVencimiento = drd.Item("FVenc")
-                oReportosCE.Rendimiento = drd.Item("Rend")
-            End If
-        Else
-            'NO SE ENCONTRO EL REGISTRO
-        End If
-
-        drd.Close()
-        cmd.Dispose()
-        cn.Dispose()
-
-        Return oReportosCE
-    End Function
-
 
     Public Function Nuevo(ByVal Coleccion As Collection, ByVal Codigo As String, ByVal Tabla As String)
         Dim objCon As New Conexion
@@ -735,35 +523,35 @@ Public Class ReportosDAO
 
 
         With cmd.Parameters
-                        .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                        .Add("@Nombre", SqlDbType.VarChar).Value = Coleccion(1)
-                        .Add("@FCompra", SqlDbType.DateTime).Value = Coleccion(2)
-                        .Add("@ValTrans", SqlDbType.Float).Value = Coleccion(3)
-                        .Add("@Dias", SqlDbType.Float).Value = Coleccion(4)
-                        .Add("@FVenc", SqlDbType.DateTime).Value = Coleccion(5)
-                        .Add("@Rend", SqlDbType.Float).Value = Coleccion(6)
-                        .Add("@CostoTransfr", SqlDbType.Float).Value = Coleccion(7)
-                        .Add("@codigo", SqlDbType.VarChar).Value = Coleccion(8)
-                        .Add("@ComisionCasa", SqlDbType.Decimal).Value = Coleccion(9)
-                        .Add("@ComisionBolsa", SqlDbType.Decimal).Value = Coleccion(10)
-                        .Add("@Casa", SqlDbType.VarChar).Value = Coleccion(11)
-                        .Add("@IOF", SqlDbType.Bit).Value = CByte(Coleccion(12))
+            .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
+            .Add("@Nombre", SqlDbType.VarChar).Value = Coleccion(1).ToString
+            .Add("@FCompra", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+            .Add("@ValTrans", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(3).ToString)
+            .Add("@Dias", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+            .Add("@FVenc", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(5).ToString)
+            .Add("@Rend", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@CostoTransfr", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
+            .Add("@codigo", SqlDbType.VarChar).Value = Coleccion(8).ToString
+            .Add("@ComisionCasa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(9).ToString)
+            .Add("@ComisionBolsa", SqlDbType.Decimal).Value = Operaciones.ConvertirDecimal(Coleccion(10).ToString)
+            .Add("@Casa", SqlDbType.VarChar).Value = Coleccion(11).ToString
+            .Add("@IOF", SqlDbType.Bit).Value = CByte(Coleccion(12))
             .Add("@Renta", SqlDbType.Bit).Value = CByte(Coleccion(13))
             .Add("@Base", SqlDbType.Int).Value = DBNull.Value
-            .Add("@ComisionCasaValor", SqlDbType.Float).Value = Coleccion(14)
-                .Add("@ComisionBolsaValor", SqlDbType.Float).Value = Coleccion(15)
-                .Add("@IOFValor", SqlDbType.Float).Value = Coleccion(16)
-                .Add("@OtrosCostos", SqlDbType.Float).Value = Coleccion(17)
-                .Add("@TotalCostos", SqlDbType.Float).Value = Coleccion(18)
-                .Add("@MontoLiq", SqlDbType.Float).Value = Coleccion(19)
-                .Add("@IntGenerar", SqlDbType.Float).Value = Coleccion(20)
-                .Add("@RendAntImp", SqlDbType.Float).Value = Coleccion(21)
-                .Add("@RendDesImp", SqlDbType.Float).Value = Coleccion(22)
-                .Add("@ImpLiq", SqlDbType.Float).Value = Coleccion(23)
-                .Add("@IngrNet", SqlDbType.Float).Value = Coleccion(24)
-            .Add("@ValorNet", SqlDbType.Float).Value = Coleccion(25)
-            .Add("@EstadoIOF", SqlDbType.Float).Value = Coleccion(24)
-            .Add("@EstadoRenta", SqlDbType.Float).Value = Coleccion(25)
+            .Add("@ComisionCasaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(14).ToString)
+            .Add("@ComisionBolsaValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(15).ToString)
+            .Add("@IOFValor", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(16).ToString)
+            .Add("@OtrosCostos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(17).ToString)
+            .Add("@TotalCostos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(18).ToString)
+            .Add("@MontoLiq", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(19).ToString)
+            .Add("@IntGenerar", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(20).ToString)
+            .Add("@RendAntImp", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(21).ToString)
+            .Add("@RendDesImp", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(22).ToString)
+            .Add("@ImpLiq", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(23).ToString)
+            .Add("@IngrNet", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(24).ToString)
+            .Add("@ValorNet", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(25).ToString)
+            .Add("@EstadoIOF", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(24).ToString)
+            .Add("@EstadoRenta", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(25).ToString)
 
 
         End With
@@ -783,172 +571,7 @@ Public Class ReportosDAO
 
 
 
-    Public Function Modificar(ByVal Coleccion As Collection, ByVal Codigo As String, ByVal Tabla As String)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-
-        If Tabla = "REP0" Then
-
-            sql = "UPDATE " + Tabla + " SET
-            [codigo]=@codigo
-            ,[Nombre]=@Nombre
-            ,[FCompra]=@FCompra
-            ,[ValTrans]=@ValTrans
-            ,[Dias]=@Dias
-            ,[FVenc]=@FVenc
-            ,[Rend]=@Rend
-            ,[CostoTransfr]=@CostoTransfr
-            ,[ComisionCasa]=@ComisionCasa
-            ,[ComisionBolsa]=@ComisionBolsa
-            ,[Casa]=@Casa
-            ,[IOF]=@IOF
-            ,[Renta]=@Renta
-            ,[Base]=@Base
-
-
-         ,[ComisionCasaValor]=@ComisionCasaValor
-            ,[ComisionBolsaValor]=@ComisionBolsaValor
-            ,[IOFValor]=@IOFValor
-            ,[OtrosCostos]=@OtrosCostos
-            ,[TotalCostos]=@TotalCostos
-            ,[MontoLiq]=@MontoLiq
-            ,[IntGenerar]=@IntGenerar
-            ,[RendAntImp]=@RendAntImp
-            ,[RendDesImp]=@RendDesImp
-            ,[ImpLiq]=@ImpLiq
-            ,[IngrNet]=@IngrNet
-            ,[ValorNet]=@ValorNet
-
-
-
-
-            where  [CodInv]=@CodInv AND ([codigo]=@codigo OR codigo is null)
-    "
-        Else
-
-            sql = "UPDATE " + Tabla + " SET
-   
-            [Monto]=@Monto
-            ,[FVenc]=@FVenc
-            ,[CostoFinanciero]=@CostoFinanciero
-            ,[Interes]=@Interes
-            ,[Bolsa]=@Bolsa
-            ,[TotPagar]=@TotPagar
-            ,[Nombre]=@Nombre
-            ,[FCompra]=@FCompra
-            ,[ComisionCasa]=@ComisionCasa
-            ,[ComisionBolsa]=@ComisionBolsa
-            ,[Casa]=@Casa
-            ,[Casa2]=@Casa2
-            ,[Dias]=@Dias
-            ,[Base]=@Base
-   where  [CodInv]=@CodInv AND ([codigo]=@codigo OR codigo is null)
-
-
-    "
-
-        End If
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        'Try
-
-        If Tabla = "REP0" Then
-
-
-            With cmd.Parameters
-                .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@Nombre", SqlDbType.VarChar).Value = Coleccion(1)
-                .Add("@FCompra", SqlDbType.DateTime).Value = Coleccion(2)
-                .Add("@ValTrans", SqlDbType.Float).Value = Coleccion(3)
-                .Add("@Dias", SqlDbType.Float).Value = Coleccion(4)
-                .Add("@FVenc", SqlDbType.DateTime).Value = Coleccion(5)
-                .Add("@Rend", SqlDbType.Float).Value = Coleccion(6)
-                .Add("@CostoTransfr", SqlDbType.Float).Value = Coleccion(7)
-                .Add("@codigo", SqlDbType.VarChar).Value = Coleccion(8)
-                .Add("@ComisionCasa", SqlDbType.Decimal).Value = Coleccion(9)
-                .Add("@ComisionBolsa", SqlDbType.Decimal).Value = Coleccion(10)
-                .Add("@Casa", SqlDbType.VarChar).Value = Coleccion(11)
-                .Add("@IOF", SqlDbType.Bit).Value = CByte(Coleccion(12))
-                .Add("@Renta", SqlDbType.Bit).Value = CByte(Coleccion(13))
-
-                If Coleccion(14) Is DBNull.Value Then
-                    '.Add("@Base", SqlDbType.Int).Value = 0
-                Else
-                    If String.IsNullOrEmpty(Coleccion(14)) Then
-                        '.Add("@Base", SqlDbType.Int).Value = 0
-                    Else
-                        '.Add("@Base", SqlDbType.Int).Value = Coleccion(14)
-                    End If
-
-                End If
-
-                .Add("@Base", SqlDbType.Int).Value = DBNull.Value
-
-
-                .Add("@ComisionCasaValor", SqlDbType.Float).Value = Coleccion(14)
-                .Add("@ComisionBolsaValor", SqlDbType.Float).Value = Coleccion(15)
-                .Add("@IOFValor", SqlDbType.Float).Value = Coleccion(16)
-                .Add("@OtrosCostos", SqlDbType.Float).Value = Coleccion(17)
-                .Add("@TotalCostos", SqlDbType.Float).Value = Coleccion(18)
-                .Add("@MontoLiq", SqlDbType.Float).Value = Coleccion(19)
-                .Add("@IntGenerar", SqlDbType.Float).Value = Coleccion(20)
-                .Add("@RendAntImp", SqlDbType.Float).Value = Coleccion(21)
-                .Add("@RendDesImp", SqlDbType.Float).Value = Coleccion(22)
-                .Add("@ImpLiq", SqlDbType.Float).Value = Coleccion(23)
-                .Add("@IngrNet", SqlDbType.Float).Value = Coleccion(24)
-                .Add("@ValorNet", SqlDbType.Float).Value = Coleccion(25)
-            End With
-
-        Else
-            With cmd.Parameters
-                .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@Monto", SqlDbType.Float).Value = Coleccion(1)
-                .Add("@FVenc", SqlDbType.Date).Value = Coleccion(2)
-                .Add("@CostoFinanciero", SqlDbType.Float).Value = Coleccion(3)
-                .Add("@Interes", SqlDbType.Float).Value = Coleccion(4)
-                .Add("@Bolsa", SqlDbType.Float).Value = Coleccion(5)
-                .Add("@TotPagar", SqlDbType.Float).Value = Coleccion(6)
-                .Add("@Nombre", SqlDbType.VarChar).Value = Coleccion(7)
-                .Add("@FCompra", SqlDbType.Date).Value = Coleccion(8)
-                .Add("@ComisionCasa", SqlDbType.Decimal).Value = Coleccion(9)
-                .Add("@ComisionBolsa", SqlDbType.Decimal).Value = Coleccion(10)
-                .Add("@Casa", SqlDbType.Float).Value = Coleccion(11)
-                .Add("@Casa2", SqlDbType.VarChar).Value = Coleccion(12)
-                .Add("@Dias", SqlDbType.Int).Value = Coleccion(13)
-                .Add("@codigo", SqlDbType.Int).Value = Coleccion(14)
-                If Coleccion(15) Is DBNull.Value Then
-                    '.Add("@Base", SqlDbType.Int).Value = 0
-                Else
-                    If String.IsNullOrEmpty(Coleccion(15)) Then
-                        '.Add("@Base", SqlDbType.Int).Value = 0
-                    Else
-                        '.Add("@Base", SqlDbType.Int).Value = Coleccion(15)
-                    End If
 
-                End If
-                .Add("@Base", SqlDbType.Int).Value = DBNull.Value
-
-            End With
-        End If
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        'Catch ex As Exception
-        '    MsgBox("Error al Modificar los registros")
-        '    Return Nothing
-        'End Try
-        cn.Close()
-        Return retorno
-
-    End Function
 
     Public Function TraerImpuesto(ByVal Codigo As String, ByVal codigoElemento As String)
         Dim objCon As New Conexion
@@ -974,7 +597,7 @@ Public Class ReportosDAO
             cmd.Parameters.Add("@codigoElemento", SqlDbType.VarChar).Value = codigoElemento
             cmd.Connection = cn
 
-            ' Dim Datos = cmd.ExecuteScalar
+
             Dim Datos = cmd.ExecuteReader
             cn.Close()
             If Datos.HasRows Then
@@ -1003,90 +626,7 @@ Public Class ReportosDAO
         End If
     End Function
 
-    Public Function AgregarImpuesto(ByVal CodigoInv As String, ByVal CodigoElemento As String, ByVal Impues As String, ByVal Flag As Integer)
-        Dim objCon As New Conexion
-        Dim retorno As Integer
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim Impuestos As String = TraerImpuesto(CodigoInv, CodigoElemento)
-        If (String.IsNullOrEmpty(Impuestos) Or Impuestos = "0") Then
-            Impuestos = Impues
-        Else
-            If (Flag = 0) Then
-
-
-                If InStr(1, Impuestos, Impues) = 0 Then
-
-                    Impuestos = Impuestos.ToString + "-" + Impues.ToString
-                End If
-            Else
-                If Not InStr(1, Impuestos, Impues) = 0 Then
-
-                    Dim QuitarImpuesto = Impuestos.Split("-")
-                    Impuestos = String.Empty
-                    For Each i In QuitarImpuesto
-
-                        If (Not i = Impues) Then
-                            If (String.IsNullOrEmpty(Impuestos)) Then
-                                Impuestos = i
-                            Else
-                                Impuestos = Impuestos + "-" + i
-                            End If
-                        End If
-                    Next
-
-
-
-                End If
-
-            End If
-        End If
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-        sql = "UPDATE [dbo].[REP0] SET
-           
-           [Impuestos]=@Impuestos
-           where [CodInv]=@CodInv and [codigo]=@codigo
-
-    "
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
 
-        With cmd.Parameters
-            .Add("@CodInv", SqlDbType.VarChar).Value = CodigoInv
-            .Add("@codigo", SqlDbType.VarChar).Value = CodigoElemento
-            .Add("@Impuestos", SqlDbType.VarChar).Value = Impuestos
-        End With
-
-        cmd.Connection = cn
-
-        retorno = cmd.ExecuteNonQuery
-
-        cn.Close()
-        Return retorno
-
-    End Function
 
     Public Function FiltroReportoVenta(ByRef FechaVenOperacion1 As String, ByRef FechaVenOperacion2 As String, ByRef Estado As String, ByRef Empresa As String, ByRef CasaCorredora As String) As DataSet
         Dim objCon As New Conexion
@@ -1114,49 +654,4 @@ Public Class ReportosDAO
         Return ds
     End Function
 
-
-    Public Function FiltroReportoCostos() As DataSet
-        Dim objCon As New Conexion
-        Dim da As New SqlDataAdapter
-        Dim ds As New DataSet
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "SP_CargarReportoCostos"
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        cmd.CommandType = CommandType.StoredProcedure
-
-        da = New SqlDataAdapter(cmd)
-
-        da.Fill(ds)
-        cn.Close()
-        Return ds
-    End Function
-
-    Public Function ReportoVentaFondo(ByRef Vigente As String, ByRef Vencido As String) As DataTable
-        Dim objCon As New Conexion
-        Dim da As New SqlDataAdapter
-        Dim ds As New DataSet
-
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        Dim sql = "SP_CargarReportoVentaFondo"
-
-
-        Dim cmd As New SqlCommand(sql, cn)
-        cmd.CommandType = CommandType.StoredProcedure
-        cmd.Parameters.Add("@Vigente", SqlDbType.VarChar).Value = Vigente
-        cmd.Parameters.Add("@Vencido", SqlDbType.VarChar).Value = Vencido
-
-        da = New SqlDataAdapter(cmd)
-
-        da.Fill(ds)
-        cn.Close()
-        Return ds.Tables(0)
-    End Function
 End Class

+ 0 - 30
DAO/SeriesDAO.vb

@@ -193,40 +193,10 @@ Public Module SeriesDAO
             Return (vCodigoEmpresa + vCodigoInstrumentoFinanciero + Codigo)
         End If
 
-        '  cmd.CommandType = CommandType.StoredProcedure
 
-        '.Parameters.Add("@vCodEmpresa", SqlDbType.VarChar).Value = vCodigoEmpresa
-        'cmd.Parameters.Add("@vCodigoIF", SqlDbType.VarChar).Value = vCodigoInstrumentoFinanciero
 
 
 
     End Function
-    Public Sub IncrementarCodigoInversion(ByVal vCodigoEmpresa As String, ByVal vCodigoInstrumentoFinanciero As String)
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-
-        Dim res As Integer
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "UPDATE [dbo].[SER0]
-   SET [Correlativo] = [Correlativo]+1
- WHERE [CodEmpr] = @CodEmpr AND [CodIF] = @CodIF"
-
-
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodEmpr", SqlDbType.VarChar).Value = vCodigoEmpresa
-        cmd.Parameters.Add("@CodIF", SqlDbType.VarChar).Value = vCodigoInstrumentoFinanciero
-        cmd.Connection = cn
-
-        res = cmd.ExecuteNonQuery
-
-        cmd.Dispose()
-        cn.Dispose()
-
 
-    End Sub
 End Module

+ 71 - 91
DAO/TitularizacionDAO.vb

@@ -2,7 +2,7 @@
 
 Public Class TitularizacionDAO
 
-
+    Dim Operaciones As New Operaciones
 
 
 
@@ -71,11 +71,10 @@ Public Class TitularizacionDAO
 
             With cmd.Parameters
                 .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@FechaEmision", SqlDbType.DateTime).Value = Coleccion(1)
-                .Add("@Tasa", SqlDbType.Float).Value = Coleccion(2)
-                .Add("@MontoCompra", SqlDbType.Float).Value = Coleccion(3)
-
-                .Add("@MontoCompraPrimario", SqlDbType.Float).Value = Coleccion(4)
+                .Add("@FechaEmision", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(1).ToString)
+                .Add("@Tasa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(2).ToString)
+                .Add("@MontoCompra", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(3).ToString)
+                .Add("@MontoCompraPrimario", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
 
 
             End With
@@ -155,15 +154,15 @@ Public Class TitularizacionDAO
 
                     With cmd.Parameters
                         .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                        .Add("@Correlativo", SqlDbType.Float).Value = Coleccion2(1)
-                        .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion2(2)
-                        .Add("@Dias", SqlDbType.Int).Value = Coleccion2(3)
-                        .Add("@Cuota", SqlDbType.Float).Value = Coleccion2(4)
-                        .Add("@AmortCap", SqlDbType.Float).Value = Coleccion2(5)
-                        .Add("@Interes", SqlDbType.Float).Value = Coleccion2(6)
-                        .Add("@Saldos", SqlDbType.Float).Value = Coleccion2(7)
-                        .Add("@Porcentaje ", SqlDbType.Float).Value = Coleccion2(8)
-                        .Add("@Vigente", SqlDbType.VarChar).Value = Coleccion2(9)
+                        .Add("@Correlativo", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(1).ToString)
+                        .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion2(2).ToString)
+                        .Add("@Dias", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion2(3).ToString)
+                        .Add("@Cuota", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(4).ToString)
+                        .Add("@AmortCap", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(5).ToString)
+                        .Add("@Interes", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(6).ToString)
+                        .Add("@Saldos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(7).ToString)
+                        .Add("@Porcentaje ", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion2(8).ToString)
+                        .Add("@Vigente", SqlDbType.VarChar).Value = Coleccion2(9).ToString
 
                     End With
                     retorno = cmd.ExecuteNonQuery
@@ -293,18 +292,18 @@ Public Class TitularizacionDAO
 
         With cmd.Parameters
             .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@EmisTotal", SqlDbType.Float).Value = Coleccion(1)
-            .Add("@FechaEmision", SqlDbType.DateTime).Value = Coleccion(2)
-            .Add("@Tasa", SqlDbType.Float).Value = Coleccion(3)
-            .Add("@Periodicidad", SqlDbType.Int).Value = Coleccion(4)
-            .Add("@Periodos", SqlDbType.Int).Value = Coleccion(5)
-            .Add("@MontoCompra", SqlDbType.Float).Value = Coleccion(6)
-            .Add("@MontoCompraPrimario", SqlDbType.Float).Value = Coleccion(7)
-            .Add("@CS1", SqlDbType.Float).Value = Coleccion(8)
-            .Add("@CS2", SqlDbType.Float).Value = Coleccion(9)
-            .Add("@CS3", SqlDbType.Float).Value = Coleccion(10)
-            .Add("@CS4", SqlDbType.Float).Value = Coleccion(11)
-            .Add("@CS5", SqlDbType.Float).Value = Coleccion(12)
+            .Add("@EmisTotal", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(1).ToString)
+            .Add("@FechaEmision", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+            .Add("@Tasa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(3).ToString)
+            .Add("@Periodicidad", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(4).ToString)
+            .Add("@Periodos", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(5).ToString)
+            .Add("@MontoCompra", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@MontoCompraPrimario", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
+            .Add("@CS1", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(8).ToString)
+            .Add("@CS2", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(9).ToString)
+            .Add("@CS3", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(10).ToString)
+            .Add("@CS4", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(11).ToString)
+            .Add("@CS5", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(12).ToString)
 
         End With
 
@@ -362,18 +361,19 @@ Public Class TitularizacionDAO
 
         With cmd.Parameters
             .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@EmisTotal", SqlDbType.Float).Value = Coleccion(1)
-            .Add("@FechaEmision", SqlDbType.DateTime).Value = Coleccion(2)
-            .Add("@Tasa", SqlDbType.Float).Value = Coleccion(3)
-            .Add("@Periodicidad", SqlDbType.Int).Value = Coleccion(4)
-            .Add("@Periodos", SqlDbType.Int).Value = Coleccion(5)
-            .Add("@MontoCompra", SqlDbType.Float).Value = Coleccion(6)
-            .Add("@MontoCompraPrimario", SqlDbType.Float).Value = Coleccion(7)
-            .Add("@CS1", SqlDbType.Float).Value = Coleccion(8)
-            .Add("@CS2", SqlDbType.Float).Value = Coleccion(9)
-            .Add("@CS3", SqlDbType.Float).Value = Coleccion(10)
-            .Add("@CS4", SqlDbType.Float).Value = Coleccion(11)
-            .Add("@CS5", SqlDbType.Float).Value = Coleccion(12)
+            .Add("@EmisTotal", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(1).ToString)
+            .Add("@FechaEmision", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+            .Add("@Tasa", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(3).ToString)
+            .Add("@Periodicidad", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(4).ToString)
+            .Add("@Periodos", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(5).ToString)
+            .Add("@MontoCompra", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@MontoCompraPrimario", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
+            .Add("@CS1", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(8).ToString)
+            .Add("@CS2", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(9).ToString)
+            .Add("@CS3", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(10).ToString)
+            .Add("@CS4", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(11).ToString)
+            .Add("@CS5", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(12).ToString)
+
 
         End With
 
@@ -486,13 +486,13 @@ Public Class TitularizacionDAO
 
         With cmd.Parameters
             .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@Correlativo", SqlDbType.Int).Value = Coleccion(1)
-            .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion(2)
-            .Add("@CSFlujo", SqlDbType.Float).Value = Coleccion(3)
-            .Add("@AmortCap", SqlDbType.Float).Value = Coleccion(4)
-            .Add("@Interes", SqlDbType.Float).Value = Coleccion(5)
-            .Add("@Amort", SqlDbType.Float).Value = Coleccion(6)
-            .Add("@Saldos", SqlDbType.Float).Value = Coleccion(7)
+            .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(1).ToString)
+            .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+            .Add("@CSFlujo", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(3).ToString)
+            .Add("@AmortCap", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+            .Add("@Interes", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+            .Add("@Amort", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@Saldos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
 
         End With
 
@@ -545,13 +545,14 @@ Public Class TitularizacionDAO
 
         With cmd.Parameters
             .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-            .Add("@Correlativo", SqlDbType.Int).Value = Coleccion(1)
-            .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion(2)
-            .Add("@CSFlujo", SqlDbType.Float).Value = Coleccion(3)
-            .Add("@AmortCap", SqlDbType.Float).Value = Coleccion(4)
-            .Add("@Interes", SqlDbType.Float).Value = Coleccion(5)
-            .Add("@Amort", SqlDbType.Float).Value = Coleccion(6)
-            .Add("@Saldos", SqlDbType.Float).Value = Coleccion(7)
+            .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(1).ToString)
+            .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+            .Add("@CSFlujo", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(3).ToString)
+            .Add("@AmortCap", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+            .Add("@Interes", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+            .Add("@Amort", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+            .Add("@Saldos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
+
 
         End With
 
@@ -565,31 +566,9 @@ Public Class TitularizacionDAO
 
     End Function
 
-    Public Sub EliminarAmortCap(ByVal Codigo As String, ByVal correlativo As Integer)
-        Dim objCon As New Conexion
-        Dim sql As String
-        Dim cmd As SqlCommand
-        Dim res As Integer
-        Dim cn As SqlConnection = objCon.Conectar
-        If cn.State = ConnectionState.Closed Then
-            cn.Open()
-        End If
-        sql = "DELETE FROM [dbo].[TIT1]
-      WHERE [CodInv]=@CodInv AND Correlativo=@Correlativo"
 
 
 
-        cmd = New SqlCommand
-        cmd.CommandText = sql
-        cmd.Parameters.Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-        cmd.Parameters.Add("@Correlativo", SqlDbType.Int).Value = correlativo
-        cmd.Connection = cn
-
-        res = cmd.ExecuteNonQuery
-        cn.Close()
-    End Sub
-
-
 
 
 
@@ -638,14 +617,14 @@ Public Class TitularizacionDAO
 
             With cmd.Parameters
                 .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@Correlativo", SqlDbType.Int).Value = Coleccion(1)
-                .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion(2)
-                .Add("@Dias", SqlDbType.Int).Value = Coleccion(3)
-                .Add("@Cuota", SqlDbType.Float).Value = Coleccion(4)
-                .Add("@AmortCap", SqlDbType.Float).Value = Coleccion(5)
-                .Add("@Interes", SqlDbType.Float).Value = Coleccion(6)
-                .Add("@Saldos", SqlDbType.Float).Value = Coleccion(7)
-                .Add("@Porcentaje ", SqlDbType.Float).Value = Coleccion(8)
+                .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(1).ToString)
+                .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@Dias", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(3).ToString)
+                .Add("@Cuota", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@AmortCap", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+                .Add("@Interes", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+                .Add("@Saldos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
+                .Add("@Porcentaje ", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(8).ToString)
 
             End With
 
@@ -716,14 +695,15 @@ Public Class TitularizacionDAO
 
             With cmd.Parameters
                 .Add("@CodInv", SqlDbType.VarChar).Value = Codigo
-                .Add("@Correlativo", SqlDbType.Int).Value = Coleccion(1)
-                .Add("@Fecha", SqlDbType.DateTime).Value = Coleccion(2)
-                .Add("@Dias", SqlDbType.Int).Value = Coleccion(3)
-                .Add("@Cuota", SqlDbType.Float).Value = Coleccion(4)
-                .Add("@AmortCap", SqlDbType.Float).Value = Coleccion(5)
-                .Add("@Interes", SqlDbType.Float).Value = Coleccion(6)
-                .Add("@Saldos", SqlDbType.Float).Value = Coleccion(7)
-                .Add("@Porcentaje ", SqlDbType.Float).Value = Coleccion(8)
+                .Add("@Correlativo", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(1).ToString)
+                .Add("@Fecha", SqlDbType.DateTime).Value = Operaciones.ConvertirFecha(Coleccion(2).ToString)
+                .Add("@Dias", SqlDbType.Int).Value = Operaciones.ConvertirEntero(Coleccion(3).ToString)
+                .Add("@Cuota", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(4).ToString)
+                .Add("@AmortCap", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(5).ToString)
+                .Add("@Interes", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(6).ToString)
+                .Add("@Saldos", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(7).ToString)
+                .Add("@Porcentaje ", SqlDbType.Float).Value = Operaciones.ConvertirDecimal(Coleccion(8).ToString)
+
 
             End With
 

+ 6 - 6
DAO/frmRendimientos.vb

@@ -2,7 +2,7 @@
 
 Public Class Rendimientos
 
-
+    Dim Operaciones As New Operaciones
 
 
     Public Function TraerRendimientos(ByVal TipoFecha As String, ByVal FechaInicial As Date, ByVal FechaFinal As Date, ByVal Empresa As String, ByVal Instrumento As String, ByVal Renta As String, ByVal Lugar As String, ByVal Vigencia As String, ByVal AutEstado As String, ByVal Fecha As Date, Lista As String) As DataTable
@@ -34,15 +34,15 @@ Public Class Rendimientos
 
         Dim cmd As New SqlCommand(sql, cn)
         cmd.CommandType = CommandType.StoredProcedure
-        cmd.Parameters.Add("@FechaInicial", SqlDbType.Date).Value = FechaInicial
-        cmd.Parameters.Add("@FechaFinal", SqlDbType.Date).Value = FechaFinal
+        cmd.Parameters.Add("@FechaInicial", SqlDbType.Date).Value = Operaciones.ConvertirFecha(FechaInicial.ToString)
+        cmd.Parameters.Add("@FechaFinal", SqlDbType.Date).Value = Operaciones.ConvertirFecha(FechaFinal.ToString)
         cmd.Parameters.Add("@Empresa", SqlDbType.VarChar).Value = Empresa
         cmd.Parameters.Add("@Instrumento ", SqlDbType.VarChar).Value = Instrumento
         cmd.Parameters.Add("@TipoRenta", SqlDbType.VarChar).Value = Renta
         cmd.Parameters.Add("@Nacionalidad", SqlDbType.VarChar).Value = Lugar
         cmd.Parameters.Add("@Vigencia", SqlDbType.VarChar).Value = Vigencia
         cmd.Parameters.Add("@Estado", SqlDbType.VarChar).Value = AutEstado
-        cmd.Parameters.Add("@Fecha", SqlDbType.Date).Value = Fecha
+        cmd.Parameters.Add("@Fecha", SqlDbType.Date).Value = Operaciones.ConvertirFecha(Fecha.ToString)
         cmd.Parameters.Add("@TipoFecha", SqlDbType.VarChar).Value = TipoFecha
         cmd.Parameters.Add("@ConAgrupacion", SqlDbType.VarChar).Value = ConAgrupacion
         cmd.Parameters.Add("@Lista", SqlDbType.VarChar).Value = Lista
@@ -177,8 +177,8 @@ Public Class Rendimientos
         Dim sql = "[dbo].[SP_CargarRendimientoDiario]"
         Dim cmd As New SqlCommand(sql, cn)
         cmd.CommandType = CommandType.StoredProcedure
-        cmd.Parameters.Add("@FechaInicial", SqlDbType.Date).Value = FechaInicial
-        cmd.Parameters.Add("@FechaFinal", SqlDbType.Date).Value = FechaFinal
+        cmd.Parameters.Add("@FechaInicial", SqlDbType.Date).Value = Operaciones.ConvertirFecha(FechaInicial.ToString)
+        cmd.Parameters.Add("@FechaFinal", SqlDbType.Date).Value = Operaciones.ConvertirFecha(FechaFinal.ToString)
         cmd.Parameters.Add("@TipoRendimiento", SqlDbType.VarChar).Value = TipoRendimiento
 
 

+ 5 - 104
ENTI/AccionesCE.vb

@@ -12,7 +12,6 @@ Public Class AccionesCE
     Private _IngresoNeto As Double
     Dim Operaciones As New Operaciones
     Private _IngresoNetoPendiente As Double
-    'Private _Dividendos As New AccionesDetalleCE
     Private _dtImpuestosYComisiones As DataTable
     Private _dtDividendos As DataTable
     Private _TipoInstrumento As String = "ACC"
@@ -36,24 +35,9 @@ Public Class AccionesCE
     Private _ComisionPorcentajeVentaCasa As Double = 0
     Private _ComisionPorcentajeVentaBolsa As Double = 0
     Private _MontoNetoComprasus As Double = 0
-    Public ReadOnly Property TipoInstrumento As String
-        Get
-            Return _TipoInstrumento
-        End Get
-    End Property
-    Public Property DescripcionTipoInstrumento As String
-        Get
-            Return _DescripcionTipoInstrumento
-        End Get
-        Set(value As String)
-            _DescripcionTipoInstrumento = value
-        End Set
-    End Property
-    Public ReadOnly Property Registro As DataTable
-        Get
-            Return _Registro
-        End Get
-    End Property
+
+
+
 
 
 
@@ -126,63 +110,7 @@ Public Class AccionesCE
             _FactorDeDividendo = value
         End Set
     End Property
-    Public Property IngresoBruto As Double
-        Get
-            Return _IngresoBruto
-        End Get
-        Set(value As Double)
-            _IngresoBruto = value
-            CalcularRetornoAnualBrutoVenta()
-
-        End Set
-    End Property
-    Public Property IngresoBrutoPendiente As Double
-        Get
-            Return _IngresoBrutoPendiente
-        End Get
-        Set(value As Double)
-            _IngresoBrutoPendiente = value
-            CalcularRetornoAnualBrutoVenta()
-
-        End Set
-    End Property
-    Public Property ISR As Double
-        Get
-            Return _ISR
-        End Get
-        Set(value As Double)
-            _ISR = value
-        End Set
-    End Property
 
-    Public Property ISRPendiente As Double
-        Get
-            Return _ISRPendiente
-        End Get
-        Set(value As Double)
-            _ISRPendiente = value
-        End Set
-    End Property
-    Public Property IngresoNeto As Double
-        Get
-            Return _IngresoNeto
-        End Get
-        Set(value As Double)
-            _IngresoNeto = value
-            CalcularRetornoAnualNetoVenta()
-
-        End Set
-    End Property
-    Public Property IngresoNetoPendiente As Double
-        Get
-            Return _IngresoNetoPendiente
-        End Get
-        Set(value As Double)
-            _IngresoNetoPendiente = value
-            CalcularRetornoAnualNetoVenta()
-
-        End Set
-    End Property
     Public Property ImpuestosYComisiones As DataTable
         Get
             Return _dtImpuestosYComisiones
@@ -193,16 +121,7 @@ Public Class AccionesCE
 
         End Set
     End Property
-    Public Property Dividendos As DataTable
-        Get
-            Return _dtDividendos
-        End Get
-        Set(value As DataTable)
-            _dtDividendos = value
-            CalcularSumasDividendos()
 
-        End Set
-    End Property
 
 
 
@@ -704,7 +623,7 @@ Public Class AccionesCE
         CalcularGananciaDeCapitalTotalVenta()
         CalcularRetornoAnualBrutoVenta()
         CalcularRetornoAnualNetoVenta()
-        CalcularSumasDividendos()
+
 
     End Sub
     Private Sub CalcularPrecioSucioCompra()
@@ -729,7 +648,6 @@ Public Class AccionesCE
         _DiasDeTenenciaVenta = valor
         CalcularRetornoAnualBrutoVenta()
         CalcularRetornoAnualNetoVenta()
-        CalcularSumasDividendos()
 
     End Sub
     Private Sub CalcularValorTransadoVenta()
@@ -747,7 +665,7 @@ Public Class AccionesCE
         CalcularGananciaDeCapitalUnitarioVenta()
         CalcularRetornoAnualBrutoVenta()
         CalcularRetornoAnualNetoVenta()
-        CalcularSumasDividendos()
+
 
     End Sub
     Private Sub CalcularGananciaDeCapitalUnitarioVenta()
@@ -802,24 +720,7 @@ Public Class AccionesCE
         CalcularMontoNetoCompra()
         CalcularMontoNetoVenta()
     End Sub
-    Private Sub CalcularSumasDividendos()
-        'If Not Double.TryParse(_dtDividendos.Compute("SUM(IngresoBruto)", "").ToString, _IngresoBruto) Then
-        '    _IngresoBruto = 0
-        'End If
-
-        'If Not Double.TryParse(_dtDividendos.Compute("SUM(ISR)", "").ToString, _ISR) Then
-        '    _ISR = 0
-        'End If
-
-        'If Not Double.TryParse(_dtDividendos.Compute("SUM(IngresoNeto)", "").ToString, _IngresoNeto) Then
-        '    _IngresoNeto = 0
-        'End If
-
-
-    End Sub
-    Private Sub PrepararRegistro()
 
-    End Sub
 
 
 

+ 9 - 204
ENTI/BonosCE.vb

@@ -24,29 +24,7 @@
         End Get
     End Property
 
-    Public Property CodigoEmpresa As String
-        Get
-            Return _CodigoEmpresa
-        End Get
-        Set(value As String)
-            _CodigoEmpresa = value
-        End Set
-    End Property
-    Public ReadOnly Property SumaIngresos As Double
-        Get
-            Return _SumaIngresos
-        End Get
-    End Property
-    Public ReadOnly Property SumaImpuestosIngresos As Double
-        Get
-            Return _SumaImpuestosIngresos
-        End Get
-    End Property
-    Public ReadOnly Property SumaliquidoIngresos As Double
-        Get
-            Return _SumaliquidoIngresos
-        End Get
-    End Property
+
     Public Property Ingresos As DataTable
         Get
             Return _dtIngresos
@@ -57,7 +35,6 @@
     End Property
 
     Private _PeriodicidadCompra As String
-    'Private _CodigoCasaCompra As String
     Private _ValorNominalCompra As Double
     Private _UltimaFechaCuponCompra As Date
     Private _SiguienteFechaCuponCompra As Date
@@ -80,7 +57,7 @@
     Private _SumaImpuestosyComisionesCompra As Double
 
 
-    'Private _CodigoCasaVenta As String
+
     Private _ValorNominalVenta As Double
     Private _UltimaFechaCuponVenta As Date
     Private _SiguienteFechaCuponVenta As Date
@@ -94,7 +71,6 @@
     Private _DiasBaseVenta As Integer
     Private _DiasAcumuladosVenta As Integer
     Private _DiasAlVencimientoVenta As Integer
-    'Private _PorcentajeInteresAcumuladoVenta As Double
     Private _InteresAcumuladoVenta As Double
     Private _InteresAcumuladoPorcentajeVenta As Double
     Private _PrecioSucioVenta As Double
@@ -121,30 +97,8 @@
     Private _RendimientoAntesImpuestos As Double
     Private _RendimientoDespuesImpuestos As Double
 
-    Public Property CodigoInversion As String
-        Get
-            Return _CodigoInversion
-        End Get
-        Set(value As String)
-            _CodigoInversion = value
-        End Set
-    End Property
-    Public Property DocumentoBase As String
-        Get
-            Return _DocumentoBase
-        End Get
-        Set(value As String)
-            _DocumentoBase = value
-        End Set
-    End Property
-    Public Property TipoBase As String
-        Get
-            Return _TipoBase
-        End Get
-        Set(value As String)
-            _TipoBase = value
-        End Set
-    End Property
+
+
     Public Property ImpuestosYComisiones As DataTable
         Get
             Return _dtImpuestosYComisiones
@@ -155,15 +109,7 @@
 
         End Set
     End Property
-    Public Property SumaImpuestosYComisionesVenta As Double
-        Get
-            Return _SumaImpuestosYComisionesVenta
-        End Get
-        Set(value As Double)
-            _SumaImpuestosYComisionesVenta = value
 
-        End Set
-    End Property
 
     'COMPRA
     Public Property PeriodicidadCompra As String
@@ -242,11 +188,7 @@
 
         End Set
     End Property
-    Public ReadOnly Property PorcentajeCuponCompra_x100 As Double
-        Get
-            Return _PorcentajeCuponCompra * 100
-        End Get
-    End Property
+
     Public ReadOnly Property YTMAlVencimientoComisionCompra As Double
         Get
             Return _YTMAlVencimientoComisionCompra
@@ -342,12 +284,7 @@
 
         End Set
     End Property
-    Public ReadOnly Property SumaImpuestosyComisionesCompra As Double
-        Get
-            Return _SumaImpuestosyComisionesCompra
-        End Get
 
-    End Property
 
     'VENTA
 
@@ -426,9 +363,7 @@
         Get
             Return _YTMAlVencimientoVenta
         End Get
-        'Set(value As Double)
-        '    _YTMAlVencimientoVenta = value
-        'End Set
+
     End Property
     Public Property PrecioAlVencimientoVenta As Double
         Get
@@ -477,11 +412,7 @@
             Return _DiasAlVencimientoVenta
         End Get
     End Property
-    'Public ReadOnly Property PorcentajeInteresAcumuladoVenta As Double
-    '    Get
-    '        Return _PorcentajeInteresAcumuladoVenta
-    '    End Get
-    'End Property
+
 
     Public ReadOnly Property InteresAcumuladoVenta As Double
         Get
@@ -591,17 +522,7 @@
         End Get
 
     End Property
-    Public Property PeriodicidadVenta As String
-        Get
-            Return _PeriodicidadVenta
-        End Get
-        Set(value As String)
-            _PeriodicidadVenta = value
-            CalcularYTMAlVencimientoVenta()
-            CalcularInteresAcumuladoPorcentajeVenta()
 
-        End Set
-    End Property
 
     Public Sub New()
         _ValorNominalCompra = 0
@@ -658,7 +579,7 @@
             valor = 0
         End Try
         _InteresAcumuladoCompra = valor
-        'CalcularDiasAcumuladosCompra()
+
         CalcularPorcentajeInteresAcumuladoCompra()
         CalcularMontoAPagarCompra()
     End Sub
@@ -734,19 +655,12 @@
         valor = _UltimaFechaCuponVenta.AddDays(vDiasPeriodo + 1)
         _SiguienteFechaCuponVenta = valor
     End Sub
-    Private Sub CalcularFechaLiquidacionVenta()
-        Dim valor As Date
-
-        valor = DateTime.Now.Date + DateTime.Now.AddDays(3)
-        _FechaLiquidacionVenta = valor
 
-    End Sub
     Private Sub CalcularYTMAlVencimientoComisionVenta()
         Dim valor As Double
 
         Try
             valor = _YTMAlVencimientoVenta - (_PorcentajeComisionCasaVenta * _DiasBaseVenta / _DiasAlVencimientoVenta) - (_PorcentajeComisionBolsaVenta * _DiasBaseVenta / _DiasAlVencimientoVenta)
-            'valor = valor * 100
         Catch ex As Exception
             valor = 0
         End Try
@@ -871,20 +785,7 @@
         CalcularRendimientoGananciaPerdida()
 
     End Sub
-    Private Sub CalcularIngresoPorInteres()
-        Dim valor As Double
-        'Dim vCuponesPagados As Double = 0 'FALTA VALOR
-        'Dim vInteresAcumulado As Double = GetInteresAcumuladoCompra()
-
-        'valor = vCuponesPagados + vInteresAcumulado
-        valor = 0
-
-        _IngresoPorInteres = valor
-        CalcularGananciaPerdidaTotal()
-        CalcularRendimientoDeIntereses()
-
 
-    End Sub
     Private Sub CalcularGananciaPerdidaTotal()
         Dim valor As Double
         valor = _GananciaPerdidaDeCapital + _IngresoPorInteres
@@ -897,7 +798,6 @@
         Dim valor As Double
         Try
             valor = _GananciaPerdidaDeCapital / _ValorTransadoCompra * _DiasBaseCompra / _DiasPlazoRO
-            'valor = valor * 100
         Catch ex As Exception
             valor = 0
         End Try
@@ -908,7 +808,6 @@
         Dim valor As Double
         Try
             valor = _IngresoPorInteres / _ValorTransadoCompra * _DiasBaseCompra / _DiasPlazoRO
-            'valor = valor * 100
         Catch ex As Exception
             valor = 0
         End Try
@@ -928,41 +827,11 @@
     End Sub
 
 
-    Private Sub CalcularSiguienteFechaCuponCompra()
-        Dim valor As Date
-        Dim vUltimaFechCupon As Date = _UltimaFechaCuponCompra
-        Dim vPeriodicidad As String = _PeriodicidadCompra
-        Dim vDiasPeriodo As Integer = Utilidades.DiasDeUnPeriodo(vPeriodicidad)
 
-        valor = vUltimaFechCupon.AddDays(vDiasPeriodo + 1)
 
-        _SiguienteFechaCuponCompra = valor
-    End Sub
-    Private Sub CalcularSumaImpuestosyComisionesCompra()
-        _SumaImpuestosyComisionesCompra = 0
-    End Sub
-    'Private Sub CalcularPorcentajeInteresAcumuladoVenta()
-    '    Dim valor As Double
-
-    '    Try
-    '        valor = _ValorNominalVenta * _PorcentajeCuponVenta * _DiasAcumuladosVenta / _DiasBaseVenta
-    '    Catch ex As Exception
-    '        valor = 0
-    '    End Try
-    '    _PorcentajeInteresAcumuladoVenta = valor
-    '    CalcularPrecioSucioVenta()
-
-    'End Sub
-    Private Sub CalcularComisionBolsaVenta()
-        _ComisionBolsaVenta = 0
-        CalcularMontoARecibirVenta()
 
-    End Sub
-    Private Sub CalcularComisionCasaVenta()
-        _ComisionCasaVenta = 0
-        CalcularMontoARecibirVenta()
 
-    End Sub
+
     Private Sub CalcularSumaImpuestosyComisiones()
         If Not Double.TryParse(_dtImpuestosYComisiones.Compute("SUM(MontoImp)", "TipoOper='C'").ToString, _SumaImpuestosyComisionesCompra) Then
             _SumaImpuestosyComisionesCompra = 0
@@ -973,18 +842,7 @@
         End If
 
     End Sub
-    Private Sub CalcularSumasIngresos()
-        If Not Double.TryParse(_dtIngresos.Compute("SUM(Ingreso)", "").ToString, _SumaIngresos) Then
-            _SumaIngresos = 0
-        End If
-        If Not Double.TryParse(_dtIngresos.Compute("SUM(MontoImpuesto)", "").ToString, _SumaImpuestosIngresos) Then
-            _SumaImpuestosIngresos = 0
-        End If
-        If Not Double.TryParse(_dtIngresos.Compute("SUM(Liquido)", "").ToString, _SumaliquidoIngresos) Then
-            _SumaliquidoIngresos = 0
-        End If
 
-    End Sub
     Private Sub CalcularYTMAlVencimientoCompra()
 
         Dim vRedemption As Double = (_PrecioAlVencimientoCompra * 100) 'Amortizacion,Precio al vencimiento
@@ -1008,42 +866,7 @@
 
     End Sub
 
-    Public Function CalcularYTMAl(ByVal PrecioVencimiento As Double, ByVal PorcentajeCupon As Double, ByVal PrecioCompra As Double, ByVal DiasAcumulados As Integer, ByVal Periodicidad As String, ByVal DiasVencimiento As Integer)
 
-        'Dim vRedemption As Double = (PrecioVencimiento * 100) 'Amortizacion,Precio al vencimiento
-        'Dim vRate As Double = PorcentajeCupon 'Porcentaje de cupon, tasa
-        'Dim vFrecuency As Integer = 0 'For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
-        'Dim vPar As Double = (PrecioCompra * 100) 'Precio de Compra
-        'Dim vA As Integer = DiasAcumulados 'Dias Acumulados
-        'Dim vE As Integer = Utilidades.DiasDeUnPeriodo(Periodicidad) 'número de días en el período del cupón.
-        'Dim vDSR As Integer = DiasVencimiento 'número de días desde la fecha de liquidación hasta la fecha de amortización.
-        'Dim Vencimiento
-        'If vA = 0 Then vA = 1
-        Dim vFrecuency As Integer
-        If Periodicidad = "A" Then vFrecuency = 1
-        If Periodicidad = "S" Then vFrecuency = 2
-        If Periodicidad = "T" Then vFrecuency = 4
-
-        Dim vRedemption As Double = PrecioVencimiento 'Amortizacion,Precio al vencimiento
-        Dim vRate As Double = PorcentajeCupon 'Porcentaje de cupon, tasa
-        'Dim vFrecuency As Integer =  'For annual payments, frequency = 1; for semiannual, frequency = 2; for quarterly, frequency = 4.
-        Dim vPar As Double = PrecioCompra   'Precio de Compra
-        Dim vA As Integer = DiasAcumulados 'Dias Acumulados
-        Dim vE As Integer = Utilidades.DiasDeUnPeriodo(Periodicidad)  'número de días en el período del cupón.
-        Dim vDSR As Integer = DiasVencimiento 'número de días desde la fecha de liquidación hasta la fecha de amortización.
-        Dim Vencimiento
-        'If vA = 0 Then vA = 1
-
-
-        Vencimiento = (vRedemption / 100) + (vRate / vFrecuency)
-        Vencimiento = Vencimiento - ((vPar / 100) + ((vA / vE) * (vRate / vFrecuency)))
-        Vencimiento = Vencimiento / ((vPar / 100) + ((vA / vE) * (vRate / vFrecuency)))
-        Vencimiento = Vencimiento * ((vFrecuency * vE) / vDSR)
-
-        'Dim pr = (vRedemption / (1 + Vencimiento / vFrecuency) ^ (50 - 1 + (vDSR / vE))) + (100 * (vRate / vFrecuency)) / (1 + (Vencimiento / vFrecuency)) ^ (vDSR / vE) - (100 * (vRate / vFrecuency) * vA / vE)
-
-        Return Vencimiento
-    End Function
 
     Public Function CalcularYTMComision(ByVal YTMVen As Double, ByVal ComisionCasa As Double, ByVal DiasVencimiento As Integer, ByVal ComisionBolsa As Double, ByVal Fecha1 As Date, ByVal Fecha2 As Date, ByVal IndexBase As Integer)
         Dim Valor As Double = 0.0
@@ -1118,24 +941,6 @@
                 Return Valor
 
             End If
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
         End If
 
 

+ 3 - 21
ENTI/CEPropuestaInversion.vb

@@ -93,11 +93,7 @@
             ObtenerTipoIF()
         End Set
     End Property
-    Public ReadOnly Property TipoInstrumentoFinanciero As String
-        Get
-            Return _TipoIF
-        End Get
-    End Property
+
     Public Property CodigoEmpresa As String
         Get
             If _CodigoEmpresa Is Nothing Then Return String.Empty Else Return _CodigoEmpresa
@@ -158,14 +154,7 @@
 
 
 
-    Public Property IdProInv As Integer
-        Get
-            Return _IdProInv
-        End Get
-        Set(value As Integer)
-            _IdProInv = value
-        End Set
-    End Property
+
 
 
     Public Property IdFlujo As Integer
@@ -309,14 +298,7 @@
         End Set
     End Property
 
-    Public Property DocumentoBase As Integer
-        Get
-            Return _DocumentoBase
-        End Get
-        Set(value As Integer)
-            _DocumentoBase = value
-        End Set
-    End Property
+
     Public Property FechaDocumento As Date
         Get
             Return _FechaDocumento

+ 3 - 32
ENTI/DepositosAPlazoCE.vb

@@ -81,14 +81,7 @@
             CalcularRendimientoNeto()
         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 Periodicidad As String
         Get
             Return _Periodicidad
@@ -109,30 +102,8 @@
         End Get
 
     End Property
-    Public Property IngresoBruto As Double
-        Get
-            Return _IngresoBruto
-        End Get
-        Set(value As Double)
-            _IngresoBruto = value
-        End Set
-    End Property
-    Public Property Impuestos As Double
-        Get
-            Return _Impuestos
-        End Get
-        Set(value As Double)
-            _Impuestos = value
-        End Set
-    End Property
-    Public Property IngresoNeto As Double
-        Get
-            Return _IngresoNeto
-        End Get
-        Set(value As Double)
-            _IngresoNeto = value
-        End Set
-    End Property
+
+
 
 
     Public Sub New()

+ 3 - 105
ENTI/FondosDeInversionCE.vb

@@ -189,12 +189,7 @@
         ValorNominal = valor
 
     End Sub
-    Public Sub CalcularComisionCasa()
 
-    End Sub
-    Public Sub CalcularComisionBolsa()
-
-    End Sub
     Public Sub CalcularValorTransado()
         Dim valor As Double
         Dim vValorNominal As Double = ValorNominal
@@ -209,98 +204,7 @@
         ValorTransado = valor
     End Sub
 
-    Public Function TablaIngresos() As DataTable
-        Dim dtIngresos As DataTable
-        Dim vFilas As DataRow
-        Dim vColumnas As DataColumn
-
-        Dim vFechaInicial As Date
-        Dim vSiguienteFecha As Date
-        Dim vDias As Integer
-        Dim vDividendo As Double = Dividendo
-        Dim vIngreso As Double
-        Dim vRendimiento As Double
-        Dim vCuotasDeParticipacion As Double = CuotasDeParticipacion
-        Dim vValorNominal As Double = ValorNominal
-        Dim vAnioBase As Integer = AnioBase
-        Dim vDiasDelMes As Integer
-        Dim vEstaFecha As Date
-        Dim vPrimerCalculo As Boolean = True
-
-
-        dtIngresos = New DataTable
-
-        vColumnas = New DataColumn
-        vColumnas.DataType = GetType(Date)
-        vColumnas.ColumnName = "Fecha"
-        vColumnas.Caption = "Fecha de Corte"
-        vColumnas.AllowDBNull = False
-        dtIngresos.Columns.Add(vColumnas)
-
-        vColumnas = New DataColumn
-        vColumnas.DataType = GetType(Integer)
-        vColumnas.ColumnName = "Dias"
-        vColumnas.Caption = "Dias"
-        vColumnas.AllowDBNull = False
-        dtIngresos.Columns.Add(vColumnas)
-
-        vColumnas = New DataColumn
-        vColumnas.DataType = GetType(Double)
-        vColumnas.ColumnName = "Dividendo"
-        vColumnas.Caption = "Dividendo"
-        vColumnas.AllowDBNull = False
-        dtIngresos.Columns.Add(vColumnas)
-
-        vColumnas = New DataColumn
-        vColumnas.DataType = GetType(Double)
-        vColumnas.ColumnName = "Ingreso"
-        vColumnas.Caption = "Ingreso"
-        vColumnas.AllowDBNull = False
-        dtIngresos.Columns.Add(vColumnas)
-
-        vColumnas = New DataColumn
-        vColumnas.DataType = GetType(Double)
-        vColumnas.ColumnName = "Rendimiento"
-        vColumnas.Caption = "Rendimiento"
-        vColumnas.AllowDBNull = False
-        dtIngresos.Columns.Add(vColumnas)
-
-        vFechaInicial = FechaOperacion
-        vDiasDelMes = Date.DaysInMonth(vFechaInicial.Year, vFechaInicial.Month)
-        vSiguienteFecha = New Date(vFechaInicial.Year, vFechaInicial.Month, vDiasDelMes)
-        vDias = DateDiff(DateInterval.Day, vFechaInicial, vSiguienteFecha)
-
 
-        While vSiguienteFecha.Date <= FechaVencimiento.Date
-            If vPrimerCalculo Then
-                vIngreso = ((vDividendo * vCuotasDeParticipacion) / 30) * vDias
-                vPrimerCalculo = False
-            Else
-                vIngreso = vDividendo * vCuotasDeParticipacion
-            End If
-            vRendimiento = vIngreso / vValorNominal * vAnioBase / vDias
-
-            vFilas = dtIngresos.NewRow
-            vFilas("Fecha") = vSiguienteFecha
-            vFilas("Dias") = vDias
-            vFilas("Dividendo") = vDividendo
-            vFilas("Ingreso") = vIngreso
-            vFilas("Rendimiento") = vRendimiento
-            dtIngresos.Rows.Add(vFilas)
-
-            vEstaFecha = vSiguienteFecha
-            vSiguienteFecha = vSiguienteFecha.AddDays(1)
-            vDiasDelMes = Date.DaysInMonth(vSiguienteFecha.Year, vSiguienteFecha.Month)
-            vSiguienteFecha = New Date(vSiguienteFecha.Year, vSiguienteFecha.Month, vDiasDelMes)
-            vDias = DateDiff(DateInterval.Day, vEstaFecha, vSiguienteFecha)
-        End While
-
-
-
-
-        Return dtIngresos
-        dtIngresos.Dispose()
-    End Function
     Public Function CalculoValorNominal(ByVal CuotasParticipacion As Double, ByVal ValorParticipacion As Double)
         Dim Total = CuotasParticipacion * ValorParticipacion
         Return Total
@@ -309,15 +213,9 @@
         Dim fecha = FechaOperaciones.AddDays(Dias)
         Return fecha
     End Function
-    Public Sub Modificar(ByVal Coleccion As Collection, ByVal Codigo As String)
-        FondoInversionDAO.Modificar(Coleccion, Codigo)
-    End Sub
-    Public Sub Nuevo(ByVal Coleccion As Collection, ByVal Codigo As String)
-        FondoInversionDAO.Nuevo(Coleccion, Codigo)
-    End Sub
-    Public Sub Eliminar(ByVal Codigo As String)
-        FondoInversionDAO.Eliminar(Codigo)
-    End Sub
+
+
+
 
 
 End Class

+ 0 - 132
ENTI/FormulasBonoCE.vb

@@ -3,7 +3,6 @@
 
     Dim ElementosConsulta As New CargarElementosDAO
     Dim V_CodEmpr = ElementosConsulta.CodEmpr
-    'Dim V_CodIF = ElementosConsulta.CodIF
     Dim V_CodEmis = ElementosConsulta.CodEmis
     Dim V_CodECalRi = ElementosConsulta.CodECalRi
     Dim V_CodPais = ElementosConsulta.CodPais
@@ -15,106 +14,6 @@
     Dim V_ListaEstado = ElementosConsulta.ListaEstado
     Dim Operaciones As New Operaciones
     Dim V_ListaCasasCorredoras = ElementosConsulta.ListaCasasCorredoras
-
-
-    Public ReadOnly Property ListaCasasCorredoras
-
-        Get
-
-            Return V_ListaCasasCorredoras
-        End Get
-    End Property
-
-
-
-
-    Public ReadOnly Property ListaEstado
-
-        Get
-
-            Return V_ListaEstado
-        End Get
-    End Property
-
-
-
-
-    Public ReadOnly Property ListaTipoRenta
-        Get
-            Return V_ListaTipoRenta
-        End Get
-    End Property
-
-
-
-
-
-    Public ReadOnly Property ListaTipoTasa
-        Get
-            Return V_ListaTipoTasa
-        End Get
-    End Property
-
-
-    Public ReadOnly Property ListaPeriodos
-        Get
-            Return V_ListaPeriodos
-        End Get
-    End Property
-
-
-    Public ReadOnly Property CodPais
-        Get
-            Return V_CodPais
-        End Get
-    End Property
-
-
-
-    Public ReadOnly Property CodEmpr
-        Get
-            Return V_CodEmpr
-        End Get
-    End Property
-    Public ReadOnly Property ListaTiposMercados
-        Get
-            Return V_ListaTiposMercados
-        End Get
-    End Property
-
-    Public ReadOnly Property ListaPlazo
-        Get
-            Return V_ListaPlazo
-        End Get
-    End Property
-
-    Public ReadOnly Property CodEmis
-        Get
-            Return V_CodEmis
-        End Get
-    End Property
-
-    Public ReadOnly Property CodECalRi
-        Get
-            Return V_CodECalRi
-        End Get
-    End Property
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
     Public Function DiasVencimiento(ByVal fecha1 As DateTime, ByVal fecha2 As DateTime, ByVal Base As Integer)
         fecha1 = Format(fecha1, "dd/MM/yyyy")
         fecha2 = Format(fecha2, "dd/MM/yyyy")
@@ -133,23 +32,7 @@
 
         Return Total
     End Function
-    Public Function DiasAcumulados(ByVal fecha1 As DateTime, ByVal fecha2 As DateTime, ByVal Base As Integer)
-
-        Dim Total As Integer
 
-        If (Base = 0 Or Base = 2) Then
-            Total = Base360(fecha1, fecha2)
-
-        ElseIf (Base = 1 Or Base = 3) Then
-            Total = Base365(fecha1, fecha2)
-
-        Else
-            Total = 0
-
-        End If
-
-        Return Total
-    End Function
 
     Public Function InteresAcumulado(ByVal ValorNominal As Double, ByVal Cupon As Double, ByVal Fecha1 As Date, ByVal Fecha2 As Date, ByVal DiasAcumulados As Double, ByVal IndexBase As Integer)
         Dim Valor As Double = 0
@@ -264,13 +147,6 @@
         Return Proceso
     End Function
 
-
-    Public Function Comisiones(ByVal Comision As Double, ByVal ValorTrasado As Double)
-        Dim Valor = CDec(Comision) * CDec(ValorTrasado)
-
-        Return Valor / 100
-    End Function
-
     Public Function MontoPagar(ByVal ValorTrasado As Double, ByVal ComisionBolsa As Double, ByVal ComisionCasa As Double, ByVal InteresAcumulado As Double, ByVal CostoTransferencias As Double)
         Dim Valor = ValorTrasado + ComisionBolsa + ComisionCasa + InteresAcumulado + CostoTransferencias
 
@@ -284,20 +160,12 @@
 
     End Function
 
-    Public Function MontoRecibir(ByVal ValorTrasado As Double, ByVal ComisionBolsa As Double, ByVal ComisionCasa As Double, ByVal InteresAcumulado As Double, ByVal InteresGenerado As Double)
-        Dim Valor = ValorTrasado - ComisionBolsa - ComisionCasa + InteresAcumulado + InteresGenerado
-        Return Valor
 
-    End Function
     Public Function Base360(ByVal Fecha1 As Date, ByVal Fecha2 As Date)
         Dim dia As Integer
         Dim dias31 As Integer
         Dim febreros As Integer
         Dim bisiesto As Integer
-
-
-
-
         While (Fecha1 < Fecha2)
             dia = dia + 1
 

+ 3 - 54
ENTI/FuturosCE.vb

@@ -14,22 +14,8 @@
     Private _Ganancia As Double
     Private _Rendimiento As Double
 
-    Public Property TipoOperacion As String
-        Get
-            Return _TipoOperacion
-        End Get
-        Set(value As String)
-            _TipoOperacion = value
-        End Set
-    End Property
-    Public Property IdDelContrato As String
-        Get
-            Return _IdDelContrato
-        End Get
-        Set(value As String)
-            _IdDelContrato = value
-        End Set
-    End Property
+
+
     Public Property CantidadContratos As Integer
         Get
             Return _CantidadContratos
@@ -85,30 +71,7 @@
             CalcularGanancia()
         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 ValorTransadoCompra As Double
         Get
             Return _ValorTransadoCompra
@@ -126,16 +89,6 @@
             _Ganancia = value
         End Set
     End Property
-    Public Property Rendimiento As Double
-        Get
-            Return _Rendimiento
-        End Get
-        Set(value As Double)
-            _Rendimiento = value
-        End Set
-    End Property
-
-
 
     Private Sub CalcularValorTransado()
         Dim valor As Double
@@ -175,10 +128,6 @@
         End Try
         Ganancia = valor
     End Sub
-    Private Sub CalcularRendimiento()
-        Dim valor As Double
-        Dim vGanancias As Double = Ganancia
 
-    End Sub
 
 End Class

+ 3 - 24
ENTI/IngresoDetalleCE.vb

@@ -43,23 +43,9 @@
         End Set
     End Property
 
-    Public Property CodigoEmisor As Integer
-        Get
-            Return _CodigoEmisor
-        End Get
-        Set(ByVal Value As Integer)
-            _CodigoEmisor = Value
-        End Set
-    End Property
 
-    Public Property CodigoEmpresaCalificadora As String
-        Get
-            Return _CodigoEmpresaCalificadora
-        End Get
-        Set(ByVal Value As String)
-            _CodigoEmpresaCalificadora = Value
-        End Set
-    End Property
+
+
 
     Public Property NombreManualIF As String
         Get
@@ -124,14 +110,7 @@
         End Set
     End Property
 
-    Public Property MontoIngresoLiquidoProyectado As Double
-        Get
-            Return _MontoIngresoLiquidoProyectado
-        End Get
-        Set(ByVal Value As Double)
-            _MontoIngresoLiquidoProyectado = Value
-        End Set
-    End Property
+
 
     Public Property IngresoId As Integer
         Get

+ 6 - 68
ENTI/InversionesCE.vb

@@ -3,16 +3,13 @@
     Private _CodigoInversion As String = String.Empty
     Private _EstadoDocumento As String = String.Empty
     Private _EstadoAutorizacion As String = String.Empty
-    'Private _Asunto As String
     Private _CodigoEmpresa As String = String.Empty
     Private _CodigoIF As String = String.Empty
     Private _TipoIF As String = String.Empty
     Private _CodigoEmisor As Integer = 0
     Private _CodigoCalificacionDeRiesgo As String = String.Empty
     Private _CodigoCalificadoraDeRiesgo As String = String.Empty
-    'Private _OrigendeFondos As String
     Private _Comentarios As String = String.Empty
-    'Private _Justificacion As String
     Private _TipoOperacion As String = String.Empty
     Private _DocumentoBase As Integer = 0
     Private _CodigoAsociado As String = String.Empty
@@ -91,14 +88,7 @@
             _CodigoCalificadoraDeRiesgo = value
         End Set
     End Property
-    'Public Property Asunto As String
-    '    Get
-    '        Return _Asunto
-    '    End Get
-    '    Set(value As String)
-    '        _Asunto = value
-    '    End Set
-    'End Property
+
     Public Property CodigoInstrumentoFinanciero As String
         Get
             If _CodigoIF Is Nothing Then Return String.Empty Else Return _CodigoIF
@@ -123,14 +113,7 @@
             _CodigoEmpresa = value
         End Set
     End Property
-    'Public Property OrigenDeFondos As String
-    '    Get
-    '        If _OrigendeFondos Is Nothing Then Return String.Empty Else Return _OrigendeFondos
-    '    End Get
-    '    Set(value As String)
-    '        _OrigendeFondos = value
-    '    End Set
-    'End Property
+
     Public Property PlazoNumero As Integer
         Get
             Return _PlazoNumero
@@ -147,38 +130,8 @@
             _Plazofactor = value
         End Set
     End Property
-    Public Property MontoInversion As Double
-        Get
-            Return _MontoInversion
-        End Get
-        Set(value As Double)
-            _MontoInversion = value
-        End Set
-    End Property
-    Public Property Precio As Double
-        Get
-            Return _Precio
-        End Get
-        Set(value As Double)
-            _Precio = value
-        End Set
-    End Property
-    Public Property Rendimiento As Double
-        Get
-            Return _Rendimiento
-        End Get
-        Set(value As Double)
-            _Rendimiento = value
-        End Set
-    End Property
-    Public Property Ingresos As Double
-        Get
-            Return _Ingresos
-        End Get
-        Set(value As Double)
-            _Ingresos = value
-        End Set
-    End Property
+
+
     Public Property TipoOperacion As String
         Get
             Return _TipoOperacion
@@ -214,26 +167,11 @@
             If _EstadoDocumento Is Nothing Then Return String.Empty Else Return _EstadoDocumento
         End Get
         Set(value As String)
-            'If IsDBNull(value) Then _EstadoDocumento = String.Empty Else _EstadoDocumento = value
             _EstadoDocumento = value
         End Set
     End Property
-    Public Property EstadoAutorizacion As String
-        Get
-            If _EstadoAutorizacion Is Nothing Then Return String.Empty Else Return _EstadoAutorizacion
-        End Get
-        Set(value As String)
-            _EstadoAutorizacion = value
-        End Set
-    End Property
-    'Public Property Justificacion As String
-    '    Get
-    '        Return _Justificacion
-    '    End Get
-    '    Set(value As String)
-    '        _Justificacion = value
-    '    End Set
-    'End Property
+
+
     Public Property Comentarios As String
         Get
             Return _Comentarios

+ 3 - 32
ENTI/LETESCE.vb

@@ -18,22 +18,7 @@
     Private _IngresoNeto As Double
 
 
-    Public Property DocId As Integer
-        Get
-            Return _DocId
-        End Get
-        Set(value As Integer)
-            _DocId = value
-        End Set
-    End Property
-    Public Property CodigoInversion As String
-        Get
-            Return _CodigoInversion
-        End Get
-        Set(value As String)
-            _CodigoInversion = value
-        End Set
-    End Property
+
 
     Public Property CodigoCasa As String
         Get
@@ -51,14 +36,7 @@
             _ValorNominal = value
         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 Precio As Double
         Get
             Return _Precio
@@ -67,14 +45,7 @@
             _Precio = value
         End Set
     End Property
-    Public Property Impuestos As Double
-        Get
-            Return _Impuestos
-        End Get
-        Set(value As Double)
-            _Impuestos = value
-        End Set
-    End Property
+
     Public Property TotalaPagar As Double
         Get
             Return _TotalaPagar

+ 1 - 33
ENTI/NotaEstructuradaCE.vb

@@ -81,14 +81,7 @@
             CalcularRendimientoNeto()
         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 Periodicidad As String
         Get
             Return _Periodicidad
@@ -109,31 +102,6 @@
         End Get
 
     End Property
-    Public Property IngresoBruto As Double
-        Get
-            Return _IngresoBruto
-        End Get
-        Set(value As Double)
-            _IngresoBruto = value
-        End Set
-    End Property
-    Public Property Impuestos As Double
-        Get
-            Return _Impuestos
-        End Get
-        Set(value As Double)
-            _Impuestos = value
-        End Set
-    End Property
-    Public Property IngresoNeto As Double
-        Get
-            Return _IngresoNeto
-        End Get
-        Set(value As Double)
-            _IngresoNeto = value
-        End Set
-    End Property
-
 
     Public Sub New()
         _MontoDeInversion = 0.00

+ 0 - 200
ENTI/Operaciones.vb

@@ -9,7 +9,6 @@
     Dim V_FechaCorte As Date
     Dim ElementosConsulta As New CargarElementosDAO
     Dim V_CodEmpr = ElementosConsulta.CodEmpr
-    'Dim V_CodIF = ElementosConsulta.CodIF
     Dim V_CodEmis = ElementosConsulta.CodEmis
     Dim V_CodECalRi = ElementosConsulta.CodECalRi
     Dim V_CodPais = ElementosConsulta.CodPais
@@ -21,109 +20,6 @@
     Dim V_ListaEstado = ElementosConsulta.ListaEstado
 
     Dim V_ListaCasasCorredoras = ElementosConsulta.ListaCasasCorredoras
-
-
-
-
-
-
-
-    Public ReadOnly Property ListaCasasCorredoras
-
-        Get
-
-            Return V_ListaCasasCorredoras
-        End Get
-    End Property
-
-
-
-
-    Public ReadOnly Property ListaEstado
-
-        Get
-
-            Return V_ListaEstado
-        End Get
-    End Property
-
-
-
-
-    Public ReadOnly Property ListaTipoRenta
-        Get
-            Return V_ListaTipoRenta
-        End Get
-    End Property
-
-
-
-
-
-    Public ReadOnly Property ListaTipoTasa
-        Get
-            Return V_ListaTipoTasa
-        End Get
-    End Property
-
-
-    Public ReadOnly Property ListaPeriodos
-        Get
-            Return V_ListaPeriodos
-        End Get
-    End Property
-
-
-    Public ReadOnly Property CodPais
-        Get
-            Return V_CodPais
-        End Get
-    End Property
-
-
-
-    Public ReadOnly Property CodEmpr
-        Get
-            Return V_CodEmpr
-        End Get
-    End Property
-    Public ReadOnly Property ListaTiposMercados
-        Get
-            Return V_ListaTiposMercados
-        End Get
-    End Property
-
-    Public ReadOnly Property ListaPlazo
-        Get
-            Return V_ListaPlazo
-        End Get
-    End Property
-
-    Public ReadOnly Property CodEmis
-        Get
-            Return V_CodEmis
-        End Get
-    End Property
-
-    Public ReadOnly Property CodECalRi
-        Get
-            Return V_CodECalRi
-        End Get
-    End Property
-
-
-
-
-
-
-
-
-
-
-
-
-
-
     Public Property TipoOperacion() As String
         Get
             Return V_TipoOperacion
@@ -133,11 +29,7 @@
         End Set
     End Property
 
-    Public Function DiasVencimiento(ByVal fecha1 As DateTime, ByVal fecha2 As DateTime)
 
-        Dim rango = DateDiff(DateInterval.Day, fecha2, fecha1)
-        Return rango
-    End Function
     Public Function DiasAcumulados(ByVal fecha1 As DateTime, ByVal fecha2 As DateTime, ByVal Base As Integer)
         Dim Total As Integer = 0
         fecha1 = Format(fecha1, "dd/MM/yyyy")
@@ -167,18 +59,8 @@
         Return Total
     End Function
 
-    Public Function CantidadDiasAgregar(ByVal fecha1 As DateTime, ByVal fecha2 As DateTime)
-        Dim Total As Integer = 0
 
-        Total = Dias360(fecha1, fecha2)
-        Total = 0
-        Return Total
-    End Function
 
-    Public Function InteresAcumulado(ByVal ValorNominal As Double, ByVal Cupon As Double, ByVal DiasAcumulados As Double, ByVal BaseDias As Integer)
-        Dim Proceso = ValorNominal * Cupon * DiasAcumulados / BaseDias
-        Return Proceso
-    End Function
 
     Public Function InteresAcumuladoPBUR(ByVal ValorNominal As Double, ByVal PorcCupon As Double, ByVal DiasAcumulados As Integer, ByVal IndexBase As Integer, ByVal FechaInicial As Date, FechaFinal As Date)
         Dim Proceso As Double = 0
@@ -286,22 +168,9 @@
 
         Return Proceso
     End Function
-    Public Function InteresAcumuladoPor(ByVal InteresAcumulado As Double, ByVal ValorNominal As Double)
-        Dim Proceso = InteresAcumulado / ValorNominal * 360 * 180
-        Return Proceso
-    End Function
-
 
-    Public Function PrecioSucio(ByVal PrecioCompra As Double, ByVal InteresAcumulado As Double)
 
-        Dim Proceso = PrecioCompra * 0.01 + InteresAcumulado
 
-        Return Proceso
-    End Function
-    Public Function ValorTrasado(ByVal PrecioCompra As Double, ByVal ValorNominal As Double)
-        Dim Proceso = (PrecioCompra / 100) * ValorNominal
-        Return Proceso
-    End Function
 
 
     Public Function Comisiones(ByVal Comision As Double, ByVal ValorTrasado As Double)
@@ -311,18 +180,9 @@
         Return Valor
     End Function
 
-    Public Function MontoPagar(ByVal ValorTrasado As Double, ByVal ComisionBolsa As Double, ByVal ComisionCasa As Double, ByVal InteresAcumulado As Double, ByVal CostoTransferencias As Double)
 
-        Dim Valor = ValorTrasado + ComisionBolsa + ComisionCasa + InteresAcumulado + CostoTransferencias
-        Return Valor
-
-    End Function
 
-    Public Function MontoRecibir(ByVal ValorTrasado As Double, ByVal ComisionBolsa As Double, ByVal ComisionCasa As Double, ByVal InteresAcumulado As Double)
-        Dim Valor = ValorTrasado - ComisionBolsa - ComisionCasa + InteresAcumulado
-        Return Valor
 
-    End Function
     Public Function Base360(ByVal Fecha1 As Date, ByVal Fecha2 As Date)
         Dim Total As Integer = 0
         Dim dias = DateDiff(DateInterval.Day, Fecha1, Fecha2)
@@ -353,45 +213,6 @@
         Return Total
     End Function
 
-
-
-    Public Function Dias360(ByVal Fecha1 As Date, ByVal Fecha2 As Date)
-        Dim Total As Integer = 0
-        Dim dias = DateDiff(DateInterval.Day, Fecha1, Fecha2)
-        Dim dia As Integer = 0
-        Dim dias31 As Integer = 0
-        Dim febreros As Integer = 0
-        Dim bisiesto As Integer = 0
-        Dim PasaFebrero As Integer = 0
-        Dim PasaBisiesto As Integer = 0
-
-
-        While (Fecha1 < Fecha2)
-            dia = dia + 1
-
-            If (Fecha1.Day = 31) Then
-                dias31 = dias31 + 1
-
-            End If
-            If (Fecha1.Month = 2 And Fecha1.Day = 28) Then
-                febreros = febreros + 2
-                PasaFebrero += 1
-            End If
-            If (Fecha1.Month = 2 And Fecha1.Day = 29) Then
-                bisiesto = bisiesto + 1
-                PasaBisiesto += 1
-            End If
-
-            Fecha1 = Fecha1.AddDays(1)
-        End While
-
-
-        Total = dia + dias31 - febreros - bisiesto
-
-        Return Total
-    End Function
-
-
     Public Function FechaDias360(ByVal Fecha1 As Date, ByVal Day As Integer)
         Dim CorrelativoDias As Integer = 1
         Dim Dias As Integer = Day
@@ -714,27 +535,6 @@
         Return Dias
     End Function
 
-
-    'Public Sub ValidarEntrada(sender As Object, e As KeyPressEventArgs)
-    '    If (Char.IsNumber(e.KeyChar)) Then
-    '        e.Handled = False
-
-    '    ElseIf Char.IsSeparator(e.KeyChar) Then
-    '        e.Handled = True
-    '    ElseIf Char.IsLetter(e.KeyChar) Then
-    '        e.Handled = True
-
-
-
-
-    '    ElseIf Char.IsSymbol(e.KeyChar) Then
-    '        e.Handled = True
-
-    '    ElseIf Char.IsWhiteSpace(e.KeyChar) Then
-    '        e.Handled = True
-    '    End If
-    'End Sub
-
     Public Sub ValidarEntrada(sender As Object, e As KeyPressEventArgs, ByVal NoAgregar As Boolean)
         If (Char.IsNumber(e.KeyChar)) Then
             e.Handled = False

+ 1 - 8
ENTI/RegistroIngresoCE.vb

@@ -61,14 +61,7 @@
             _IngresoID = value
         End Set
     End Property
-    Public Property CodigoInstitucionFinanciera As String
-        Get
-            Return _CodigoInstitucionFinanciera
-        End Get
-        Set(value As String)
-            _CodigoInstitucionFinanciera = value
-        End Set
-    End Property
+
     Public Property FormaDePago As String
         Get
             Return _FormaDePago

+ 0 - 685
ENTI/ReportosCE.vb

@@ -21,275 +21,7 @@
     Private _RendimientoNetoDespuesDeImpuestos As Double
     Private Operaciones As New Operaciones
 
-    Public Property CodigoInversion As String
-        Get
-            Return _CodigoInversion
-        End Get
-        Set(value As String)
-            _CodigoInversion = value
-        End Set
-    End Property
 
-    Public Property CodigoCasa As String
-        Get
-            Return _CodigoCasa
-        End Get
-        Set(value As String)
-            _CodigoCasa = value
-        End Set
-    End Property
-    Public Property Nombre As String
-        Get
-            Return _Nombre
-        End Get
-        Set(value As String)
-            _Nombre = value
-        End Set
-    End Property
-    Public Property FechaDeCompra As Date
-        Get
-            Return _FechaDeCompra
-        End Get
-        Set(value As Date)
-            _FechaDeCompra = value
-        End Set
-    End Property
-    Public Property ValorTransado As Double
-        Get
-            Return _ValorTransado
-        End Get
-        Set(value As Double)
-            _ValorTransado = value
-            Calcular_MontoALiquidar()
-            Calcular_InteresAGenerar()
-            Caluclar_RendimientoNetoAntesImpuestos()
-            Calcular_ValorRecompra()
-            Calcular_ValorNeto()
-            Calcular_RendimientoNetoDespuesImpuestos()
-
-
-        End Set
-    End Property
-    Public Property Dias As Integer
-        Get
-            Return _Dias
-        End Get
-        Set(value As Integer)
-            _Dias = value
-            Calcular_InteresAGenerar()
-            Caluclar_RendimientoNetoAntesImpuestos()
-            Calcular_RendimientoNetoDespuesImpuestos()
-
-        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 Rendimiento As Double
-        Get
-            Return _Rendimiento
-        End Get
-        Set(value As Double)
-            _Rendimiento = value
-            Calcular_InteresAGenerar()
-
-        End Set
-    End Property
-    Public Property Impuestos As Double
-        Get
-            Return _Impuestos
-        End Get
-        Set(value As Double)
-            _Impuestos = value
-        End Set
-    End Property
-    Public Property OtrosCostos As Double
-        Get
-            Return _OtrosCostos
-        End Get
-        Set(value As Double)
-            _OtrosCostos = value
-        End Set
-    End Property
-    Public ReadOnly Property TotalCostos As Double
-        Get
-            Return _TotalCostos
-        End Get
-    End Property
-    Public Property MontoALiquidar As Double
-        Get
-            Return _MontoALiquidar
-        End Get
-        Set(value As Double)
-            _MontoALiquidar = value
-        End Set
-    End Property
-    Public ReadOnly Property InteresAGenerar As Double
-        Get
-            Return _InteresAGenerar
-        End Get
-    End Property
-    Public Property CostoDeTransferencia As Double
-        Get
-            Return _CostoDeTransferencia
-        End Get
-        Set(value As Double)
-            _CostoDeTransferencia = value
-            Calcular_ValorNeto()
-
-        End Set
-    End Property
-    Public ReadOnly Property RendimientoNetoAntesDeImpuestos As Double
-        Get
-            Return _RendimientoNetoAntesDeImpuestos
-        End Get
-    End Property
-    Public Property ValorReCompra As Double
-        Get
-            Return _ValorReCompra
-        End Get
-        Set(value As Double)
-            _ValorReCompra = value
-        End Set
-    End Property
-    Public Property ImpuestosLiquidacion As Double
-        Get
-            Return _ImpuestosLiquidacion
-        End Get
-        Set(value As Double)
-            _ImpuestosLiquidacion = value
-        End Set
-    End Property
-    Public ReadOnly Property IngresoNeto As Double
-        Get
-            Return _IngresoNeto
-        End Get
-    End Property
-    Public Property ValorNeto As Double
-        Get
-            Return _ValorNeto
-        End Get
-        Set(value As Double)
-            _ValorNeto = value
-        End Set
-    End Property
-    Public ReadOnly Property RendimientoNetoDespuesDeImpuestos As Double
-        Get
-            Return _RendimientoNetoDespuesDeImpuestos
-        End Get
-    End Property
-
-
-
-
-    Private Sub Calcular_TotalCostos()
-        Dim valor As Double
-
-        valor = 0
-        _TotalCostos = valor
-        Calcular_MontoALiquidar()
-        Caluclar_RendimientoNetoAntesImpuestos()
-        Calcular_RendimientoNetoDespuesImpuestos()
-
-    End Sub
-    Private Sub Calcular_MontoALiquidar()
-        Dim valor As Double
-
-        valor = _ValorTransado + _TotalCostos
-        _MontoALiquidar = valor
-
-    End Sub
-
-    Private Sub Calcular_InteresAGenerar()
-        Dim valor As Double
-        valor = _ValorTransado * (_Rendimiento / 100) * _Dias / 365
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-        _InteresAGenerar = valor
-
-        Caluclar_RendimientoNetoAntesImpuestos()
-        Calcular_ValorRecompra()
-        Calcular_ISR()
-        Calcular_IngresoNeto()
-
-    End Sub
-    Private Sub Caluclar_RendimientoNetoAntesImpuestos()
-        Dim valor As Double
-
-        valor = ((_InteresAGenerar - _TotalCostos) / _ValorTransado) * (365 / _Dias)
-        _RendimientoNetoAntesDeImpuestos = valor * 100
-    End Sub
-    Private Sub Calcular_ValorRecompra()
-        Dim valor As Double
-
-        valor = _ValorTransado + _InteresAGenerar
-        _ValorReCompra = valor
-
-    End Sub
-    Private Sub Calcular_ISR()
-        Dim valor As Double
-
-        valor = _InteresAGenerar * 0.1
-        _ImpuestosLiquidacion = valor
-
-        Calcular_IngresoNeto()
-
-    End Sub
-    Private Sub Calcular_IngresoNeto()
-        Dim valor As Double
-
-        valor = _InteresAGenerar - _ImpuestosLiquidacion
-        _IngresoNeto = valor
-
-        Calcular_ValorNeto()
-        Calcular_RendimientoNetoDespuesImpuestos()
-
-    End Sub
-    Private Sub Calcular_ValorNeto()
-        Dim valor As Double
-
-        valor = _ValorTransado + _IngresoNeto - _CostoDeTransferencia
-        _ValorNeto = valor
-
-    End Sub
-    Private Sub Calcular_RendimientoNetoDespuesImpuestos()
-        Dim valor As Double
-
-        valor = (_IngresoNeto - _TotalCostos) / _ValorTransado * 365 / _Dias
-        _RendimientoNetoDespuesDeImpuestos = valor * 100
-
-
-    End Sub
 
 
     Function FechaDeVencimiento(ByVal fecha As Date, ByVal dias As Integer)
@@ -300,199 +32,24 @@
 
 
     Function Comision(ByVal valortrasado As String, ByVal dias As Integer, ByVal por As Double, ByVal Fecha1 As Date, ByVal Fecha2 As Date, ByVal IndexBase As Integer)
-
-
-
-
-
-
-
-
-
         Dim Valor As Double = 0
         Valor = valortrasado * dias * por / 365
         Return Valor
-        'If (IndexBase = 0) Then
-        '    Valor = valortrasado * dias * (por / 100) / 360
-        '    Return Valor
-        'ElseIf (IndexBase = 1) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = valortrasado * DiasPrimeraFecha * (por / 100) / 366
-        '        PrOpc2 = valortrasado * DiasSegundaFecha * (por / 100) / 365
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = valortrasado * DiasSegundaFecha * (por / 100) / 365
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = valortrasado * DiasPrimeraFecha * (por / 100) / 366
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor
-
-
-
-        'ElseIf (IndexBase = 2) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha360Bi(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha360(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = valortrasado * DiasPrimeraFecha * (por / 100) / 366
-        '        PrOpc2 = valortrasado * DiasSegundaFecha * (por / 100) / 365
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = valortrasado * DiasSegundaFecha * (por / 100) / 365
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = valortrasado * DiasPrimeraFecha * (por / 100) / 366
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor
-
-
-
-
-
-
-        'Else
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = valortrasado * DiasPrimeraFecha * (por / 100) / 360
-        '        PrOpc2 = valortrasado * DiasSegundaFecha * (por / 100) / 360
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = valortrasado * DiasSegundaFecha * (por / 100) / 360
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = valortrasado * DiasPrimeraFecha * (por / 100) / 360
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor
-
-        'End If
-        'Return Valor
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
     End Function
 
     Function IOF(ByVal valortrasado As Double, comisioncasa As Double, ByVal comisionbolsa As Double, ByVal dias As Integer, ByVal VALIOF As Double, ByVal Fecha1 As Date, ByVal Fecha2 As Date, ByVal IndexBase As Integer)
-
         Dim Valor As Double = 0
         Valor = ((valortrasado + comisioncasa + comisionbolsa) * (dias * VALIOF)) / 365
-
         Return Valor
-        'If (IndexBase = 0) Then
-        '    Valor = ((valortrasado + comisioncasa + comisionbolsa) * (dias * VALIOF)) / 360
-        '    Return Valor
-        'ElseIf (IndexBase = 1) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = ((valortrasado + comisioncasa + comisionbolsa) * (DiasPrimeraFecha * VALIOF)) / 366
-        '        PrOpc2 = ((valortrasado + comisioncasa + comisionbolsa) * (DiasSegundaFecha * VALIOF)) / 365
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = ((valortrasado + comisioncasa + comisionbolsa) * (DiasSegundaFecha * VALIOF)) / 365
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = ((valortrasado + comisioncasa + comisionbolsa) * (DiasPrimeraFecha * VALIOF)) / 366
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor
-
-
-
-        'ElseIf (IndexBase = 2) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha360Bi(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha360(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = ((valortrasado + comisioncasa + comisionbolsa) * (DiasPrimeraFecha * VALIOF)) / 366
-        '        PrOpc2 = ((valortrasado + comisioncasa + comisionbolsa) * (DiasSegundaFecha * VALIOF)) / 365
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = ((valortrasado + comisioncasa + comisionbolsa) * (DiasSegundaFecha * VALIOF)) / 365
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = ((valortrasado + comisioncasa + comisionbolsa) * (DiasPrimeraFecha * VALIOF)) / 366
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor
-
-
-
-
-
-
-        'Else
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = ((valortrasado + comisioncasa + comisionbolsa) * (DiasPrimeraFecha * VALIOF)) / 360
-        '        PrOpc2 = ((valortrasado + comisioncasa + comisionbolsa) * (DiasSegundaFecha * VALIOF)) / 360
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = ((valortrasado + comisioncasa + comisionbolsa) * (DiasSegundaFecha * VALIOF)) / 360
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = ((valortrasado + comisioncasa + comisionbolsa) * (DiasPrimeraFecha * VALIOF)) / 360
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor
-
-        'End If
-        'Return Valor
-
-
-
     End Function
 
     Function TotCostos(ByVal ComisionCasa As Double, ByVal ComisionBolsa As Double, ByVal IOF As Double, ByVal OC As Double, ByVal ValorTransado As Double, ByVal Instrumento As String)
         Dim Valor As Double = 0
-
         Valor = ComisionCasa + ComisionBolsa + IOF + OC
-
-
-
         Return Valor
     End Function
     Function MontoLiquidacion(ByVal ValorTrasado As Double, ByVal totalcosto As Double)
         Dim Valor = ValorTrasado + totalcosto
-
         Return Valor
     End Function
 
@@ -500,84 +57,6 @@
         Dim Valor As Double = 0
         Valor = ValorTrasado * rendimiento * dias / 365
         Return Valor
-        'If (IndexBase = 0) Then
-        '    Valor = ValorTrasado * rendimiento * dias / 360
-
-        '    Return Valor
-        'ElseIf (IndexBase = 1) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = ValorTrasado * rendimiento * DiasPrimeraFecha / 366
-        '        PrOpc2 = ValorTrasado * rendimiento * DiasSegundaFecha / 365
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = ValorTrasado * rendimiento * DiasSegundaFecha / 365
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = ValorTrasado * rendimiento * DiasPrimeraFecha / 366
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor
-
-
-
-        'ElseIf (IndexBase = 2) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha360Bi(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha360(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = ValorTrasado * rendimiento * DiasPrimeraFecha / 366
-        '        PrOpc2 = ValorTrasado * rendimiento * DiasSegundaFecha / 365
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = ValorTrasado * rendimiento * DiasSegundaFecha / 365
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = ValorTrasado * rendimiento * DiasPrimeraFecha / 366
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor
-
-
-
-
-
-
-        'Else
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = ValorTrasado * rendimiento * DiasPrimeraFecha / 360
-        '        PrOpc2 = ValorTrasado * rendimiento * DiasSegundaFecha / 360
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = ValorTrasado * rendimiento * DiasSegundaFecha / 360
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = ValorTrasado * rendimiento * DiasPrimeraFecha / 360
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor
-
-        'End If
-        'Return Valor
-
-
-
-
-
-
-
-
-
-
-
     End Function
 
     Function RendimientoAntes(ByVal interesgenerar As Double, ByVal totcostos As Double, ByVal valortra As Double, ByVal dias As Integer, ByVal Fecha1 As Date, ByVal Fecha2 As Date, ByVal IndexBase As Integer, ByVal Tabla As String)
@@ -587,94 +66,6 @@
         Else
             Valor = ((interesgenerar + totcostos) / valortra) * (365 / dias)
         End If
-
-
-
-        'If (IndexBase = 0) Then
-        '    Valor = ((interesgenerar - totcostos) / valortra) * (360 / dias)
-        '    Return Valor * 100
-        'ElseIf (IndexBase = 1) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = ((interesgenerar - totcostos) / valortra) * (366 / DiasPrimeraFecha)
-        '        PrOpc2 = ((interesgenerar - totcostos) / valortra) * (365 / DiasSegundaFecha)
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = ((interesgenerar - totcostos) / valortra) * (365 / DiasSegundaFecha)
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = ((interesgenerar - totcostos) / valortra) * (366 / DiasPrimeraFecha)
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor * 100
-
-
-
-        'ElseIf (IndexBase = 2) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha360Bi(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha360(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = ((interesgenerar - totcostos) / valortra) * (366 / DiasPrimeraFecha)
-        '        PrOpc2 = ((interesgenerar - totcostos) / valortra) * (365 / DiasSegundaFecha)
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = ((interesgenerar - totcostos) / valortra) * (365 / DiasSegundaFecha)
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = ((interesgenerar - totcostos) / valortra) * (366 / DiasPrimeraFecha)
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor * 100
-
-
-
-
-
-
-        'Else
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = ((interesgenerar - totcostos) / valortra) * (360 / DiasPrimeraFecha)
-        '        PrOpc2 = ((interesgenerar - totcostos) / valortra) * (360 / DiasSegundaFecha)
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = ((interesgenerar - totcostos) / valortra) * (360 / DiasSegundaFecha)
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = ((interesgenerar - totcostos) / valortra) * (360 / DiasPrimeraFecha)
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor * 100
-
-        'End If
-        'Return Valor * 100
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
         Return Valor * 100
     End Function
 
@@ -683,10 +74,6 @@
         Return Valor
     End Function
 
-    Function Renta(ByVal InteresGenerar As Double, ByVal Porcentaje As Double)
-        Dim Valor = InteresGenerar * Porcentaje
-        Return Valor
-    End Function
 
     Function IngresoNet(ByVal InteresGenerar As Double, ByVal Renta As Double)
         Dim Valor = InteresGenerar - Renta
@@ -701,78 +88,6 @@
     Function RendimientoDespues(ByVal IngresoNeto As Double, ByVal totalcosto As Double, ByVal valortrasado As Double, ByVal dias As Integer, ByVal Fecha1 As Date, Fecha2 As Date, ByVal IndexBase As Integer)
         Dim Valor As Double = 0
         Valor = (IngresoNeto - totalcosto) / valortrasado * 365 / dias
-        'If (IndexBase = 0) Then
-        '    Valor = (IngresoNeto - totalcosto) / valortrasado * 360 / dias
-        '    Return Valor * 100
-        'ElseIf (IndexBase = 1) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = (IngresoNeto - totalcosto) / valortrasado * 366 / DiasPrimeraFecha
-        '        PrOpc2 = (IngresoNeto - totalcosto) / valortrasado * 365 / DiasSegundaFecha
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = (IngresoNeto - totalcosto) / valortrasado * 365 / DiasSegundaFecha
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = (IngresoNeto - totalcosto) / valortrasado * 366 / DiasPrimeraFecha
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor * 100
-
-
-
-        'ElseIf (IndexBase = 2) Then
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha360Bi(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha360(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = (IngresoNeto - totalcosto) / valortrasado * 366 / DiasPrimeraFecha
-        '        PrOpc2 = (IngresoNeto - totalcosto) / valortrasado * 365 / DiasSegundaFecha
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = (IngresoNeto - totalcosto) / valortrasado * 365 / DiasSegundaFecha
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = (IngresoNeto - totalcosto) / valortrasado * 366 / DiasPrimeraFecha
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor * 100
-
-
-
-
-
-
-        'Else
-        '    Dim PrOpc1 = 0.0, PrOpc2 = 0.0
-        '    Dim DiasPrimeraFecha = 0, DiasSegundaFecha = 0
-        '    DiasPrimeraFecha = Operaciones.DiasDespuesCambioPrimeraFecha366Varios(Fecha1, Fecha2)
-        '    DiasSegundaFecha = Operaciones.DiasDespuesCambioPrimeraFecha365Varios(Fecha1, Fecha2)
-        '    If (DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        PrOpc1 = (IngresoNeto - totalcosto) / valortrasado * 360 / DiasPrimeraFecha
-        '        PrOpc2 = (IngresoNeto - totalcosto) / valortrasado * 360 / DiasSegundaFecha
-        '        Valor = PrOpc1 + PrOpc2
-        '    ElseIf (Not DiasPrimeraFecha > 0 And DiasSegundaFecha > 0) Then
-        '        Valor = (IngresoNeto - totalcosto) / valortrasado * 360 / DiasSegundaFecha
-        '    ElseIf (DiasPrimeraFecha > 0 And Not DiasSegundaFecha > 0) Then
-        '        Valor = (IngresoNeto - totalcosto) / valortrasado * 360 / DiasPrimeraFecha
-        '    Else
-        '        Valor = 0
-        '    End If
-        '    Return Valor * 100
-
-        'End If
-        'Return Valor * 100
-
-
-
-
-
-
         Return Valor * 100
     End Function
 End Class

+ 0 - 32
ENTI/SeriesCE.vb

@@ -5,38 +5,6 @@
     Private _Numero As Integer
 
 
-    Public Property CodigoEmpresa As String
-        Get
-            Return _CodigoEmpresa
-        End Get
-        Set(value As String)
-            _CodigoEmpresa = value
-        End Set
-    End Property
-    Public Property CodigoInstrumentoFinanciero As String
-        Get
-            Return _CodigoInstrumentoFinanciero
-        End Get
-        Set(value As String)
-            _CodigoInstrumentoFinanciero = value
-        End Set
-    End Property
-    Public Property Tipo As String
-        Get
-            Return _Tipo
-        End Get
-        Set(value As String)
-            _Tipo = value
-        End Set
-    End Property
-    Public Property Numero As Integer
-        Get
-            Return _Numero
-        End Get
-        Set(value As Integer)
-            _Numero = value
-        End Set
-    End Property
 
 
 End Class

+ 0 - 69
ENTI/zAccionesDetalleCE.vb

@@ -8,73 +8,4 @@
     Private _IngresoNeto As Double
     Private _Estado As String
 
-    Public Property CodigoInversion As String
-        Get
-            Return _CodigoInversion
-        End Get
-        Set(value As String)
-            _CodigoInversion = value
-        End Set
-    End Property
-    Public Property Fecha As Date
-        Get
-            Return _Fecha
-        End Get
-        Set(value As Date)
-            _Fecha = 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
-    Public ReadOnly Property IngresoBruto As Double
-        Get
-            Return _IngresoBruto
-        End Get
-    End Property
-    Public Property PorcentajeISR As Double
-        Get
-            Return _PorcentajeISR
-        End Get
-        Set(value As Double)
-            _PorcentajeISR = value
-        End Set
-    End Property
-    Public ReadOnly Property ValorISR As Double
-        Get
-            Return _ValorISR
-        End Get
-    End Property
-    Public ReadOnly Property IngresoNeto As Double
-        Get
-            Return _IngresoNeto
-        End Get
-    End Property
-    Public Property Estado As String
-        Get
-            Return _Estado
-        End Get
-        Set(value As String)
-            _Estado = value
-        End Set
-    End Property
-
-    'Public Sub New()
-    '    _Fecha = Date.Now.Date
-    '    _IngresoBruto = 0
-    '    _PorcentajeISR = 0
-    '    _ValorISR = 0
-    '    _IngresoNeto = 0
-    'End Sub
-
-
-
-
-
-
 End Class

+ 20 - 514
FRM/frmAcciones.vb

@@ -42,12 +42,10 @@ Public Class frmAcciones
     Dim DobleClick As Boolean = False
     Dim Operaciones As New Operaciones
     Dim InstrumentoFinanciero As String = oDAOGeneral.ObtenerInstrumento(Variables.Codigo)
-    'Dim oAccionesNEG As New AccionesNEG
     Dim Cargado As Boolean = False
     Dim Cierre As Boolean = False
     Dim DatosCargados As Boolean = False
-    'Dim dtImpuestosYComisiones As DataTable
-    'Dim dtDividendos As DataTable
+
 
     Private _Modo As String
     Private _IdDocumento As Integer
@@ -423,22 +421,11 @@ Public Class frmAcciones
 
     Public Function NuevaAccion()
         Dim Coleccion = ColeccionDatos()
-        'Dim Codigo = Variables.Codigo
-        'oAccionesDAO.NuevaAccion(Codigo, Coleccion)
-        Return Coleccion
-    End Function
-    Public Function NuevaAccionConsulta()
-        Dim Coleccion = ColeccionDatos()
-        Dim Codigo = Variables.Codigo
-        oAccionesDAO.NuevaAccion(Codigo, Coleccion)
         Return Coleccion
     End Function
 
-    Sub ModificarAccion()
-        Dim Coleccion = ColeccionDatos()
-        Dim Codigo = Variables.Codigo
-        oAccionesDAO.ModificarAccion(Codigo, Coleccion)
-    End Sub
+
+
 
     Sub Eliminar()
 
@@ -446,11 +433,6 @@ Public Class frmAcciones
         oAccionesDAO.Eliminar(Codigo)
     End Sub
 
-    'Sub EliminrElementoAccion()
-
-    '    Dim Codigo = Variables.Codigo
-    '    'oAccionesDAO.EliminarElemeno(Codigo)
-    'End Sub
 
     Sub ModificacionesPreferentes()
         GrpVenta.Visible = False
@@ -593,14 +575,7 @@ Public Class frmAcciones
 
 
 
-    Function ExisteVenta()
-        Dim Ventas As Boolean = False
-        Dim General As New DAOGeneral
-        Dim Codigo As String = Variables.Codigo
-        Ventas = General.ExisteVenta(Codigo)
 
-        Return Ventas
-    End Function
 
 
     Sub ModificarDividendo()
@@ -617,82 +592,9 @@ Public Class frmAcciones
 
     End Sub
 
-    'LOAD
-    'Sub ActualizarDividendos()
-
-    'Dim vFactorDeDividendo = oAccionesCE.FactorDeDividendo
-    'Dim vFechaInicial = oAccionesCE.FechaLiquidacionCompra
-    'Dim vFechaLiquidacionVenta = oAccionesCE.FechaLiquidacionVenta
-    'Dim vUnidadesVenta = oAccionesCE.CantidadVenta
-    'Dim vAccionPreferente = oAccionesCE.AccionPreferente
-    'Dim vValorTransadoCompra = oAccionesCE.ValorTransadoCompra
-
-    'Dim Periodos As Integer
-    'Dim Periodicidad As String = "A"
-    'Dim Filas As DataRow
-    'Dim FactorDidivendo As Double = vFactorDeDividendo
-    'Dim FechaInicial As Date = vFechaInicial
-    'Dim PorcentajeRenta As Double = 0.05
-    'Dim IngresoBruto As Double
-    'Dim Renta As Double
-    'Dim IngresoNeto As Double
-    'Dim SumaImgresoBruto As Double
-    'Dim SumaImgresoNeto As Double
-    'Dim Suma As Object
-
-    'If Periodicidad = "A" Then
-    '       Periodos = DateDiff(DateInterval.Year, vFechaInicial, vFechaLiquidacionVenta)
-
-    'End If
-
-    'For i As Integer = 1 To Periodos
-
-    'If Periodicidad = "A" Then
-    '           FechaInicial = FechaInicial.AddYears(1)
-    'End If
-
-    '       IngresoBruto = FactorDidivendo * vUnidadesVenta
-    'If vAccionPreferente = "S" Then
-    '           IngresoBruto = vValorTransadoCompra * FactorDidivendo
-    'End If
-
-
-    '       Renta = IngresoBruto * PorcentajeRenta
-    '      IngresoNeto = IngresoBruto - Renta
-
-    '     Filas = dtDividendos.NewRow()
-    '    Filas("Fecha") = FechaInicial
-    '   Filas("Dividendo") = FactorDidivendo
-    '  Filas("IngresoBruto") = IngresoBruto
-    ' Filas("Renta") = Renta
-    'Filas("IngresoNeto") = IngresoNeto
 
-    'dtDividendos.Rows.Add(Filas)
-    'Next
-
-    '   SumaImgresoBruto = Dividendos.Compute("SUM(IngresoBruto)", "").ToString
-    '  Suma = dtDividendos.Compute("SUM(IngresoBruto)", "")
-    'If Suma IsNot DBNull.Value Then
-    '       SumaImgresoBruto = Convert.ToDouble(Suma)
-    'End If
-
-    '   SumaImgresoNeto = Dividendos.Compute("SUM(IngresoNeto)", "").ToString
-    '  Suma = dtDividendos.Compute("SUM(IngresoNeto)", "")
-    'If Suma IsNot DBNull.Value Then
-    '       SumaImgresoNeto = Convert.ToDouble(Suma)
-    'End If
-
-
-    'Me.txtIngresoBrutoDividendos_Venta.Text = SumaImgresoBruto.ToString
-    'Me.txtIngresoNetoDividendos_Venta.Text = SumaImgresoNeto.ToString
-
-    'Me.dgvDividendos.DataSource = dtDividendos
-
-    '   RefrescarRetornoAnualBruto_Venta()
-    '  RefrescarRetornoAnualNeto_Venta()
-    'End Sub
     Private Sub chkAccionPreferente_CheckedChanged(sender As Object, e As EventArgs)
-        ControlChkAccionPreferente()
+
 
 
     End Sub
@@ -700,18 +602,8 @@ Public Class frmAcciones
         Dim codigo As String = Variables.Codigo
         Dim Accion As Collection = NuevaAccion()
         Dim ElementosAccion As Dictionary(Of String, Collection) = ColeccionNuevo(codigo)
-
-        ''RefrescarClaseEntidad()
-
-        'ModificarElementoAccion()
-
-
         If (Estado = "N") Then
-
-
             oAccionesDAO.ProcesoDatos(Accion, codigo, ElementosAccion, "Nuevo")
-
-
         ElseIf Not ExisteValidacion() Then
 
             Variables.ColeccionACC = NuevaAccion()
@@ -725,14 +617,11 @@ Public Class frmAcciones
         If Estado = "M" Then
             oAccionesDAO.ProcesoDatos(Accion, codigo, ElementosAccion, "Modificar")
 
-            'ActualizarRegistro()
-            'ModificarAccion()
-            'ModificarElementoAccion()
+
 
         End If
         If Estado = "B" Then
-            'ActualizarRegistro()
-            'EliminarAccion()
+
             Eliminar()
 
         End If
@@ -853,9 +742,7 @@ Public Class frmAcciones
 
     End Sub
 
-    Private Sub RefrescarValores()
 
-    End Sub
 
     '********** CONTROL DE VALORES **********
     'COMPRA
@@ -948,16 +835,8 @@ Public Class frmAcciones
         RefrescarValorControles()
 
     End Sub
-    Private Sub ControlChkBolsa()
-        'ActivarEdicion()
-
-    End Sub
-    Private Sub ControlChkAccionPreferente()
-        'ActivarEdicion()
 
 
-    End Sub
-
     '********** FIN CONTROL DE VALORES **********
 
 
@@ -966,8 +845,6 @@ Public Class frmAcciones
 
     'COMPRA
     Private Sub txtPrecioLimpioCompra_TextChanged(sender As Object, e As EventArgs) Handles txtPrecioLimpioCompra.TextChanged
-        'ControlPrecioLimpioCompra()
-        'ActivarEdicion()
         ControlPrecioLimpioCompra()
     End Sub
 
@@ -975,7 +852,6 @@ Public Class frmAcciones
         ControlPrecioLimpioCompra()
     End Sub
     Private Sub dtpFechaOperacionCompra_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaOperacionCompra.ValueChanged
-        'ActivarEdicion()
         If DatosCargados Then
             ControlFechaOperacionCompra()
             RefrescarValorControles()
@@ -984,7 +860,6 @@ Public Class frmAcciones
     End Sub
 
     Private Sub dtpFechaLiquidacionCompra_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaVencimientoCompra.ValueChanged
-        'ActivarEdicion()
         If DatosCargados Then
             ControlFechaLiquidacionCompra()
             RefrescarValorControles()
@@ -993,11 +868,7 @@ Public Class frmAcciones
     End Sub
 
     Private Sub txtUnidadesCompra_TextChanged(sender As Object, e As EventArgs) Handles txtUnidadesCompra.TextChanged
-        'ActivarEdicion()
-        'ControlCantidadCompra()
         If DatosCargados Then
-
-
             ControlCantidadCompra()
             CopiarDatos()
         End If
@@ -1015,8 +886,6 @@ Public Class frmAcciones
 
     'VENTA
     Private Sub txtPrecioLimpioVenta_TextChanged(sender As Object, e As EventArgs) Handles txtPrecioLimpioVenta.TextChanged
-        'ActivarEdicion()
-        'ControlPrecioLimpioVenta()
         ControlPrecioLimpioVenta()
     End Sub
 
@@ -1025,7 +894,7 @@ Public Class frmAcciones
     End Sub
 
     Private Sub dtpFechaOperacionVenta_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaOperacionVenta.ValueChanged
-        'ActivarEdicion()
+
         If DatosCargados Then
             ControlFechaOperacionVenta()
             RefrescarValorControles()
@@ -1033,7 +902,7 @@ Public Class frmAcciones
     End Sub
 
     Private Sub dtpFechaLiquidacionVenta_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaVencimientoVenta.ValueChanged
-        'ActivarEdicion()
+
         If DatosCargados Then
             ControlFechaLiquidacionVenta()
             RefrescarValorControles()
@@ -1041,11 +910,9 @@ Public Class frmAcciones
     End Sub
 
     Private Sub txtUnidadesVenta_TextChanged(sender As Object, e As EventArgs) Handles txtUnidadesVenta.TextChanged
-        'ActivarEdicion()
-        'ControlCantidadVenta()
+
         If DatosCargados Then
             ControlCantidadVenta()
-
             MensajeAlerta()
             MostrarMensaje = True
         End If
@@ -1074,7 +941,7 @@ Public Class frmAcciones
         ControlCantidadVenta()
     End Sub
     Private Sub chkBolsa_CheckedChanged(sender As Object, e As EventArgs)
-        ControlChkBolsa()
+
     End Sub
 
     '********** FIN EVENTOS DE CONTROLES ********** 
@@ -1083,7 +950,7 @@ Public Class frmAcciones
 
     '********** FUNCIONES **********
     Private Sub RefrescarClaseEntidad()
-        ControlChkBolsa()
+
 
         ControlPrecioLimpioCompra()
         ControlFechaOperacionCompra()
@@ -1095,7 +962,7 @@ Public Class frmAcciones
         ControlFechaLiquidacionVenta()
         ControlCantidadVenta()
 
-        'RefrescarValorControles()
+
 
     End Sub
 
@@ -1190,34 +1057,7 @@ Public Class frmAcciones
 
     Sub RefrescarValorControlesInicial()
 
-
-
-
-
-
-
         Me.txtRetornoAnualBrutoCompra.Text = oAccionesCE.RetornoBruto * 100
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
         Dim IOF = oAccionesCE.IOF
         Dim Renta = oAccionesCE.Renta
 
@@ -1287,8 +1127,6 @@ Public Class frmAcciones
 
 
 
-        '   ImpuestosCalculoCompra = CalcularComisionImpuestos(CDec(CalcularImpuesto()), CDec(txtValorTransadoCompra.Text))
-
 
         Dim ValorIOFCompra = 0.0, ValorRentaCompra = 0.0
 
@@ -1327,8 +1165,6 @@ Public Class frmAcciones
 
 
 
-        '  ImpuestosCalculoVenta = CalcularComisionImpuestos(CDec(CalcularImpuesto()), CDec(txtValorTransadoVenta.Text))
-
         Dim ValorIOFVenta = 0.0, ValorRentaVenta = 0.0
 
 
@@ -1554,7 +1390,6 @@ Public Class frmAcciones
             Me.txtComisionBolsaCompra.Text = CalcularComisionImpuestos(ComisionBolsaCompra, txtValorTransadoCompra.Text)
 
 
-            '   ImpuestosCalculoCompra = CalcularComisionImpuestos(CDec(CalcularImpuesto()), CDec(txtValorTransadoCompra.Text))
             If (String.IsNullOrEmpty(oAccionesCE.SumaImpuestosYComisionesCompra.ToString(Configuraciones.CodigoTXTMontos))) Then
 
 
@@ -1713,19 +1548,6 @@ Public Class frmAcciones
                     End If
 
                 End If
-
-
-
-
-
-
-
-
-
-
-
-
-
             End If
             If (String.IsNullOrEmpty(oAccionesCE.CantidadVenta.ToString)) Then
 
@@ -1773,7 +1595,6 @@ Public Class frmAcciones
 
             Me.txtComisionBolsaVenta.Text = CalcularComisionImpuestos(ComisionBolsaVenta, ValorTransadoVenta)
 
-            '  ImpuestosCalculoVenta = CalcularComisionImpuestos(CDec(CalcularImpuesto()), CDec(txtValorTransadoVenta.Text))
             txtGananciaCapitalTotalVenta.Text += SumaComisiones()
             Dim ValorIOFVenta = 0.0, ValorRentaVenta = 0.0
 
@@ -1892,68 +1713,7 @@ Public Class frmAcciones
         Return Comision * ValorTransado
     End Function
 
-    Private Sub PrepararTablaImpuestosYComisiones()
-        Dim oDataGridViewTextBoxColumn As DataGridViewTextBoxColumn
-        Dim oDataGridViewComboBoxColumn As DataGridViewComboBoxColumn
-
-        oDataGridViewComboBoxColumn = New DataGridViewComboBoxColumn
-        oDataGridViewComboBoxColumn.Name = "CodImp"
-        oDataGridViewComboBoxColumn.HeaderText = "Tipo Impuesto"
-        oDataGridViewComboBoxColumn.DataSource = oDAOGeneral.ListaTiposImpuesto
-        oDataGridViewComboBoxColumn.ValueMember = "Codigo"
-        oDataGridViewComboBoxColumn.DisplayMember = "Descripcion"
-        oDataGridViewComboBoxColumn.DataPropertyName = "CodImp"
-        oDataGridViewComboBoxColumn.DisplayIndex = 0
-        '  Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewComboBoxColumn)
-
-        oDataGridViewComboBoxColumn = New DataGridViewComboBoxColumn
-        oDataGridViewComboBoxColumn.Name = "TipoOper"
-        oDataGridViewComboBoxColumn.HeaderText = "Tipo Operación"
-        oDataGridViewComboBoxColumn.DataSource = oDAOGeneral.ListaTipoOperacion
-        oDataGridViewComboBoxColumn.ValueMember = "Codigo"
-        oDataGridViewComboBoxColumn.DisplayMember = "Descripcion"
-        oDataGridViewComboBoxColumn.DataPropertyName = "TipoOper"
-        oDataGridViewComboBoxColumn.DisplayIndex = 1
-        '  Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewComboBoxColumn)
-
-        oDataGridViewTextBoxColumn = New DataGridViewTextBoxColumn
-        oDataGridViewTextBoxColumn.Name = "PorcImp"
-        oDataGridViewTextBoxColumn.HeaderText = "Porcentaje"
-        oDataGridViewTextBoxColumn.DataPropertyName = "PorcImp"
-        oDataGridViewTextBoxColumn.ValueType = GetType(Double)
-        oDataGridViewTextBoxColumn.DefaultCellStyle.Format = Configuraciones.CodigoTXTPorcentaje
-        oDataGridViewTextBoxColumn.DisplayIndex = 2
-        '  Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewTextBoxColumn)
-
-        oDataGridViewTextBoxColumn = New DataGridViewTextBoxColumn
-        oDataGridViewTextBoxColumn.Name = "MontoSujeto"
-        oDataGridViewTextBoxColumn.HeaderText = "Monto Sujeto"
-        oDataGridViewTextBoxColumn.DataPropertyName = "MontoSujeto"
-        oDataGridViewTextBoxColumn.ValueType = GetType(Double)
-        oDataGridViewTextBoxColumn.DefaultCellStyle.Format = Configuraciones.CodigoTXTMontos
-        oDataGridViewTextBoxColumn.ReadOnly = True
-        oDataGridViewTextBoxColumn.DisplayIndex = 3
-        '  Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewTextBoxColumn)
-
-        oDataGridViewTextBoxColumn = New DataGridViewTextBoxColumn
-        oDataGridViewTextBoxColumn.Name = "MontoImp"
-        oDataGridViewTextBoxColumn.HeaderText = "Monto Impuesto"
-        oDataGridViewTextBoxColumn.DataPropertyName = "MontoImp"
-        oDataGridViewTextBoxColumn.ValueType = GetType(Double)
-        oDataGridViewTextBoxColumn.DefaultCellStyle.Format = Configuraciones.CodigoTXTMontos
-        oDataGridViewTextBoxColumn.DisplayIndex = 4
-        oDataGridViewTextBoxColumn.ReadOnly = True
-        '    Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewTextBoxColumn)
-
-        oDataGridViewTextBoxColumn = New DataGridViewTextBoxColumn
-        oDataGridViewTextBoxColumn.Name = "CodInv"
-        oDataGridViewTextBoxColumn.DataPropertyName = "CodInv"
-        oDataGridViewTextBoxColumn.ValueType = GetType(Double)
-        oDataGridViewTextBoxColumn.Visible = False
-        '   Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewTextBoxColumn)
 
-        '   Me.dgvImpuestosYComisiones.DataSource = oAccionesCE.ImpuestosYComisiones
-    End Sub
     Private Sub PrepararTablaDividendos()
         Dim oDataGridViewTextBoxColumn As DataGridViewTextBoxColumn
         oDataGridViewTextBoxColumn = New DataGridViewTextBoxColumn
@@ -2079,28 +1839,8 @@ Public Class frmAcciones
 
     End Sub
 
-    Private Sub GuardarRegistro()
-
-    End Sub
-    Private Sub ActualizarRegistro()
-        Dim res As Integer
-        RefrescarClaseEntidad()
-        res = oAccionesDAO.Actualizar(oAccionesCE)
-
-        If res > 0 Then
-            MsgBox("Registro Guardado")
-        Else
-            MsgBox("Algo no salio bien.")
-        End If
 
-    End Sub
-    'Private Sub ActivarEdicion()
-    '    If TipoTransaccion = "C" Then
-    '        Me.TipoTransaccion = "A"
-    '        Me.btnAceptar.Text = "Guardar"
-    '    End If
 
-    'End Sub
     Private Function FechaDividendo()
         Dim Index = dgvDividendos.CurrentRow.Index
         Dim IndexAnterior = Index - 1
@@ -2270,113 +2010,39 @@ Public Class frmAcciones
 
     End Function
 
-    Function RangoDias(ByVal Fecha As Date, ByVal FechaVen As Date)
-        Dim Dias As Integer = DateDiff(DateInterval.Day, Fecha, FechaVen)
-        Return Dias
-    End Function
 
 
 
-    Function CantidadDiasUtimo(ByVal Fecha As Date)
-        Dim Año As Integer = Fecha.Year
-        Dim FechaCorte As Date = CDate("31/12/" + Año.ToString)
 
-        Dim Dias As Integer = DateDiff(DateInterval.Day, Fecha, FechaCorte)
 
-        Return Dias
-    End Function
 
 
 
-    Private Sub PrepararImpuestosYComisiones(ByVal IdFila As Integer)
-        '   Dim vFila As DataGridViewRow = dgvImpuestosYComisiones.Rows(IdFila)
-        '   If vFila.IsNewRow Then
-        '  vFila.Cells("TipoOper").Value = "V"
-        ' vFila.Cells("PorcImp").Value = 0
-        '  vFila.Cells("MontoSujeto").Value = oAccionesCE.ValorTransadoVenta
-        '     vFila.Cells("MontoImp").Value = 0.00
-        'End If
-
-    End Sub
-    '  Private Sub CalcularImpuestosYComisiones(ByVal IdFila As Integer, ByVal IdCol As Integer)
-    ' Dim vFila As DataGridViewRow = dgvImpuestosYComisiones.Rows(IdFila)
-    'Dim vTipoOperacion As String
-    'Dim vCodigoImpuesto As String
-    'Dim vPorcentajeImpuesto As Double
-    'Dim vMontoSujeto As Double
-    'Dim vMontoImpuesto As Double
-    '
-    'If Not vFila.IsNewRow Then
-    '       vCodigoImpuesto = vFila.Cells("CodImp").Value.ToString
-    '      vTipoOperacion = vFila.Cells("TipoOper").Value.ToString
-    'Double.TryParse(vFila.Cells("PorcImp").Value.ToString, vPorcentajeImpuesto)
-    'If IdCol = 3 Then
-    '           vPorcentajeImpuesto = vPorcentajeImpuesto / 100
-    '          vFila.Cells("PorcImp").Value = vPorcentajeImpuesto
-    'End If
-
-    'If vTipoOperacion = "C" Then
-    '           vMontoSujeto = oAccionesCE.ValorTransadoCompra
-    '          vFila.Cells("MontoSujeto").Value = oAccionesCE.ValorTransadoCompra
-    'ElseIf vTipoOperacion = "V" Then
-    '           vMontoSujeto = oAccionesCE.ValorTransadoVenta
-    '          vFila.Cells("MontoSujeto").Value = oAccionesCE.ValorTransadoVenta
-    'Else
-    '           vMontoSujeto = 0
-    'End If
-
-    '       vMontoImpuesto = vMontoSujeto * vPorcentajeImpuesto
-    '      vFila.Cells("MontoImp").Value = vMontoImpuesto
-
-    'End If
-
-    '   RefrescarClaseEntidad()
-    '  RefrescarValorControles()
-    'End Sub
+
 
 
     Private Sub dgvDividendos_CellBeginEdit(sender As Object, e As DataGridViewCellCancelEventArgs) Handles dgvDividendos.CellBeginEdit
-        'ActivarEdicion()
         PrepararCalculoDividendos(e.RowIndex)
     End Sub
     Private Sub dgvDividendos_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles dgvDividendos.CellEndEdit
-        '    If (Not dgvDividendos.Rows(0).IsNewRow) Then
-
-
-        '        If (DobleClick) Then
-        '            DobleClick = False
-        '            rdbEfectivo.Enabled = True
-        '            rdbPorcentaje.Enabled = True
-
-
-        '            TabControl1.TabPages.Insert(0, TabPage1)
-        '        End If
-        '    End If
-
         CalcularDividendos()
-
-
         RefrescarValorControles()
-
-
     End Sub
 
     Private Sub dgvDividendos_UserDeletedRow(sender As Object, e As DataGridViewRowEventArgs) Handles dgvDividendos.UserDeletedRow
-        'ActivarEdicion()
-        '   oAccionesCE.Dividendos.AcceptChanges()
+
     End Sub
 
     Private Sub dgvImpuestosYComisiones_CellBeginEdit(sender As Object, e As DataGridViewCellCancelEventArgs)
-        'ActivarEdicion()
-        PrepararImpuestosYComisiones(e.RowIndex)
+
     End Sub
 
     Private Sub dgvImpuestosYComisiones_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs)
-        ' CalcularImpuestosYComisiones(e.RowIndex, e.ColumnIndex)
+
     End Sub
 
     Private Sub dgvImpuestosYComisiones_UserDeletedRow(sender As Object, e As DataGridViewRowEventArgs)
-        'ActivarEdicion()
+
         oAccionesCE.ImpuestosYComisiones.AcceptChanges()
     End Sub
 
@@ -2473,13 +2139,9 @@ Public Class frmAcciones
 
     Private Sub Button1_Click(sender As Object, e As EventArgs)
         If (Estado = "N") Then
-            'RefrescarClaseEntidad()
             NuevaAccion()
         End If
-        If Estado = "M" Then
-            'ActualizarRegistro()
 
-        End If
     End Sub
 
     Private Sub navEliminar_Click(sender As Object, e As EventArgs) Handles navEliminar.Click
@@ -2583,164 +2245,19 @@ Public Class frmAcciones
     End Sub
 
     Private Sub btnAgregarImpuesto_Click(sender As Object, e As EventArgs)
-        '    GuardarImpuesto()
-    End Sub
-
-    'Private Sub PrepararTablaImpuestos()
-    '   Dim cboColumna As DataGridViewComboBoxColumn
-    '    cboColumna = New DataGridViewComboBoxColumn
-    '     cboColumna.Name = "Valor"
-    '      cboColumna.HeaderText = "CodImp"
-    '       cboColumna.DataSource = oDAOGeneral.ListaImpuesto
-    'cboColumna.ValueMember = "CodImp"
-    'cboColumna.DisplayMember = "Descripcion"
-    ' cboColumna.DataPropertyName = "CodImp"
-    '  cboColumna.DisplayIndex = 1
-    '   Me.dgvImpuestos.Columns.Add(cboColumna)
-
-    'End Sub
-    'Sub GuardarImpuesto()
-    'Dim Impuesto = dgvImpuestos.CurrentRow.Cells(0).Value
-    'Dim CodigoInv = Variables.Codigo
-    '  Dim ValorImpuesto = ReportoConsula.TraerImpuesto(Impuesto)
-    ' Dim Valor = oDAOGeneral.AgregarImpuesto(CodigoInv, "ACC0", Impuesto, 0)
-    '  ActualizarImpuestos(Valor)
-    '   RefrescarValorControles()
-    'End Sub
-
-    ' Sub ModificarImpu(ByVal Impuesto As String)
-
-    ' Dim CodigoInv = Variables.Codigo
-    '  Dim ValorImpuesto = ReportoConsula.TraerImpuesto(Impuesto)
-    '  Dim Valor = oDAOGeneral.AgregarImpuesto(CodigoInv, "ACC0", Impuesto, 1)
-    '   ActualizarImpuestos(Valor)
-    '    RefrescarValorControles()
-    ' End Sub
-
-    ' Sub ActualizarImpuestos(ByVal Valor As Integer)
-    'If (Valor = 1) Then
-    '       dgvImpuestoAgregado.Rows.Clear()
-    '      CargarImpuestos()
-    'End If
-
-    'End Sub
-
-    Private Sub dgvImpuestoAgregado_CellContentClick(sender As Object, e As DataGridViewCellEventArgs)
 
     End Sub
 
-    'Sub CargarImpuestos()
-
-    'Try
-
-
-    'Dim codigo As String = Variables.Codigo
-    'Dim ListaImpuestos As String()
-    'Dim ClaveImpuesto
-
-    'Dim dr = oDAOGeneral.CargarImpuesto(codigo, "ACC0")
-    'While dr.Read
-    'If (Not String.IsNullOrEmpty(dr("Impuestos").ToString)) Then
-    '               ClaveImpuesto = dr("Impuestos")
-    '              ListaImpuestos = ClaveImpuesto.split("-")
-    'Else
-    '               ClaveImpuesto = String.Empty
-    'End If
-
-    'End While
-    'For Each i As String In ListaImpuestos
-    '           dgvImpuestoAgregado.Rows.Add(i)
-
-    'Next
-    'Catch ex As Exception
-
-    'End Try
-    'End Sub
-
-
-    ' Sub ModificarImpuestos()
-    'Dim Index As Integer = dgvImpuestoAgregado.CurrentRow.Index
-    'Dim Cantidad As Integer = dgvImpuestoAgregado.Rows.Count - 1
-    'Dim Cadena As String = String.Empty
-    'Dim IsNothing As Boolean = False
-
-
-    '   Cadena = dgvImpuestoAgregado.CurrentRow.Cells(0).Value
-    'If (String.IsNullOrEmpty(Cadena)) Then
-    '       MsgBox("No se puede quitar una cadena vacía")
-    'Else
-    '       ModificarImpu(Cadena)
-    'End If
-
-
-
-
-
-
-
-
-    'End Sub
-
-    Function ObtenerCodigosImpuestos()
 
 
-        Dim codigo As String = Variables.Codigo
-        Dim ListaImpuestos As String()
-        Dim ClaveImpuesto
-        Dim coleccion As New Collection
-        Dim dr = oDAOGeneral.CargarImpuesto(codigo, "ACC0")
-        While dr.Read
-            If (Not String.IsNullOrEmpty(dr("Impuestos").ToString)) Then
-                ClaveImpuesto = dr("Impuestos")
-                ListaImpuestos = ClaveImpuesto.split("-")
-            Else
-                ClaveImpuesto = String.Empty
-            End If
-
-        End While
-        For Each i As String In ListaImpuestos
-            coleccion.Add(i)
-        Next
-
-
-
-        Return coleccion
-    End Function
-    ' Sub AgregarCamposImpuestos()
-    '    Dim CodImp, code As New DataGridViewTextBoxColumn
-    '    CodImp.Name = "CodImp"
-    'dgvImpuestoAgregado.Columns.Add(CodImp)
-
-    '  End Sub
-
-    '********** FIN FUNCIONES **********
-
-    ' Function CalcularImpuesto()
-    'Dim Cargar As New Collection
-    'Dim CantidadFilas = dgvImpuestoAgregado.Rows.Count - 1
-    'Dim Val As String
-    'For i As Integer = 0 To CantidadFilas
-    '       Val = dgvImpuestoAgregado.Rows(i).Cells(0).Value
-    '      Cargar.Add(Val)
-    'Next
-    'Dim Cantidad As Double = 0
-    'Dim Impuestos As Dictionary(Of String, String) = oDAOGeneral.ObtenerImpuesto()
-    'For Each i In Cargar
-
+    Private Sub dgvImpuestoAgregado_CellContentClick(sender As Object, e As DataGridViewCellEventArgs)
 
-    'For Each valor In Impuestos
-    'If (valor.Key.ToString = i) Then
-    '               Cantidad = Cantidad + valor.Value
+    End Sub
 
-    'End If
-    'Next
 
-    'Next
-    'Return Cantidad
-    'End Function
 
     Private Sub btnQuitar_Click(sender As Object, e As EventArgs)
-        '   ModificarImpuestos()
+
     End Sub
 
     Private Sub dgvImpuestoAgregado_CellClick(sender As Object, e As DataGridViewCellEventArgs)
@@ -2961,17 +2478,6 @@ Public Class frmAcciones
     End Sub
 
     Private Sub dgvDividendos_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvDividendos.CellDoubleClick
-        'If (dgvDividendos.Rows.Count = 1) Then
-
-
-
-        '    If (dgvDividendos.Rows(0).IsNewRow) Then
-        '        DobleClick = True
-        '        rdbEfectivo.Enabled = False
-        '        rdbPorcentaje.Enabled = False
-        '        TabPage1.Parent = Nothing
-        '    End If
-        'End If
 
 
 

+ 0 - 4
FRM/frmBuscarReporteVenta.vb

@@ -10,11 +10,7 @@
         ' Agregue cualquier inicialización después de la llamada a InitializeComponent().
 
     End Sub
-    Sub New(Codigo As String)
 
-        Me.New
-        Me.Codigo = Codigo
-    End Sub
 
 
 

+ 0 - 1
FRM/frmCertificadosDeInversion.Designer.vb

@@ -1395,7 +1395,6 @@ Partial Class frmCertificadosDeInversion
         Me.Controls.Add(Me.pnlPie)
         Me.Controls.Add(Me.Label30)
         Me.Name = "frmCertificadosDeInversion"
-        Me.Text = "Certificados de Inversión"
         CType(Me.dgvIngresos, System.ComponentModel.ISupportInitialize).EndInit()
         Me.TabCampos.ResumeLayout(False)
         Me.TabPage1.ResumeLayout(False)

+ 18 - 17
FRM/frmCertificadosDeInversion.resx

@@ -139,28 +139,29 @@
   <data name="navNuevo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHbSURBVDhPnZE7TNtQFIbdDmVtYWFlha1zJ0CdgA5MwQmP
-        EGRiEEuY660IIYQqdSpLixoeASocIdGuSDyiIMzDhChJmwcoYIOTOE38UFAOvldJIBGuIn7p09Gxz/2u
-        fS+BkubmXif4+cY496UtfrbaxvOeV/hFPQmFPjdkTqbepIMzLVH/h0IuwPTTzgkfNUKJDjslDtdgN6AG
-        x5JWi30bCxK7s41yYLpL2+8E3d8DOtcHqiKBqv0zJZeXAUmw4NL3qSnjf6+sM+1F/XjsrbbXAdohCeFU
-        0RQkIUlKLAm+N2V5plU/6AVt5x2ovm4QBEHnIkn44V6GDdZbYXXtJxxHb6oF6MAE3tM8MuS40wwJu8Ve
-        oIGoVICIqEDYICKqFaKpQrWgnH7bsCKmZWC9m3ggeCHB1/lvsLDgrrC45IFQUjYXSNk8/lQ0ELvJAf/3
-        Ck7+VBO7VeoTBJI54CJXcGiAapnzaxOBrUZwlpDAvbhSOUAE6s8vMyYCa7UgfFuAoKA8YOwcvFbx87oE
-        R09cI+pPYzXXWI6VHEo9FiTkIiZeqo95UmCxjObThmDr12888D8UNQsDA+N8aSlBAMAL4xdYl+sjOEdd
-        QDsncTWDpmndRjq8DMO8LCmeG4K4B0elbBFu/9keAAAAAElFTkSuQmCC
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHbSURBVDhPnZFNTNpgGMe7Hbar08uuu86b553mspPTgydW
+        PhQxlbp4YWd727Isy2LiSS/ODFQ0xhIT59VEN4Kx6ioSwPGhQVotUAb9CAuPfd8AE0IN8Z/88uRpn/f3
+        tu9LoOS5r11pfr47xc32pk5We3ne/wi/6CTR6MzjwvHHJ/nI52eJ0FClFGbstHsqSI1TostJiWMtOA2o
+        kcmM1eLcwYL03pduOfxpQPv1CvTQIOjcW1AVCVTtrymlsgxIggUXwQ89hdBrZY15WdWPJvu0n/2gHZAQ
+        y1VNQRKSpMSa4FtPkWee6/vDoO2+ADX4BgRB0Ll4Br57l2GDDTRYXVuHo8RVswAdmMD7n46Puv5phoTd
+        Ys/RQEKqQFxUIGYQF9UGiVylWVCP3TamiHkZ2MAmHoicSzA3vwCLi94GviU/RDOyuUAqlvGnooHkVQn4
+        P5dwfNZM8lrpTBDOlICLX8KBAap1TrMmAluL4CQtgde30jhABOpPLwomAmuzIHZdgYig/MfYOZJV8fOO
+        BIdtrhH1v5Mt11iPlRzN3Rak5SomVau3aSuwWCbKeUOw9WMbD9yFohbB4XjH15YSBAA8MH6B9XimwT3h
+        Adr9HlczaJrWbaQrwDDMw5riviGIG0RhbBComwuwAAAAAElFTkSuQmCC
 </value>
   </data>
   <data name="navEliminar.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGxSURBVDhPlZM7S8NQGIbTpv0BLuLgFRxEcKp0k2q9bP4A
-        xUUUcXJwaNHFTVBx0BA6ObnooEOkWKEQdREEFwc3byApvdlb0nv7er7Q1GpbWz94SDic98n3nUO4SnUz
-        bAx7C/oZZkZd2dLpdFyW5VKxWEQjstksBEE4YHsbSuwUVlUVmqZVSSQSiMViCAaDuiQQCEAUxTqJiWGn
-        DZlMBrlcTn8SqVQK8XgcoVBIF7AuQR/xeDyGRK+qgMIGJKBAMplEOBz+MQ5BmUr2W1AoFKob6J3mNkaJ
-        RCJ6J4qiNBf8plZCndB5RKPR9gWEIaFx6ExIROttC4h8Pq+fC0kIWvuXgLp4OzvE3eIw/JNW3Mz3QbCb
-        xD8FFDJ4Pxfw6BpDxruP8pMP2sk6ZMdI6WrcstZSQO3fLgwizcI4nAXcHcD2AMK74/BO8C9NBbUSarv8
-        cI7aim11YctpKVcFkiSVG0mI67leqEdLAAtlXRw+Ge+rPHzT/AcJqEbZ9WjNfqbX0z3crwxBcQ8gtGHF
-        87IJfoeldDll3qzkuR7GKIOupiFHM52i5OQVavvCwQePx/gdjuO4LzjPg67qZHpoAAAAAElFTkSuQmCC
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGySURBVDhPlZM7S8NQGIbTpv4AF3HwCg4iOLV0K631svkD
+        FBdRxMnBoaKLm6DioCF06uSig4UqRQUh6iIILg5uXgqS0pu9pk2vr+cLTa221frBQ8LhvE++7xzCVauH
+        YWZY/2CAYWQ0lDmbzSYkSSqXSiU0Q1VVCIKwz/Y2lVgpnMlkoChKjWQyiXg8jlAopEmCwSBEUWyQGBhW
+        2pDL5ZDP57UnkU6nkUgkEA6HNQHrEvQRt9utS7SqCSisQwIKpFIpRCKRb+MQlKlmvwTFYrG2gd5pbn2U
+        aDSqdSLLcmvBT+ol1AmdRywWa19A6BIah86ERLTetoAoFArauZCEoLV/CaiLt5MD3M2P4Gq8Azez/RCs
+        BvFXAYV0Al4Bjy4bcv49VJ4uoBytQrKPli8dppU/BdT+7dwQsiyMg2lgrRPYGkRkxwH/GP/SUlAvobYr
+        D17UV3yzG5tOU6Um8Pl8lWYS4nqmDxnPAsBCqovDByOwzONikn8nAZWFXY/S6md6Pd7F/dIw5LVBhNc7
+        8LxowJXdVD6fMG5U81wvw8Kgq2mKZ6pLPHXyMrV9ZudDhzZ+m+M47hM2pIOrSi+qCgAAAABJRU5ErkJg
+        gg==
 </value>
   </data>
   <data name="btnIngresos.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

+ 30 - 413
FRM/frmCertificadosDeInversion.vb

@@ -15,8 +15,7 @@
     Dim IndexBaseV As Integer = 0
     Dim PeriodoC As Integer = 0
     Dim PeriodoV As Integer = 0
-    'Dim InstrumentoFinanciero As String = oDAOGeneral.ObtenerInstrumento(Variables.Codigo)
-    'Private _Modo As String
+
     Private _IdDocumento As Integer
     Private _TipoDocumento As String
     Private _CodigoInversion As String
@@ -151,14 +150,12 @@
         If Tabla = "TIT" Then
             If (Existe) Then
                 navNuevo.Enabled = False
-                'TbIngresos.rea = False
                 navModificar.Enabled = True
                 navEliminar.Enabled = True
                 btnIngresos.Enabled = True
 
             Else
                 navNuevo.Enabled = True
-                'TbIngresos.Enabled = False
                 navModificar.Enabled = False
                 navEliminar.Enabled = False
                 btnIngresos.Enabled = False
@@ -168,13 +165,11 @@
         Else
             If (Existe) Then
                 navNuevo.Enabled = False
-                'TbIngresos.Enabled = True
                 navModificar.Enabled = True
                 navEliminar.Enabled = True
                 btnIngresos.Enabled = True
             Else
                 navNuevo.Enabled = True
-                'TbIngresos.Enabled = False
                 navModificar.Enabled = False
                 navEliminar.Enabled = False
                 btnIngresos.Enabled = False
@@ -225,7 +220,6 @@
         AsignacionPeriodicidad()
         If (Not Ins = "TIT") Then
             btnIngresos.Visible = False
-            'TbIngresos.Enabled = False
         End If
         If (Ins = "TIT") Then
             btnIngresos.Visible = True
@@ -239,37 +233,16 @@
         End If
         Bono()
         Tipo = 1
-
         Call CargarPeriodos()
-        'PrepararTablaImpuestosYComisiones()
-
         PrepararTablaIngresos()
-
         If Me.TipoTransaccion Is Nothing Then
             Me.TipoTransaccion = "N"
-
         End If
-
-        If Me.TipoTransaccion = "C" Then
-            '     Call CargarRegistroBD()
-        End If
-
         CargarIngresos()
-        ' CargarComisiones()
-
         RefrescarValorControles()
-
         Cargar = False
-
-        'Calculos()
-        'Formato()
-        'ValidacionErrores()
         BotonQuitar()
-
-
-
         CamposTiempo()
-
         CargarTransladoNuevo()
         ConfiguracionCMVTA(VExisteInversion)
     End Sub
@@ -299,14 +272,7 @@
         End If
     End Sub
 
-    Function ExisteVenta()
-        Dim Ventas As Boolean = False
-        Dim General As New DAOGeneral
-        Dim Codigo As String = Variables.Codigo
-        Ventas = General.ExisteVenta(Codigo)
 
-        Return Ventas
-    End Function
 
     Sub CamposTiempo()
         If Not TypeOf cboPeriodosC.SelectedValue Is DataRowView Then
@@ -596,85 +562,55 @@
             oDAOPrincipal.
                 Eliminar(Codigo, Instrumento)
 
-            'EliminarIngreso()
+
             LimpiarElementos()
 
         End If
         ValidarExistencia()
     End Sub
-    Function RetornarObjeto()
-        Return oCEPrincipal
-    End Function
 
-    Public Sub CargarRegistro(vId As Integer, vTipo As String)
-        TipoTransaccion = "C"
-        IdDocumento = vId
-        TipoDocumento = vTipo
-    End Sub
+
+
     Public Sub CargarRegistro(ByVal CodInversion As String)
         TipoTransaccion = "C"
         CodigoInversion = CodInversion
     End Sub
-    Private Sub CargarRegistroBD()
-        oCEPrincipal = Nothing
-        '  oCEPrincipal = oDAOPrincipal.CargarRegistro(Me.CodigoInversion)
 
-        TipoTransaccion = "C"
-        RefrescarValorControles()
-
-    End Sub
     Private Sub dtpUltimaFechaCuponCompra_ValueChanged(sender As Object, e As EventArgs) Handles dtpUltimaFechaCuponCompra.ValueChanged
-        'ActivarEdicion()
-        ' ControlUltimaFechaCuponCompra()
         Formato()
         Calculos()
         ValidacionErrores()
     End Sub
     Private Sub dtpSiguienteFechaCuponCompra_ValueChanged(sender As Object, e As EventArgs) Handles dtpSiguienteFechaCuponCompra.ValueChanged
-        'ActivarEdicion()
-        ' ControlSiguienteFechaCuponCompra()
         Formato()
         Calculos()
         ValidacionErrores()
     End Sub
     Private Sub dtpFechaLiquidacionCompra_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaLiquidacionCompra.ValueChanged
-        'ActivarEdicion()
-        '  ControlFechaLiquidacionCompra()
         Formato()
         Calculos()
         ValidacionErrores()
     End Sub
     Private Sub dtpFechaVencimientoCompra_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaVencimientoCompra.ValueChanged
-        'ActivarEdicion()
-        '  ControlFechaVencimientoCompra()
         Formato()
         Calculos()
         ValidacionErrores()
     End Sub
     Private Sub txtPorcentajeCuponCompra_TextChanged(sender As Object, e As EventArgs) Handles txtPorcentajeCuponCompra.TextChanged
-        'ActivarEdicion()
-
         Calculos()
         ValidacionErrores()
 
     End Sub
 
     Private Sub txtPrecioCompra_TextChanged(sender As Object, e As EventArgs) Handles txtPrecioCompra.TextChanged
-        'ActivarEdicion()
-
         Calculos()
         ValidacionErrores()
     End Sub
     Private Sub txtPrecioAlVencimientoCompra_TextChanged(sender As Object, e As EventArgs) Handles txtPrecioAlVencimientoCompra.TextChanged
-        'ActivarEdicion()
-
         Calculos()
         ValidacionErrores()
     End Sub
     Private Sub txtCostoTransferenciaCompra_TextChanged(sender As Object, e As EventArgs) Handles txtCostoTransferenciaCompra.TextChanged
-        'RefrescarMontoAPagarCompra()
-        'ActivarEdicion()
-
         Calculos()
         ValidacionErrores()
     End Sub
@@ -683,23 +619,9 @@
         Formato()
         Calculos()
         ValidacionErrores()
-        'ActivarEdicion()
-        '  ControlFechaVencimientoVenta()
-
     End Sub
-    Private Sub ControlFechaVencimientoVenta()
-        Dim valor As Date
-        valor = dtpFechaVencimientoVenta.Value.Date
-        If Me.TipoTransaccion = "N" Or Me.TipoTransaccion = "A" Then
-            oCEPrincipal.FechaVencimientoVenta = valor
-
-
-        End If
 
-    End Sub
     Private Sub cboAnioBaseC_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboAnioBaseC.SelectedIndexChanged
-        'ActivarEdicion()
-        ' ControlAnioBaseCompra()
         Formato()
         Calculos()
         ValidacionErrores()
@@ -707,26 +629,12 @@
     End Sub
 
     Private Sub cboAnioBaseV_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboAnioBaseV.SelectedIndexChanged
-        'RefrescarInteresAcumuladoVenta()
-        'RefrescarDiasAlVencimientoVenta()
-        'RefrescarDiasAcumuladosVenta()
-        '    ControlAnioBaseVenta()
-        'ActivarEdicion()
         Formato()
         Calculos()
         ValidacionErrores()
         CamposTiempo()
     End Sub
-    Private Sub ControlAnioBaseVenta()
-        Dim valor As Integer
-        If Me.TipoTransaccion = "N" Or Me.TipoTransaccion = "A" Then
-            If cboAnioBaseV.SelectedIndex > -1 Then
-                oCEPrincipal.DiasBaseVenta = cboAnioBaseV.SelectedItem
-            Else
-                oCEPrincipal.DiasBaseVenta = 365
-            End If
-        End If
-    End Sub
+
     Sub CargarPeriodos()
         If cboPeriodosC.Items.Count = 0 Or cboPeriodosC.Items.Count = 1 Then
 
@@ -755,7 +663,6 @@
     End Sub
 
     Private Sub cboPeriodosV_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboPeriodosV.SelectedIndexChanged
-        'ActivarEdicion()
         Formato()
         Calculos()
         ValidacionErrores()
@@ -765,9 +672,6 @@
 
 
 
-    'Sub RefrescarTablaIngresos()
-    '    'Me.dgvIngresos.DataSource = CalcularCupones()
-    'End Sub
     Private Sub RefrescarValorControles()
 
 
@@ -871,14 +775,7 @@
                 txtPorcentajeCuponCompra.Text = (CDec(coleccion(23) * 100).ToString)
             End If
 
-            'txtDiasAlVencimientoCompra.Text = BonoCalculo.DiasVencimiento(dtpFechaLiquidacionCompra.Value, dtpFechaVencimientoCompra.Value, IndexBaseC).ToString
-            'txtDiasAcumuladosCompra.Text = Operaciones.DiasAcumulados(dtpUltimaFechaCuponCompra.Value, dtpFechaLiquidacionCompra.Value, IndexBaseC).ToString
 
-
-            'txtInteresAcumuladoCompra.Text = Operaciones.InteresAcumulado(txtValorNominalCompra.Text, txtPorcentajeCuponCompra.Text.TrimEnd("%") / 100, txtDiasAcumuladosCompra.Text, IndexBaseC).ToString
-            'txtPorcentajeInteresAcumuladoCompra.Text = Operaciones.InteresAcumuladoPor(txtInteresAcumuladoCompra.Text, txtValorNominalCompra.Text) * 100
-            'txtPrecioSucioCompra.Text = Operaciones.PrecioSucio(txtPrecioCompra.Text, txtPorcentajeInteresAcumuladoCompra.Text / 100).ToString
-            'txtValorTransadoCompra.Text = Operaciones.ValorTrasado(txtPrecioCompra.Text, txtValorNominalCompra.Text).ToString
             If (String.IsNullOrEmpty(txtComisionPorCompraCasa.Text)) Then
                 txtComisionPorCompraCasa.Text = 0
             End If
@@ -898,14 +795,6 @@
                 txtYTMAlVencimientoCompra.Text = 0
             End If
 
-            'txtYTMAlVencimientoComisionCompra.Text = Bonos.CalcularYTMComision(CDec(txtYTMAlVencimientoCompra.Text.TrimEnd("%") / 100), CDec(txtComisionPorCompraCasa.Text.ToString.Trim("%")), CDec(txtDiasAlVencimientoCompra.Text), CDec(txtComisionPorBolsaCompra.Text.ToString.Trim("%")), dtpFechaLiquidacionCompra.Value, dtpFechaVencimientoCompra.Value, IndexBaseC).ToString
-
-
-
-
-            'txtMontoAPagar.Text = Operaciones.MontoPagar(CDec(txtValorTransadoCompra.Text), CDec(txtComisionCompraBolsa.Text), CDec(txtComisionCompraCasa.Text), CDec(txtInteresAcumuladoCompra.Text), CDec(txtCostoTransferenciaCompra.Text)).ToString
-
-
 
 
             If (String.IsNullOrEmpty(coleccion(12).ToString)) Then
@@ -970,12 +859,6 @@
                 txtCuponesRecibidos.Text = coleccion(22).ToString
             End If
 
-            'txtDiasAlVencimientoVenta.Text = BonoCalculo.DiasVencimiento(dtpFechaLiquidacionVenta.Value, dtpFechaVencimientoVenta.Value, IndexBaseV).ToString
-            'txtDiasAcumuladosVenta.Text = Operaciones.DiasAcumulados(dtpUltimaFechaCuponVenta.Value, dtpFechaLiquidacionVenta.Value, IndexBaseV).ToString
-            'txtInteresAcumuladoVenta.Text = Operaciones.InteresAcumulado(txtValorNominalVenta.Text, txtPorcentajeCuponVenta.Text.TrimEnd("%") / 100, txtDiasAcumuladosVenta.Text, IndexBaseV).ToString
-            'txtPorcentajeInteresAcumuladoVenta.Text = Operaciones.InteresAcumuladoPor(txtInteresAcumuladoVenta.Text, txtValorNominalVenta.Text) * 100
-            'txtPrecioSucioVenta.Text = Operaciones.PrecioSucio(txtPrecioVenta.Text, txtPorcentajeInteresAcumuladoVenta.Text / 100).ToString
-            'txtValorTransadoVenta.Text = Operaciones.ValorTrasado(txtPrecioVenta.Text, txtValorNominalCompra.Text).ToString
 
             If (String.IsNullOrEmpty(txtComisionPorVentaCasa.Text)) Then
                 txtComisionPorVentaCasa.Text = 0
@@ -985,16 +868,9 @@
             End If
 
 
-            'txtComisionVentaCasa.Text = Operaciones.Comisiones(CDec(txtComisionPorVentaCasa.Text.TrimEnd("%") / 100), CDec(txtValorTransadoVenta.Text)).ToString
-            'txtComisionVentaBolsa.Text = Operaciones.Comisiones(CDec(txtComisionPorBolsaVenta.Text.TrimEnd("%") / 100), CDec(txtValorTransadoVenta.Text)).ToString
             If String.IsNullOrEmpty(txtYTMAlVencimientoVenta.Text.ToString) Then
                 txtYTMAlVencimientoVenta.Text = 0
             End If
-            'txtYTMAlVencimientoComisionVenta.Text = Bonos.CalcularYTMComision(CDec(txtYTMAlVencimientoCompra.Text.TrimEnd("%") / 100), CDec(txtComisionPorCompraCasa.Text.ToString.Trim("%")), CDec(txtDiasAlVencimientoCompra.Text), CDec(txtComisionPorBolsaCompra.Text.ToString.Trim("%")), dtpFechaLiquidacionCompra.Value, dtpFechaVencimientoCompra.Value, IndexBaseC).ToString
-            'txtMontoARecibir.Text = Operaciones.MontoRecibir(txtValorTransadoVenta.Text, txtComisionVentaBolsa.Text, txtComisionVentaCasa.Text, txtInteresAcumuladoVenta.Text).ToString
-            'txtCuponesRecibidos.Text = Recibido().ToString
-
-
 
 
             If (String.IsNullOrEmpty(coleccion(25).ToString)) Then
@@ -1801,8 +1677,6 @@
             V_txtPorcentajeInteresAcumuladoCompra = BonoCalculo.InteresAcumuladoPor(V_txtInteresAcumuladoCompra, V_txtValorNominalCompra, PeriodoC, IndexBaseC) * 100
             V_txtPrecioSucioCompra = BonoCalculo.PrecioSucio(V_txtPrecioCompra, V_txtPorcentajeInteresAcumuladoCompra / 100)
             V_txtValorTransadoCompra = BonoCalculo.ValorTrasado(V_txtPrecioCompra, V_txtValorNominalCompra)
-            'V_txtComisionCompraCasa = BonoCalculo.Comisiones(CDec(V_txtComisionPorCompraCasa), CDec(V_txtValorTransadoCompra))
-            ' V_txtComisionCompraBolsa = BonoCalculo.Comisiones(CDec(V_txtComisionPorBolsaCompra), CDec(V_txtValorTransadoCompra))
             V_txtComisionCompraCasa = CalcularComision(V_txtComisionPorCompraCasa, V_txtValorTransadoCompra)
             V_txtComisionCompraBolsa = CalcularComision(V_txtComisionPorBolsaCompra, V_txtValorTransadoCompra)
             V_txtYTMAlVencimientoComisionCompra = Bonos.CalcularYTMComision(CDec(V_txtYTMAlVencimientoCompra), CDec(V_txtComisionPorCompraCasa), V_txtDiasAlVencimientoCompra, CDec(V_txtComisionPorBolsaCompra), V_dtpFechaLiquidacionCompra, V_dtpFechaVencimientoCompra, IndexBaseC)
@@ -1817,8 +1691,6 @@
             V_txtPorcentajeInteresAcumuladoVenta = BonoCalculo.InteresAcumuladoPor(V_txtInteresAcumuladoVenta, V_txtValorNominalVenta, PeriodoV, IndexBaseV) * 100
             V_txtPrecioSucioVenta = BonoCalculo.PrecioSucio(V_txtPrecioVenta, V_txtPorcentajeInteresAcumuladoVenta / 100)
             V_txtValorTransadoVenta = BonoCalculo.ValorTrasado(V_txtPrecioVenta, V_txtValorNominalVenta)
-            'V_txtComisionVentaCasa = BonoCalculo.Comisiones(CDec(V_txtComisionPorVentaCasa), CDec(V_txtValorTransadoVenta))
-            ' V_txtComisionVentaBolsa = BonoCalculo.Comisiones(CDec(V_txtComisionPorBolsaVenta), CDec(V_txtValorTransadoVenta))
 
             V_txtComisionVentaCasa = CalcularComision(V_txtComisionPorVentaCasa, V_txtValorTransadoVenta)
             V_txtComisionVentaBolsa = CalcularComision(V_txtComisionPorBolsaVenta, V_txtValorTransadoVenta)
@@ -1873,64 +1745,30 @@
 
 
     Private Sub RefrescarClaseEntidad()
-        ControlValorNominalCompra()
+
         ControlUltimaFechaCuponCompra()
         ControlSiguienteFechaCuponCompra()
         ControlFechaLiquidacionCompra()
         ControlFechaVencimientoCompra()
-        ControlPorcentajeCuponCompra()
-        'ControlYTMAlVencimientoCompra()
-        ControlPrecioAlVencimientoCompra()
-        ControlPrecioCompra()
+
+
+
         ControlAnioBaseCompra()
-        ControlCostosDeTransferencia()
 
-        'ControlValorNominalv
+
+
         ControlUltimaFechaCuponCompra()
         ControlSiguienteFechaCuponCompra()
         ControlFechaLiquidacionCompra()
         ControlFechaVencimientoCompra()
-        ControlPorcentajeCuponCompra()
-        'ControlYTMAlVencimientoCompra()
-        ControlPrecioAlVencimientoCompra()
-        ControlPrecioCompra()
-        ControlAnioBaseCompra()
-        ControlCostosDeTransferencia()
 
+        ControlAnioBaseCompra()
 
-    End Sub
-    Private Sub GuardarNuevoRegistro()
-        Dim res As Integer
-        RefrescarClaseEntidad()
 
-        res = oDAOPrincipal.Nuevo(oCEPrincipal)
-        If res = 1 Then
-            MsgBox("Registro Guardado")
-        Else
-            MsgBox("Algo no salio bien.")
-        End If
 
     End Sub
-    Private Sub ActualizarRegistro()
-        Dim res As Integer
-        RefrescarClaseEntidad()
 
-        ' res = oDAOPrincipal.Actualizar(oCEPrincipal)
 
-        If res = 1 Then
-            MsgBox("Registro Guardado")
-        Else
-            MsgBox("Algo no salio bien.")
-        End If
-
-    End Sub
-    'Private Sub ActivarEdicion()
-    '    If TipoTransaccion = "C" Then
-    '        Me.TipoTransaccion = "A"
-    '        Me.btnAceptar.Text = "Guardar"
-    '    End If
-
-    'End Sub
     Private Sub ControlPeriodosCompra()
         Dim valor As String
         If Me.TipoTransaccion = "N" Or Me.TipoTransaccion = "A" Then
@@ -1967,9 +1805,7 @@
         Return Fecha
     End Function
 
-    Private Sub ControlValorNominalCompra()
 
-    End Sub
     Private Sub ControlUltimaFechaCuponCompra()
         If Me.TipoTransaccion = "N" Or Me.TipoTransaccion = "A" Then
             Me.oCEPrincipal.UltimaFechaCuponCompra = dtpUltimaFechaCuponCompra.Value.Date
@@ -1994,9 +1830,7 @@
 
         End If
     End Sub
-    Private Sub ControlPorcentajeCuponCompra()
 
-    End Sub
     Private Sub ControlAnioBaseCompra()
         Dim valor As Integer
         If Me.TipoTransaccion = "N" Or Me.TipoTransaccion = "A" Then
@@ -2008,37 +1842,28 @@
     End Sub
 
     Private Sub txtValorNominalCompra_LostFocus(sender As Object, e As EventArgs) Handles txtValorNominalCompra.LostFocus
-        ' ControlValorNominalCompra()
-    End Sub
-
 
-    Private Sub ControlPrecioAlVencimientoCompra()
+    End Sub
 
 
-    End Sub
-    Private Sub ControlPrecioCompra()
 
-    End Sub
-    Private Sub ControlCostosDeTransferencia()
 
-    End Sub
     Private Sub txtPorcentajeCuponCompra_LostFocus(sender As Object, e As EventArgs) Handles txtPorcentajeCuponCompra.LostFocus
-        ControlPorcentajeCuponCompra()
+
     End Sub
     Private Sub txtPrecioAlVencimientoCompra_LostFocus(sender As Object, e As EventArgs) Handles txtPrecioAlVencimientoCompra.LostFocus
-        ControlPrecioAlVencimientoCompra()
+
     End Sub
 
     Private Sub txtPrecioCompra_LostFocus(sender As Object, e As EventArgs) Handles txtPrecioCompra.LostFocus
-        ControlPrecioCompra()
+
     End Sub
 
     Private Sub txtCostoTransferenciaCompra_LostFocus(sender As Object, e As EventArgs) Handles txtCostoTransferenciaCompra.LostFocus
-        ControlCostosDeTransferencia()
+
     End Sub
 
     Private Sub dtpSiguienteFechaCuponVenta_ValueChanged(sender As Object, e As EventArgs) Handles dtpSiguienteFechaCuponVenta.ValueChanged
-        'ActivarEdicion()
         Formato()
         Calculos()
         ValidacionErrores()
@@ -2046,84 +1871,12 @@
 
 
     Private Sub txtCostoTransferenciaVenta_TextChanged(sender As Object, e As EventArgs)
-        'ActivarEdicion()
-    End Sub
-
-    'Private Sub PrepararTablaImpuestosYComisiones()
-    '    Dim oDataGridViewTextBoxColumn As DataGridViewTextBoxColumn
-    '    Dim oDataGridViewComboBoxColumn As DataGridViewComboBoxColumn
-
-    '    oDataGridViewComboBoxColumn = New DataGridViewComboBoxColumn
-    '    oDataGridViewComboBoxColumn.Name = "CodImp"
-    '    oDataGridViewComboBoxColumn.HeaderText = "Tipo Impuesto"
-    '    oDataGridViewComboBoxColumn.DataSource = oDAOGeneral.ListaTiposImpuesto
-    '    oDataGridViewComboBoxColumn.ValueMember = "Codigo"
-    '    oDataGridViewComboBoxColumn.DisplayMember = "Descripcion"
-    '    oDataGridViewComboBoxColumn.DataPropertyName = "CodImp"
-    '    oDataGridViewComboBoxColumn.DisplayIndex = 0
-    '    Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewComboBoxColumn)
-
-    '    oDataGridViewComboBoxColumn = New DataGridViewComboBoxColumn
-    '    oDataGridViewComboBoxColumn.Name = "TipoOper"
-    '    oDataGridViewComboBoxColumn.HeaderText = "Tipo Operación"
-    '    oDataGridViewComboBoxColumn.DataSource = oDAOGeneral.ListaTipoOperacion
-    '    oDataGridViewComboBoxColumn.ValueMember = "Codigo"
-    '    oDataGridViewComboBoxColumn.DisplayMember = "Descripcion"
-    '    oDataGridViewComboBoxColumn.DataPropertyName = "TipoOper"
-    '    oDataGridViewComboBoxColumn.DisplayIndex = 1
-    '    Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewComboBoxColumn)
-
-    '    oDataGridViewTextBoxColumn = New DataGridViewTextBoxColumn
-    '    oDataGridViewTextBoxColumn.Name = "PorcImp"
-    '    oDataGridViewTextBoxColumn.HeaderText = "Porcentaje"
-    '    oDataGridViewTextBoxColumn.DataPropertyName = "PorcImp"
-    '    oDataGridViewTextBoxColumn.ValueType = GetType(Double)
-    '    oDataGridViewTextBoxColumn.DefaultCellStyle.Format = Configuraciones.CodigoTXTPorcentaje
-    '    oDataGridViewTextBoxColumn.DisplayIndex = 2
-    '    Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewTextBoxColumn)
-
-    '    oDataGridViewTextBoxColumn = New DataGridViewTextBoxColumn
-    '    oDataGridViewTextBoxColumn.Name = "MontoSujeto"
-    '    oDataGridViewTextBoxColumn.HeaderText = "Monto Sujeto"
-    '    oDataGridViewTextBoxColumn.DataPropertyName = "MontoSujeto"
-    '    oDataGridViewTextBoxColumn.ValueType = GetType(Double)
-    '    oDataGridViewTextBoxColumn.DefaultCellStyle.Format = Configuraciones.CodigoTXTMontos
-    '    oDataGridViewTextBoxColumn.ReadOnly = True
-    '    oDataGridViewTextBoxColumn.DisplayIndex = 3
-    '    Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewTextBoxColumn)
-
-    '    oDataGridViewTextBoxColumn = New DataGridViewTextBoxColumn
-    '    oDataGridViewTextBoxColumn.Name = "MontoImp"
-    '    oDataGridViewTextBoxColumn.HeaderText = "Monto Impuesto"
-    '    oDataGridViewTextBoxColumn.DataPropertyName = "MontoImp"
-    '    oDataGridViewTextBoxColumn.ValueType = GetType(Double)
-    '    oDataGridViewTextBoxColumn.DefaultCellStyle.Format = Configuraciones.CodigoTXTMontos
-    '    oDataGridViewTextBoxColumn.DisplayIndex = 4
-    '    oDataGridViewTextBoxColumn.ReadOnly = True
-    '    Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewTextBoxColumn)
-
-    '    oDataGridViewTextBoxColumn = New DataGridViewTextBoxColumn
-    '    oDataGridViewTextBoxColumn.Name = "CodInv"
-    '    oDataGridViewTextBoxColumn.DataPropertyName = "CodInv"
-    '    oDataGridViewTextBoxColumn.ValueType = GetType(Double)
-    '    oDataGridViewTextBoxColumn.Visible = False
-    '    Me.dgvImpuestosYComisiones.Columns.Add(oDataGridViewTextBoxColumn)
-
-    '    Me.dgvImpuestosYComisiones.DataSource = oCEPrincipal.ImpuestosYComisiones
-    'End Sub
-    'Private Sub PrepararImpuestosYComisiones(ByVal IdFila As Integer)
-    '    Dim vFila As DataGridViewRow = dgvImpuestosYComisiones.Rows(IdFila)
-    '    If vFila.IsNewRow Then
-    '        vFila.Cells("TipoOper").Value = "V"
-    '        vFila.Cells("PorcImp").Value = 0
-    '        vFila.Cells("MontoSujeto").Value = oCEPrincipal.ValorTransadoVenta
-    '        vFila.Cells("MontoImp").Value = 0.00
-    '    End If
-    'End Sub
+    End Sub
+
+
 
     Private Sub dgvImpuestosYComisiones_CellBeginEdit(sender As Object, e As DataGridViewCellCancelEventArgs)
-        'ActivarEdicion()
-        'PrepararImpuestosYComisiones(e.RowIndex)
+
     End Sub
 
     Private Sub dgvImpuestosYComisiones_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles dgvIngresos.CellContentClick
@@ -2131,7 +1884,7 @@
     End Sub
 
     Private Sub dgvImpuestosYComisiones_UserDeletedRow(sender As Object, e As DataGridViewRowEventArgs)
-        'ActivarEdicion()
+
         oCEPrincipal.ImpuestosYComisiones.AcceptChanges()
     End Sub
 
@@ -2224,33 +1977,25 @@
     End Sub
 
     Private Sub txtValorNominalVenta_LostFocus(sender As Object, e As EventArgs) Handles txtValorNominalVenta.LostFocus
-        ControlValorNominalVenta()
-    End Sub
-    Private Sub ControlValorNominalVenta()
 
     End Sub
 
+
     Private Sub txtPorcentajeCuponVenta_LostFocus(sender As Object, e As EventArgs) Handles txtPorcentajeCuponVenta.LostFocus
-        ControlPorcentajeCuponVenta()
-    End Sub
-    Private Sub ControlPorcentajeCuponVenta()
 
     End Sub
 
+
     Private Sub txtPrecioAlVencimientoVenta_LostFocus(sender As Object, e As EventArgs) Handles txtPrecioAlVencimientoVenta.LostFocus
-        ControlPrecioAlVencimientoVenta()
-    End Sub
-    Private Sub ControlPrecioAlVencimientoVenta()
 
     End Sub
 
+
     Private Sub txtPrecioVenta_LostFocus(sender As Object, e As EventArgs) Handles txtPrecioVenta.LostFocus
-        ControlPrecioVenta()
-    End Sub
-    Private Sub ControlPrecioVenta()
 
     End Sub
 
+
     Private Sub dgvIngresos_CellContentClick(sender As Object, e As DataGridViewCellEventArgs)
 
 
@@ -2262,8 +2007,6 @@
 
 
     Private Sub dgvIngresos_CellBeginEdit(sender As Object, e As DataGridViewCellCancelEventArgs) Handles dgvIngresos.CellBeginEdit
-        'ActivarEdicion()
-
     End Sub
 
     Private Sub dgvIngresos_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles dgvIngresos.CellEndEdit
@@ -2274,11 +2017,10 @@
             CalculoIngresosBONO()
         End If
 
-        'Calculos()
     End Sub
 
     Private Sub dgvIngresos_UserDeletedRow(sender As Object, e As DataGridViewRowEventArgs) Handles dgvIngresos.UserDeletedRow
-        'ActivarEdicion()
+
         oCEPrincipal.Ingresos.AcceptChanges()
     End Sub
 
@@ -2755,17 +2497,11 @@
 
     End Sub
 
-    Private Function CalcularIngreso(ByVal ValorNominal As Double, ByVal Cupon As Double, ByVal Dias As Integer)
-        Dim Base As Integer = 365
-        Dim Calculo = ValorNominal * Cupon * Dias / Base
-        Return Calculo
-    End Function
+
 
 
     Private Sub TabPage2_Click(sender As Object, e As EventArgs) Handles TbIngresos.Click
-        If (dgvIngresos.Rows.Count > 1) Then
 
-        End If
 
     End Sub
 
@@ -2782,14 +2518,13 @@
         TipoTransaccion = "N"
         btnAceptar.Text = "Nuevo"
 
-        'btnAccionComisiones.Text = "Nuevo"
+
     End Sub
 
     Private Sub navEliminar_Click(sender As Object, e As EventArgs) Handles navEliminar.Click
         TipoTransaccion = "B"
         btnAceptar.Text = "Eliminar"
 
-        'btnAccionComisiones.Text = "Eliminar"
     End Sub
 
     Private Sub txtYTMAlVencimientoCompra_TextChanged(sender As Object, e As EventArgs) Handles txtYTMAlVencimientoCompra.TextChanged
@@ -2844,13 +2579,7 @@
     End Sub
 
     Private Sub btnAccionIngreso_Click(sender As Object, e As EventArgs)
-        'If (TipoTransaccion = "N") Then
-        '    NuevoIngreso(False, 0)
-        'ElseIf (TipoTransaccion = "M") Then
-        '    ModificarIngreso()
-        'ElseIf (TipoTransaccion = "B") Then
-        '    EliminarIngreso()
-        'End If
+
     End Sub
 
     Private Sub TabControl1_TabIndexChanged(sender As Object, e As EventArgs) Handles TabCampos.TabIndexChanged
@@ -2907,22 +2636,7 @@
 
 
 
-    'Function ColecccionComisiones()
-    '    Dim coleccion As New Collection
-    '    Dim TipoImp, TipOp, CodImp, PorcImp, MontoImp As String
-    '    TipoImp = dgvImpuestosYComisiones.CurrentRow.Cells("NumCupon").Value
-    '    TipOp = dgvImpuestosYComisiones.CurrentRow.Cells(1).Value
-    '    CodImp = dgvImpuestosYComisiones.CurrentRow.Cells(2).Value
-    '    PorcImp = CDec(dgvImpuestosYComisiones.CurrentRow.Cells(3).Value.ToString.TrimEnd("%") / 100)
-    '    MontoImp = dgvImpuestosYComisiones.CurrentRow.Cells(4).Value.ToString.TrimEnd("%")
 
-    '    coleccion.Add(TipoImp)
-    '    coleccion.Add(TipOp)
-    '    coleccion.Add(CodImp)
-    '    coleccion.Add(PorcImp)
-    '    coleccion.Add(MontoImp)
-    '    Return coleccion
-    'End Function
 
 
     Function ColeccionIngresos(ByRef index As Integer)
@@ -2954,36 +2668,9 @@
 
 
 
-    'Sub NuevaComision()
-    '    Dim coleccion = ColecccionComisiones()
-    '    BonosConsulta.NuevoImpuesto(coleccion, Codigo)
-    'End Sub
-
-    Sub NuevoIngreso(ByVal AgregarModificar As Boolean, ByVal Cantidad As Integer)
-        Dim i As Integer = 0
-
-        Dim Index = dgvIngresos.Rows.Count - 2
-
-        i = Cantidad
-        While i <= Index
-
 
 
 
-            Dim coleccion = ColeccionIngresos(i)
-            If (BonosConsulta.NuevoIngreso(coleccion, Codigo, Instrumento) Is Nothing) Then
-
-                Exit Sub
-            End If
-            i += 1
-        End While
-        MsgBox("Registro de ingresos actualizados")
-
-    End Sub
-    'Sub ModificarComision()
-    '    Dim coleccion = ColecccionComisiones()
-    '    BonosConsulta.ModificarImpuesto(coleccion, Codigo)
-    'End Sub
 
 
     Function Instrumento()
@@ -3006,25 +2693,7 @@
         Return Tabla
     End Function
 
-    Function CanRegistros()
-        Dim Tabla As String = String.Empty
-        Dim Ins As String = Instrumento()
-        If (Ins = "TIT") Then
-            Tabla = "TIT0_0"
-        ElseIf (Ins = "EURB") Then
-            Tabla = "EURB1"
-        ElseIf (Ins = "BONO") Then
-            Tabla = "BON1"
 
-        ElseIf (Ins = "CINV") Then
-            Tabla = "CIN1"
-
-        End If
-        Dim Codigo = Variables.Codigo
-        Dim Cantidad As Integer = oDAOGeneral.CantidadRegistros(Codigo, Tabla)
-
-        Return Cantidad
-    End Function
 
     Function ModificarIngreso()
         Dim i As Integer = 0
@@ -3043,38 +2712,11 @@
         Return Diccionario
     End Function
 
-    Sub EliminarComision()
-        BonosConsulta.EliminarImpuesto(Codigo)
-    End Sub
-
-    Sub EliminarIngreso()
 
 
-        BonosConsulta.EliminarIngresoCompleto(Codigo, Instrumento)
-    End Sub
-
-    'Private Sub btnAccionComisiones_Click(sender As Object, e As EventArgs)
-    '    'If (TipoTransaccion = "N") Then
-    '    '    NuevaComision()
-    '    'ElseIf (TipoTransaccion = "M") Then
-    '    '    ModificarComision()
-    '    ElseIf (TipoTransaccion = "B") Then
-    '        EliminarComision()
-    '    End If
-    'End Sub
 
 
 
-    'Sub CargarComisiones()
-
-    '    Dim codigo As String = Variables.Codigo
-    '    Dim dr = BonosConsulta.CargarImpuestos(codigo)
-    '    While dr.Read
-    '        dgvImpuestosYComisiones.Rows.Add(dr("TipoImp"), dr("TipoOp"), dr("CodImp"), dr("PorcImp"), dr("MontoImp"))
-    '    End While
-
-
-    'End Sub
 
     Sub CargarIngresos()
 
@@ -3830,9 +3472,6 @@
 
 
 
-        'If (String.IsNullOrEmpty(dgvIngresos.Rows(Index).Cells("NumCupon").Value)) Then
-        '    dgvIngresos.Rows(Index).Cells("NumCupon").Value = Correlativo()
-        'End If
 
 
 
@@ -3918,28 +3557,6 @@
                 ValorSaldo = Amortizacion.Rows(j - 1).Cells("Saldos").Value
             End If
 
-
-
-            'Else
-            '    If FechaPeriodoGracia < FechaActualCupon Then
-
-            '        ValorSaldo = Amortizacion.Rows(j - 1).Cells("Saldos").Value
-            '    Else
-            '        ValorSaldo = Variables.MontoCompraTIT
-            '    End If
-            'End If
-
-
-
-
-
-
-
-
-
-
-
-
             PorcCupon = CDec(txtPorcentajeCuponCompra.Text.ToString.Trim("%")) / 100
 
             Dim Fecha1 As Date = Date.Now.Date

+ 1 - 1
FRM/frmColaTitulos.Designer.vb

@@ -91,7 +91,7 @@ Partial Class frmColaTitulos
         Me.lblTitulo.BackColor = System.Drawing.Color.WhiteSmoke
         Me.lblTitulo.Font = New System.Drawing.Font("Trebuchet MS", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
         Me.lblTitulo.ForeColor = System.Drawing.Color.Maroon
-        Me.lblTitulo.Location = New System.Drawing.Point(-6, 9)
+        Me.lblTitulo.Location = New System.Drawing.Point(-51, 9)
         Me.lblTitulo.Name = "lblTitulo"
         Me.lblTitulo.Size = New System.Drawing.Size(256, 24)
         Me.lblTitulo.TabIndex = 81

+ 17 - 18
FRM/frmDepositosAPlazo.resx

@@ -139,29 +139,28 @@
   <data name="navNuevo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHcSURBVDhPnZE7TNtQFIZdBrryWLqywsbMVCqmtgxMwQmP
-        EGRiqi7pXG9UgKoKiQkWQCSUgBCOKgHqVgnaKBUu1IQoSckDFLDBSRwSP5QqB9+rJJAIV1F/6dPRsc/9
-        rn0vgZLhPrUk+cW2BDfflTjZ6OJ5bzN+0UjC4bmn2eMPrZnQbEcs0F/MB5kh2vnWT41TosNOiWN12A2o
-        kcmU1WL/hgXJg49tcnD6pfbjBeiB16Bzg6AqEqjarSn5ggxIggUX/qn2bKBP+TrzvKQfTXZr33tBOyQh
-        ki6ZgiQkSYllwXJ7jmc69Z8DoO33gOp/BYIg6Fw0Bavuz7DN+qpsbG7BUey6VoAOTOC9z8ZHHX81Q8Lu
-        sOdoICYVISoqEDGIimqVWLpYK6hkyDamiBkZWN8XPBA6l2BhcQlWVtxVPGteCKdkc4GUK+BPRQPx6zzw
-        Z5dw/KeW+I3SmCCYygMXvYRDA1QrnF6ZCGx1gpOkBG7PevUAEag/vciaCKy1gshNEUKCco+xc+hKxc8b
-        Evx65BpR/zted42VWMnR9ENBUi5hEuX6kEcFFstEIWMIdnb38MC/UNQcDA+/4ctLCQIAnhi/wLpc78E5
-        4QLa+Q5XM2ia1m2kw8cwTFNZ8b8hiDuZPmwq6xyY/wAAAABJRU5ErkJggg==
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHdSURBVDhPnZFNTNpgGMe7HdzV6cXrruO2807OeJrusBMr
+        +IGYSjW7sPN6mzHLspjsNC+bGX7gsqzExI+jiU6CsQMrEsDxIUFbLVAG/QiGx75vAIVYQ/wnvzx52uf9
+        ve37Eih57nNnmp/rSnFfLKnDFQvPezvwi3YSjc4+KoSmH+cjH58kAq8qpTAzRLve+qlxSnQ6KHGsBYcB
+        NTKZtVkdW1iQ3vnUJYdnXmq7faAHBkHn3oCqSKBq/00plWVAEizI+D90FwL9yuZMb1UPTj7T/rwAbZ+E
+        WK5qCpKQJCXWBN+7izzzVN97Ddr2c1D9AyAIgs7Fs/DDswS/WV+DlZ+/IJg4bxagAxN4b8/4qPNSMyTs
+        GnuCBhJSBeKiAjGDuKg2SOQqzYJ6huxjipiXgfWt4oHIiQRf577B/LynwcKiF6JZ2VwgFcv4U9FA8rwE
+        /L9TCB03k7xQ2hOEsyXg4qewb4BqnaMzE4G9RXCYlsCzsNw4QATqjzIFE4GtWRC7qEBEUK4xdo6cqfh5
+        W4K/t1wj6g+SLddYj40czd0UpOUqJlWrN7lVYLVOlPOGYG19Aw/chaIWYXh4iq8tJQgAeGD8Aut2vwfX
+        hBto1ztczaBpWreTTh/DMA9rivuGIK4AkrdsKPO6lN4AAAAASUVORK5CYII=
 </value>
   </data>
   <data name="navEliminar.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGzSURBVDhPlZM7S8NQGIbTpv4AF3HwCg4iOFm6SbVeNn+A
-        4iKKODk4WHTRSVBxsCF0cnLRwQ5KsYLQ6iIILg5u3kBSerPX9N68ni80sdrU1g8eEg7nffJ95xCuWl2M
-        EYatCX0MM6OuRrLZbMLv91fK5TKMyOfzEAThkO01lNgonMlkIMuyTjKZRDweRygUUiXBYBCiKNZJTAwb
-        bcjlcigUCuqTSKfTSCQSCIfDqoB1CfqI2+3WJGrpAgprkIACqVQKkUjkxzgEZarZb0GpVNI30DvNrY0S
-        jUbVTiRJaiz4Ta2EOqHziMVirQsITULj0JmQiNZbFhDFYlE9F5IQtPYvAXXxdubC3cIQrifacDPXC8Fm
-        Ev8UUEjj3SPgcX0UOe8BlCcf5JM1+O3Dlasxy2pTAbV/Oz+ALAvDNQM424GdfkT2xuAd518aCmol1Lby
-        4EFtxbc6se2wKLogEAgoRhIiMNuDzNEiwEL5dQ6fjPcVHr4p/oMEVFZ2PTKTGP5Mr6f7uF8ehOTsR3ij
-        Dc9LJlzbLZXLSfNmNc91M6wMuhpDjqY7xHMHL1HbF3Y+dDzK73Icx30BWVyD3W9se9YAAAAASUVORK5C
-        YII=
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGxSURBVDhPlZM7S8NgFIZT0/4AF3HwCg4iOLVkK/W++QMU
+        F1HEycGhRRc3QcVBQ+jUyUUHHZRihULVRRBcHNy8FCSlSWt6S+/t63dCU6u2Xg48JHx875NzviRcrboY
+        dobwC32MNsa3smez2UQoFKqUy2U0I5/PQxTFPba3qUSgcCaTga7rdZLJJDRNQzQaNSSRSASSJH2TWBgC
+        bcjlcigUCsaVSKfTSCQSUBTFELAuQQ/xer2mxKi6gMImJKBAKpWCqqqfxiEoU8t+CEqlUn0D3dPc5iix
+        WMzoRJbl1oKvNEqoEzqPeDz+dwFhSmgcOhMS0fqfBUSxWDTOhSQErf1LQF28HO/jZn4IwXEbrmZ7IQoW
+        6UcBhUzCJyLu3U7k/LuoPgSgH64i5BquXIxYV34VUPvXcwPIsjD2pwFPO7DZD3V7BP5R/qmloFFCbVfv
+        TtBY2kYnNsas1bqAfcrVZhLicqYHGd8CwEJ5N4c3RniZR2CSfyUBlYO9Hr3Vz/R8tIPbpUHInn4oazY8
+        LloQdFkr5xNt67U8181wMOjVNMU31SGdjvEytX3m4qMHTn6L4zjuHVT+g9XSi1zlAAAAAElFTkSuQmCC
 </value>
   </data>
 </root>

+ 26 - 187
FRM/frmDepositosAPlazo.vb

@@ -8,7 +8,7 @@
     Dim codigo As String = Variables.Codigo
     Dim Operaciones As New Operaciones
     Dim DepositoCalcular As New DepositosAPlazoCE
-    'Dim oUtilidades As New Utilidades
+
 
     Private _TipoTransaccion As String
     Private _IdDocumento As Integer
@@ -67,7 +67,7 @@
 
 
     Private Sub frmDAP_Load(sender As Object, e As EventArgs) Handles MyBase.Load
-        'Me.txtBase.Text = AnioBase.ToString
+
         dgvIntereses.Columns.Clear()
         AgregarCampos()
         Call CargarPeriodos()
@@ -80,7 +80,7 @@
         Call CargarRegistroBD()
 
 
-            PreparardgvIntereses()
+
         CalcularPlazo()
         Calculo()
         vCargado = True
@@ -139,7 +139,7 @@
             navNuevo.Enabled = True
             navModificar.Enabled = False
             navEliminar.Enabled = False
-            'LimpiarCampos()
+
         End If
         Estado = String.Empty
         btnGME.Text = "Aceptar"
@@ -157,26 +157,13 @@
         Return Existe
     End Function
 
-    Sub LimpiarCampos()
-        txtMontoInversion.Text = "0"
-        txtPlazo.Text = 0
-        txtTasa.Text = 0
-        cboPeriodicidad.SelectedIndex = 0
-        txtRendimientoBruto.Text = "0.0%"
-        txtRendimientoNeto.Text = "0.0%"
-        dtpFechaOperacion.Value = Date.Now.Date
-        dtpFechaVencimiento.Value = Date.Now.Date
-    End Sub
+
 
     Private Sub txtPlazo_TextChanged(sender As Object, e As EventArgs)
-        'If Modo = "N" Then
-        '    RefrescarFechaVencimiento()
-        '    CalcularIntereses()
-        'End If
         Calculo()
     End Sub
     Private Sub txtPlazo_LostFocus(sender As Object, e As EventArgs)
-        '   ControlPlazo()
+
     End Sub
     Private Sub ControlPlazo()
         Dim valor As Integer
@@ -194,10 +181,7 @@
 
     End Sub
     Private Sub dtpFechaOperacion_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaOperacion.ValueChanged
-        'If Modo = "N" Then
-        '    RefrescarFechaVencimiento()
-        'End If
-        'ControlFechaOperacion()
+
         CalcularPlazo()
         Calculo()
     End Sub
@@ -212,17 +196,13 @@
     End Sub
 
     Private Sub txtIngresoBruto_TextChanged(sender As Object, e As EventArgs)
-        'If Modo = "N" Then
-        '    RefrescarRendimientoBruto()
-        'End If
+
     End Sub
 
 
 
     Private Sub txtTasa_TextChanged(sender As Object, e As EventArgs) Handles txtTasa.TextChanged
-        'If Modo = "N" Then
-        '    CalcularIntereses()
-        'End If
+
 
 
         Calculo()
@@ -233,7 +213,7 @@
         Calculo()
     End Sub
     Private Sub txtTasa_LostFocus(sender As Object, e As EventArgs) Handles txtTasa.LostFocus
-        ' ControlTasa()
+
     End Sub
     Private Sub ControlTasa()
         Dim valor As Double
@@ -253,14 +233,12 @@
 
     Private Sub txtMontoInversion_TextChanged(sender As Object, e As EventArgs) Handles txtMontoInversion.TextChanged
 
-        'If Modo = "N" Then
-        '    CalcularIntereses()
-        'End If
+
         CalcularPlazo()
         Calculo()
     End Sub
     Private Sub txtMontoInversion_LostFocus(sender As Object, e As EventArgs) Handles txtMontoInversion.LostFocus
-        '  ControlMontoInversion()
+
     End Sub
     Private Sub ControlMontoInversion()
         Dim valor As Double
@@ -280,9 +258,7 @@
 
 
     Private Sub txtIngresoNeto_TextChanged(sender As Object, e As EventArgs)
-        'If Modo = "N" Then
-        '    RefrescarRendimientoNeto()
-        'End If
+
     End Sub
     Sub CargarPeriodos()
         If cboPeriodicidad.Items.Count = 0 Or cboPeriodicidad.Items.Count = 1 Then
@@ -316,7 +292,6 @@
         oDAPCE = Nothing
         oDAPDAO = New DepositosAPlazoDAO
         CodigoInversion = Variables.Codigo
-        'oDAPDAO.CargarRegistro(oDAPCE, TipoDocumento, IdDocumento)
         oDAPCE = oDAPDAO.CargarRegistro(Me.CodigoInversion)
 
         TipoTransaccion = "C"
@@ -332,7 +307,7 @@
     End Sub
 
     Private Sub dtpFechaVencimiento_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaVencimiento.ValueChanged
-        'ControlFechaVencimiento()
+
         CalcularPlazo()
         Calculo()
     End Sub
@@ -347,7 +322,7 @@
     End Sub
 
     Private Sub cboPeriodicidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboPeriodicidad.SelectedIndexChanged
-        'ControlPreriodicidad()
+
         CalcularPlazo()
         Calculo()
     End Sub
@@ -377,13 +352,7 @@
             Me.dtpFechaOperacion.Value = oDAPCE.FechaOperacion
             Me.dtpFechaVencimiento.Value = oDAPCE.FechaVencimiento
             Me.txtTasa.Text = oDAPCE.Tasa.ToString(Configuraciones.CodigoTXTMontos)
-           
             txtPlazo.Text = oDAPCE.Plazo.ToString
-
-            'txtPlazo.Text = 10 'oDAPCE.Plazo.ToString
-
-
-
             'anio base
             Me.cboPeriodicidad.SelectedValue = oDAPCE.Periodicidad
             Me.txtRendimientoBruto.Text = oDAPCE.RendimientoBruto.ToString(Configuraciones.CodigoTXTMontos)
@@ -399,130 +368,13 @@
 
 
     End Sub
-    Private Sub PreparardgvIntereses()
-
-
-
-
-
-
-
-    End Sub
-    Private Sub PrepararCalculoIntereses(ByVal IdFila As Integer, idColumna As Integer)
-        Dim vFila As DataGridViewRow = dgvIntereses.Rows(IdFila)
-        Dim vFilaAnterior As DataGridViewRow
-        Dim vFecha As Date
-        Dim vFechaAnterior As Date
-        Dim vPeriodicidad As String = oDAPCE.Periodicidad
-        Dim vDiasDelPeriodo As Integer
 
-        If vFila.IsNewRow Then
-            If IdFila = 0 Then
-                vFecha = oDAPCE.FechaOperacion
-            Else
-                vFilaAnterior = dgvIntereses.Rows(IdFila - 1)
-                vFecha = vFilaAnterior.Cells("Fecha").Value
-
-            End If
-            'vFecha = vFechaAnterior
-
-            If vPeriodicidad = "M" Then
-                vDiasDelPeriodo = 30
-            ElseIf vPeriodicidad = "T" Then
-                vDiasDelPeriodo = 90
-            ElseIf vPeriodicidad = "S" Then
-                vDiasDelPeriodo = 180
-            Else
-                vDiasDelPeriodo = 30
-            End If
 
-            vFila.Cells("Plazo").Value = vDiasDelPeriodo
-            If Not IdFila = 0 Then
-                vFecha = vFecha.AddDays(vFila.Cells("Plazo").Value)
-            End If
-            vFila.Cells("Fecha").Value = vFecha
-            vFila.Cells("PorcImp").Value = 0.1
-            vFila.Cells("Estado").Value = "A"
-            dgvIntereses.Rows(IdFila).Selected = False
-            'dgvIntereses.Rows.Insert(IdFila + 1)
-
-            'MsgBox("IsNewRow")
-        Else
-            'MsgBox("No IsNewRow")
-        End If
-        'CalcularIntereses(IdFila)
-        'dgvIntereses.Refresh()
-    End Sub
 
     Private Sub dgvIntereses_CellBeginEdit(sender As Object, e As DataGridViewCellCancelEventArgs) Handles dgvIntereses.CellBeginEdit
-        'MsgBox("CellBeginEdit")
-        '        PrepararCalculoIntereses(e.RowIndex, e.ColumnIndex)
-
-    End Sub
-    Private Sub CalcularIntereses(ByVal IdFila As Integer, ByVal IdCol As Integer)
-        Dim vFila As DataGridViewRow = dgvIntereses.Rows(IdFila)
-        Dim vFilaAnterior As DataGridViewRow
-        Dim vPlazo As Integer = 0
-        Dim vFechaAnterior As Date
-        Dim vFecha As Date
-        Dim vIngresoBruto As Double = 0
-        Dim vMontoInversion As Double = oDAPCE.MontoDeInversion
-        Dim vTasa As Double = oDAPCE.Tasa
-        Dim vPorcentajeImpuesto As Double = 0
-        Dim vMontoImpuesto As Double = 0
-        Dim vIngresoNeto As Double = 0
-        If (Not String.IsNullOrEmpty(vTasa.ToString) And Not vTasa.ToString = "0") Then
-            vTasa = vTasa / 100
-        End If
-
-        If (Not String.IsNullOrEmpty(vPorcentajeImpuesto.ToString) And Not vPorcentajeImpuesto.ToString = "0") Then
-            vPorcentajeImpuesto = vPorcentajeImpuesto / 100
-        End If
-
-
-        If IdFila = 0 Then
-            vFechaAnterior = oDAPCE.FechaOperacion
-        Else
-            vFilaAnterior = dgvIntereses.Rows(IdFila - 1)
-            vFechaAnterior = vFilaAnterior.Cells("Fecha").Value
-
-        End If
-
-
-        'vFecha = vFila.Cells("Fecha").Value
-        vFecha = vFechaAnterior
-
-
-        'If vFila.IsNewRow Then
-        Integer.TryParse(vFila.Cells("Plazo").Value.ToString, vPlazo)
-        Double.TryParse(vFila.Cells("PorcImp").Value.ToString, vPorcentajeImpuesto)
-
-        vFecha = DateAdd(DateInterval.Day, vPlazo, vFecha)
-        vIngresoBruto = vMontoInversion * vTasa * vPlazo
-        If (Not String.IsNullOrEmpty(Utilidades.CalcularDiasDelAnio(vFecha).ToString) And Not Utilidades.CalcularDiasDelAnio(vFecha) = 0) Then
-            vIngresoBruto = vIngresoBruto / Utilidades.CalcularDiasDelAnio(vFecha)
-        Else
-            vIngresoBruto = "0.0"
-        End If
-
-        vFila.Cells("IngrBruto").Value = vIngresoBruto
-
-        vMontoImpuesto = vIngresoBruto * vPorcentajeImpuesto
-        vFila.Cells("MontoImp").Value = vMontoImpuesto
-
-        vIngresoNeto = vIngresoBruto - vMontoImpuesto
-        vFila.Cells("IngrNeto").Value = vIngresoNeto
-
-        'End If
-        If dgvIntereses.IsCurrentCellDirty Then
-            dgvIntereses.CommitEdit(DataGridViewDataErrorContexts.Commit)
-        End If
-
-
-        RefrescarClaseEntidad()
-        RefrescarValorControles()
     End Sub
 
+
     Private Sub RefrescarClaseEntidad()
         ControlMontoInversion()
         ControlFechaOperacion()
@@ -535,14 +387,7 @@
 
     Private Sub dgvIntereses_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles dgvIntereses.CellEndEdit
 
-        'If e.ColumnIndex = dgvIntereses.Columns("PorcImp").Index Then
-        '    Dim valor As Double
-        '    valor = dgvIntereses.Rows(e.RowIndex).Cells("PorcImp").Value
-        '    valor = valor / 100
 
-        '    dgvIntereses.Rows(e.RowIndex).Cells("PorcImp").Value = valor
-        'End If
-        'CalcularIntereses(e.RowIndex, e.ColumnIndex)
 
     End Sub
 
@@ -552,7 +397,7 @@
     Private Sub PrepararNuevo()
         oDAPCE = New DepositosAPlazoCE
         RefrescarValorControles()
-        'PreparardgvIntereses()
+
 
     End Sub
 
@@ -565,30 +410,21 @@
     End Sub
 
     Private Sub dgvIntereses_RowPostPaint(sender As Object, e As DataGridViewRowPostPaintEventArgs) Handles dgvIntereses.RowPostPaint
-        'MsgBox("RowPostPaint")
+
     End Sub
 
     Private Sub dgvIntereses_RowPrePaint(sender As Object, e As DataGridViewRowPrePaintEventArgs) Handles dgvIntereses.RowPrePaint
-        'MsgBox("RowPrePaint")
+
     End Sub
 
     Private Sub dgvIntereses_RowsAdded(sender As Object, e As DataGridViewRowsAddedEventArgs) Handles dgvIntereses.RowsAdded
-        'MsgBox("RowsAdded")
+
     End Sub
 
     Private Sub dgvIntereses_RowValidated(sender As Object, e As DataGridViewCellEventArgs) Handles dgvIntereses.RowValidated
 
     End Sub
-    Private Sub ActualizarRegistro()
-        Dim res As Integer
-        RefrescarClaseEntidad()
-        res = oDAPDAO.Actualizar(oDAPCE)
-        If res > 0 Then
-            MsgBox("Registro Guardado")
-        Else
-            MsgBox("Algo no salio bien.")
-        End If
-    End Sub
+
 
     Private Sub navModificar_Click(sender As Object, e As EventArgs) Handles navModificar.Click
 
@@ -748,7 +584,7 @@
 
 
     Private Sub Button1_Click(sender As Object, e As EventArgs)
-        'ColeccionElementos()
+
     End Sub
 
 
@@ -759,7 +595,6 @@
         For i As Integer = 0 To Index
 
             Dim colec As Collection = ColeccionElementos(i)
-            'oDAPDAO.NuevoElemento(colec, codigo)
             diccionario.Add(i, colec)
         Next
 
@@ -1063,4 +898,8 @@
             txtTasa.Text = Variables.RetRendimiento
         End If
     End Sub
+
+    Private Sub txtRendimientoNeto_TextChanged(sender As Object, e As EventArgs) Handles txtRendimientoNeto.TextChanged
+
+    End Sub
 End Class

+ 0 - 4
FRM/frmDetallesPortafolioGeneralRendimiento.vb

@@ -21,10 +21,6 @@
     Sub New(Tipo As String)
         Me.New
         Me.Tipo = Tipo
-        'Cargar(Tipo)
-
-
-
 
     End Sub
 

+ 6 - 121
FRM/frmFOIN.vb

@@ -32,7 +32,7 @@
             navNuevo.Enabled = True
             navModificar.Enabled = False
             navEliminar.Enabled = False
-            'LimpiarCampos()
+
         End If
 
 
@@ -141,79 +141,12 @@
 
 
 
-    Sub CalculoDGT()
-
-
-    End Sub
-
-    Function CalcularIngreso(ByVal Index As Integer, ByVal Dividendo As Double, ByVal CuotaParticipacion As Double)
-        Dim Total
-        If (Index = 0) Then
-
-            Total = ((Dividendo * CuotaParticipacion) / 30) * 11
-        Else
-            Total = Dividendo * CuotaParticipacion
-        End If
-
-        Return Total
-    End Function
-    Function CalcularRendimieno(ByVal Ingreso As Double, ByVal ValorNominal As Double, ByVal Base As Integer, ByVal Dias As Integer)
-        Dim Total = Ingreso / ValorNominal * Base / Dias
-
-        Return Total
-    End Function
-
-    Sub CargarDatos()
-        ''Declaracion de Variables'
-        'Dim Base As Integer = 0
-        'Dim DiaFijo As Integer = 0
-        'Dim Periodicidad As String = "M"
-        'Dim TipoCalculo As String = String.Empty
-
-
-        ''Seleccion de Tipo de Calculo'
-        'If RadioButton1.Checked Then
-        '    TipoCalculo = "FinMes"
-        'Else
-        '    If RadioButton2.Checked Then
-        '        TipoCalculo = "Mensual"
-        '    End If
-        'End If
-
-
-
-
-
-
-        'If (IndexBase = 0 Or IndexBase = 2) Then
-
-        '    Base = 360
 
 
-        '    If TipoCalculo = "FinMes" Then
-        '        DateTimePicker1.Value = Operaciones.FechaFinMes(DateTimePicker1.Value, Periodicidad, Base)
 
-        '    ElseIf TipoCalculo = "Mensual" Then
 
-        '        DateTimePicker1.Value = Operaciones.FechaMensual(DateTimePicker1.Value, Periodicidad, TipoCalculo, 0, DiaFijo, Base)
-        '    End If
 
 
-        'ElseIf IndexBase = 1 Or IndexBase = 3 Then
-        '    Base = 365
-
-        '    If TipoCalculo = "FinMes" Then
-        '        DateTimePicker1.Value = Operaciones.FechaFinMes(DateTimePicker1.Value, Periodicidad, Base)
-
-        '    ElseIf TipoCalculo = "Mensual" Then
-
-        '        DateTimePicker1.Value = Operaciones.FechaMensual(DateTimePicker1.Value, Periodicidad, TipoCalculo, 0, DiaFijo, Base)
-        '    End If
-
-
-        'End If
-
-    End Sub
 
     Function CalcularFecha(ByVal FechaInicial As Date, ByVal DiaFijo As Integer)
         'Declaracion de Variables'
@@ -719,20 +652,9 @@
 
     Sub RefrescarValorControles()
         Me.txtValorNominal.Text = oCEFOIN.ValorNominal.ToString()
-        'Me.txtCuotasDeParticipacion.Text = oCEFOIN.CuotasDeParticipacion.ToString(Configuraciones.CodigoTXTMontos)
-        'Me.txtValorDeParticipacion.Text = oCEFOIN.ValorDeParticipacion.ToString(Configuraciones.CodigoTXTMontos)
-        'Me.txtPorcentajeComisionCasa.Text = oCEFOIN.PorcentajeComisionCasa.ToString(Configuraciones.CodigoTXTPorcentaje)
         Me.txtComisionCasa.Text = oCEFOIN.ComisionCasa.ToString()
-        'Me.txtPorcentajeComisionBolsa.Text = oCEFOIN.PorcentajeComisionBolsa.ToString(Configuraciones.CodigoTXTPorcentaje)
         Me.txtComisionBolsa.Text = oCEFOIN.ComisionBolsa.ToString()
         Me.txtValorTransado.Text = oCEFOIN.ValorTransado.ToString()
-        'Me.dtpFechaOperacion.Value = oCEFOIN.FechaOperacion
-        'Me.dtpFechaLiquidacion.Value = oCEFOIN.FechaLiquidacion
-        'Me.dtpFechaVencimiento.Value = oCEFOIN.FechaVencimiento
-        'Me.txtRendimientoOfrecido.Text = oCEFOIN.RendimientoOfrecido.ToString(Configuraciones.CodigoTXTPorcentaje)
-        'Me.cboPeriodicidad.SelectedValue = oCEFOIN.Periodicidad
-        'Me.cboAnioBase.SelectedValue = oCEFOIN.AnioBase
-
     End Sub
 
     Private Sub txtPorcentajeComisionCasa_TextChanged(sender As Object, e As EventArgs) Handles txtPorcentajeComisionCasa.TextChanged
@@ -777,7 +699,7 @@
 
     Private Sub dtpFechaOperacion_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaOperacion.ValueChanged
         Calculos()
-        'oCEFOIN.FechaOperacion = dtpFechaOperacion.Value.Date
+
     End Sub
 
     Private Sub dtpFechaLiquidacion_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaLiquidacion.ValueChanged
@@ -789,13 +711,6 @@
     End Sub
 
     Private Sub txtRendimientoOfrecido_TextChanged(sender As Object, e As EventArgs) Handles txtRendimientoOfrecido.TextChanged
-        'Dim valor As Double
-        'If Not Double.TryParse(txtRendimientoOfrecido.Text.Replace("%", ""), valor) Then
-        'lblErrRendimientoOfrecido.Visible = True
-        'Else
-        'lblErrRendimientoOfrecido.Visible = False
-        'End If
-        'oCEFOIN.RendimientoOfrecido = valor / 100
 
         Calculos()
         If (txtRendimientoOfrecido.ToString.IndexOf("%") = -1) Then
@@ -804,7 +719,6 @@
     End Sub
 
     Private Sub txtRendimientoOfrecido_LostFocus(sender As Object, e As EventArgs) Handles txtRendimientoOfrecido.LostFocus
-        ' txtRendimientoOfrecido.Text = oCEFOIN.RendimientoOfrecido.ToString(Configuraciones.CodigoTXTPorcentaje)
     End Sub
 
     Private Sub cboPeriodicidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboPeriodicidad.SelectedIndexChanged
@@ -835,45 +749,18 @@
     End Sub
 
     Private Sub btnRefrescar_Click(sender As Object, e As EventArgs) Handles btnQuitar.Click
-        'Dim coleccion = ColeccionFINV1()
-        'GuardarData.GuardarDataGrid(coleccion, Variables.Codigo)
         QuitarFila()
     End Sub
 
 
 
 
-    Sub CargarDGVIngresos()
-        'Dim FondoInversion As New FondoInversionDAO
-        'Dim dr = FondoInversion.CargarData(Variables.Codigo)
-        'Dim fecha As String
-        'While dr.Read
-        '    fecha = Format(dr("FechaCorte"), "dd/MM/yyyy").ToString
-
-        '    dgvIngresos.Rows.Add(dr("correlativo"), fecha, dr("Dias"), dr("Dividendo"), dr("Ingreso"), dr("RendMensual"))
-        'End While
-
-    End Sub
-
-
-
-
-
-
     Private Sub txtDividendo_TextChanged(sender As Object, e As EventArgs)
-        'Dim valor As Double
-        'If Not Double.TryParse(Me.txtDividendo.Text.Replace("%", ""), valor) Then
-        'lblErrDividendo.Visible = True
-        'Else
-        'lblErrDividendo.Visible = False
-        'End If
-        'oCEFOIN.Dividendo = valor / 100
 
         Calculos()
     End Sub
 
     Private Sub txtDividendo_LostFocus(sender As Object, e As EventArgs)
-        'Me.txtDividendo.Text = oCEFOIN.Dividendo.ToString(Configuraciones.CodigoTXTPorcentaje)
     End Sub
 
     Private Sub txtCuotasDeParticipacion_KeyUp(sender As Object, e As KeyEventArgs) Handles txtCuotasDeParticipacion.KeyUp
@@ -1125,14 +1012,13 @@
     End Sub
 
     Private Sub dgvIngresos_CellMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgvIngresos.CellMouseClick
-        'Calculos()
+
         CalculosTabla()
     End Sub
 
     Private Sub dgvIngresos_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles dgvIngresos.CellEndEdit
 
-        CargarDatos()
-        CalculoDGT()
+
     End Sub
 
     Private Sub txtDiasLiq_TextChanged(sender As Object, e As EventArgs) Handles txtDiasLiq.TextChanged
@@ -1152,10 +1038,9 @@
 
     End Sub
 
-    Private Sub btnRescate_Click(sender As Object, e As EventArgs) 
+    Private Sub btnRescate_Click(sender As Object, e As EventArgs)
 
 
-        'frmRescate.Show()
     End Sub
 
     Private Sub txtCuotasDeParticipacion_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtCuotasDeParticipacion.KeyPress
@@ -1297,7 +1182,7 @@
     End Sub
 
     Private Sub Button1_Click_1(sender As Object, e As EventArgs)
-        CargarDatos()
+
     End Sub
 
     Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs)

+ 0 - 1
FRM/frmFlujoArbitraje.Designer.vb

@@ -49,7 +49,6 @@ Partial Class frmFlujoArbitraje
         Me.Controls.Add(Me.trvFlujo)
         Me.Controls.Add(Me.flpContenedorTemporal)
         Me.Name = "frmFlujoArbitraje"
-        Me.Text = "frmFlujoArbitraje"
         Me.ResumeLayout(False)
 
     End Sub

+ 0 - 35
FRM/frmFuturos.vb

@@ -82,14 +82,7 @@
     End Sub
 
 
-    Function ExisteVenta()
-        Dim Ventas As Boolean = False
-        Dim General As New DAOGeneral
-        Dim Codigo As String = Variables.Codigo
-        Ventas = General.ExisteVenta(Codigo)
 
-        Return Ventas
-    End Function
     Function ExisteInversion()
         Dim Codigo As String = Variables.Codigo
         Dim TablaINV As String = "INV0"
@@ -845,39 +838,11 @@
     End Sub
 
     Private Sub txtIdentificacionContratoCompra_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtIdentificacionContratoCompra.KeyPress
-        'If String.IsNullOrEmpty(txtIdentificacionContratoCompra.Text) Then
-        '    If e.KeyChar = "." Then
-        '        txtIdentificacionContratoCompra.Text = "0"
-        '        Exit Sub
-        '    End If
-        'End If
-
-        'If (Not txtIdentificacionContratoCompra.Text.ToString.IndexOf(".") = -1 And e.KeyChar = ".") Then
-        '    Operaciones.ValidarEntrada(sender, e, True)
-
-        'Else
 
-        '    Operaciones.ValidarEntrada(sender, e, False)
-
-        'End If
     End Sub
 
     Private Sub txtIdentificacionContratoVenta_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtIdentificacionContratoVenta.KeyPress
-        'If String.IsNullOrEmpty(txtIdentificacionContratoVenta.Text) Then
-        '    If e.KeyChar = "." Then
-        '        txtIdentificacionContratoVenta.Text = "0"
-        '        Exit Sub
-        '    End If
-        'End If
-
-        'If (Not txtIdentificacionContratoVenta.Text.ToString.IndexOf(".") = -1 And e.KeyChar = ".") Then
-        '    Operaciones.ValidarEntrada(sender, e, True)
-
-        'Else
-
-        '    Operaciones.ValidarEntrada(sender, e, False)
 
-        'End If
     End Sub
 
     Private Sub txtCantidadContratosCompra_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtCantidadContratosCompra.KeyPress

+ 19 - 257
FRM/frmLetes.vb

@@ -65,18 +65,7 @@ Public Class frmLetes
 
 
     'GETS
-    Function GetRendimientoBruto() As Double
-        Dim valor As Double
 
-        If Me.txtRendimientoBruto.Text.Length = 0 Then
-            valor = 0
-        Else
-            valor = Me.txtRendimientoBruto.Text
-            valor = valor
-        End If
-
-        Return valor
-    End Function
 
     Function GetFechaOperacion() As Date
         Dim valor As Date
@@ -94,13 +83,6 @@ Public Class frmLetes
         Return valor
     End Function
 
-    Function GetFechaVencimiento() As Date
-        Dim valor As Date
-
-        valor = dtpFechaVencimiento.Value
-
-        Return valor
-    End Function
 
 
     Function GetPlazoInversion() As Integer
@@ -145,31 +127,9 @@ Public Class frmLetes
         Return valor
     End Function
 
-    Function GetPorcentajeBolsa() As Double
-        Dim valor As Double
-
-        If Me.txtPorcentajeComisionBolsa.Text.Length = 0 Then
-            valor = 0
-        Else
-            valor = Me.txtPorcentajeComisionBolsa.Text
-            valor = valor / 100
-        End If
 
-        Return valor
-    End Function
 
-    Function GetPorcentajeCasa() As Double
-        Dim valor As Double
 
-        If Me.txtPorcentajeComisionCasa.Text.Length = 0 Then
-            valor = 0
-        Else
-            valor = Me.txtPorcentajeComisionCasa.Text
-            valor = valor / 100
-        End If
-
-        Return valor
-    End Function
 
     Function GetValorTransado() As Double
         Dim valor As Double
@@ -218,22 +178,7 @@ Public Class frmLetes
 
         Return valor
     End Function
-    Function GetRendimientoNeto() As Double
-        Dim valor As Double
 
-        If Me.txtRendimientoNeto.Text.Length = 0 Then
-            valor = 0
-        Else
-            Try
-                valor = Me.txtRendimientoNeto.Text
-                valor = valor / 100
-            Catch ex As Exception
-                valor = 0
-            End Try
-        End If
-
-        Return valor
-    End Function
     Function GetPeriodicidad() As String
         Dim valor As String
 
@@ -245,36 +190,8 @@ Public Class frmLetes
 
         Return valor
     End Function
-    Function GetIngresoBruto() As Double
-        Dim valor As Double
-
-        If Me.txtIngresoBruto.Text.Length = 0 Then
-            valor = 0
-        Else
-            Try
-                valor = Me.txtIngresoBruto.Text
-            Catch ex As Exception
-                valor = 0
-            End Try
-        End If
-
-        Return valor
-    End Function
-    Function GetIngresoNeto() As Double
-        Dim valor As Double
 
-        If Me.txtIngresoNeto.Text.Length = 0 Then
-            valor = 0
-        Else
-            Try
-                valor = Me.txtIngresoNeto.Text
-            Catch ex As Exception
-                valor = 0
-            End Try
-        End If
 
-        Return valor
-    End Function
     Function GetCasa() As String
         Dim valor As String
 
@@ -285,29 +202,9 @@ Public Class frmLetes
 
 
     'CALCULOS
-    Function CalcularPlazoInversion() As Integer
-        'Dim valor As Integer
-
-        'If AnioBase = 360 Then
-        '    valor = Utilidades.Days360(GetFechaLiquidacion, GetFechaVencimiento)
-        'Else
-        '    valor = DateDiff(DateInterval.Day, GetFechaLiquidacion, GetFechaVencimiento)
-        'End If
-        'Return valor
-    End Function
 
-    Function CalcularPrecio() As Double
-        'Dim valor As Double
-        'Try
-        '    valor = (1 - (GetRendimientoBruto() / (1 + GetRendimientoBruto() * GetPlazoInversion() / AnioBase)) * GetPlazoInversion() / AnioBase)
-        'Catch ex As Exception
-        '    valor = 0
-        'End Try
-
-        'valor = valor * 100
-        'valor = Math.Round(valor, DecimalesRedondeo)
-        'Return valor
-    End Function
+
+
 
     Function CalcularFechaLiquidacion() As Date
         Dim valor As Date
@@ -329,23 +226,9 @@ Public Class frmLetes
         Return valor
     End Function
 
-    Function CalcularComisionBolsa() As Double
-        'Dim valor As Double
 
-        'valor = (GetValorTransado() * GetPorcentajeBolsa()) * (GetPlazoInversion() / AnioBase)
-        'valor = Math.Round(valor, DecimalesRedondeo)
 
-        'Return valor
-    End Function
-
-    Function CalcularComisionCasa() As Double
-        'Dim valor As Double
 
-        'valor = (GetValorTransado() * GetPorcentajeCasa()) * (GetPlazoInversion() / AnioBase)
-        'valor = Math.Round(valor, DecimalesRedondeo)
-
-        'Return valor
-    End Function
 
     Function CalcularValorApagar() As Double
         Dim valor As Double
@@ -356,15 +239,7 @@ Public Class frmLetes
         Return valor
     End Function
 
-    Function CalcularRendimientoNeto() As Double
-        'Dim valor As Double
 
-        'valor = ((GetValorNominal() - GetTotalAPagar()) / GetTotalAPagar()) * (AnioBase / GetPlazoInversion())
-        'valor = valor * 100
-        'valor = Math.Round(valor, DecimalesRedondeo)
-
-        'Return valor
-    End Function
 
     Function CalcularIngresoBruto() As Double
         Dim valor As Double
@@ -388,48 +263,26 @@ Public Class frmLetes
 
     'AUTO
     Sub RefrescarPlazoInversion()
-        Me.txtPlazoInversion.Text = CalcularPlazoInversion()
+        Me.txtPlazoInversion.Text = 0
     End Sub
 
     Sub RefrescarPrecio()
-        Me.txtPrecio.Text = CalcularPrecio()
+        Me.txtPrecio.Text = 0
     End Sub
 
-    Sub RefrescarFechaLiquidacion()
-        Me.dtpFechaLiquidacion.Value = CalcularFechaLiquidacion()
-    End Sub
 
-    Sub RefrescarFechaVencimiento()
-        Me.dtpFechaVencimiento.Value = CalcularFechaVencimiento()
-    End Sub
 
-    Sub RefrescarValorTransado()
-        Me.txtValorTransado.Text = CalcularValorTransado()
-    End Sub
 
-    Sub RefrescarComisionBolsa()
-        Me.txtComisionBolsa.Text = CalcularComisionBolsa()
-    End Sub
 
-    Sub RefrescarComisionCasa()
-        Me.txtComisionCasa.Text = CalcularComisionCasa()
-    End Sub
+
 
     Sub RefrescarTotalAPagar()
         Me.txtTotalAPagar.Text = CalcularValorApagar()
     End Sub
 
-    Sub RefrescarRendimientoNeto()
-        Me.txtRendimientoNeto.Text = CalcularRendimientoNeto()
-    End Sub
 
-    Sub RefrescarIngresoBruto()
-        Me.txtIngresoBruto.Text = CalcularIngresoBruto()
-    End Sub
 
-    Sub RefrescarIngresoNeto()
-        Me.txtIngresoNeto.Text = CalcularIngresoNeto()
-    End Sub
+
 
 
 
@@ -450,37 +303,22 @@ Public Class frmLetes
 
     Private Sub txtPlazoInversion_TextChanged(sender As Object, e As EventArgs) Handles txtRendimientoBruto.TextChanged, txtPlazoInversion.TextChanged
 
-        'If Modo = "N" Then
-        '    RefrescarPlazoInversion()
-        '    RefrescarPrecio()
-        '    RefrescarComisionBolsa()
-        '    RefrescarComisionCasa()
-        '    RefrescarRendimientoNeto()
-        'End If
+
 
         RellenarDatos()
     End Sub
 
 
     Private Sub dtpFechaVencimiento_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaVencimiento.ValueChanged
-        '    If Modo = "N" Then
-        '        RefrescarPlazoInversion()
-        '    End If
+
 
     End Sub
 
     Private Sub dtpFechaLiquidacion_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaLiquidacion.ValueChanged
-        'If Modo = "N" Then
-        '    RefrescarFechaVencimiento()
-        '    RefrescarPlazoInversion()
-        'End If
         RellenarDatos()
     End Sub
 
     Private Sub dtpFechaOperacion_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaOperacion.ValueChanged
-        'If Modo = "N" Then
-        '    RefrescarFechaLiquidacion()
-        'End If
         RellenarDatos()
         AgregarDiasExtra()
     End Sub
@@ -490,33 +328,22 @@ Public Class frmLetes
     End Sub
 
     Private Sub txtPrecio_TextChanged(sender As Object, e As EventArgs) Handles txtPrecio.TextChanged
-        'If Modo = "N" Then
-        '    RefrescarValorTransado()
-        'End If
+
     End Sub
 
     Private Sub txtPorcentajeComisionCasa_TextChanged(sender As Object, e As EventArgs) Handles txtPorcentajeComisionCasa.TextChanged
         RellenarDatos()
-        'If Modo = "N" Then
-        '    RefrescarComisionCasa()
-        'End If
+
     End Sub
 
     Private Sub txtPorcentajeComisionBolsa_TextChanged(sender As Object, e As EventArgs) Handles txtPorcentajeComisionBolsa.TextChanged
         RellenarDatos()
-        'If Modo = "N" Then
-        '    RefrescarComisionBolsa()
-        'End If
+
 
     End Sub
 
     Private Sub txtValorTransado_TextChanged(sender As Object, e As EventArgs) Handles txtValorTransado.TextChanged
-        'If Modo = "N" Then
-        '    RefrescarComisionBolsa()
-        '    RefrescarComisionCasa()
-        '    RefrescarTotalAPagar()
-        '    RefrescarIngresoBruto()
-        'End If
+
     End Sub
 
     Private Sub txtComisionCasa_TextChanged(sender As Object, e As EventArgs) Handles txtComisionCasa.TextChanged
@@ -532,10 +359,7 @@ Public Class frmLetes
     End Sub
 
     Private Sub txtTotalAPagar_TextChanged(sender As Object, e As EventArgs) Handles txtTotalAPagar.TextChanged
-        'If Modo = "N" Then
-        '    RefrescarRendimientoNeto()
-        '    RefrescarIngresoNeto()
-        'End If
+
     End Sub
     Sub ValidarExistencia()
         Dim General As New DAOGeneral
@@ -562,7 +386,7 @@ Public Class frmLetes
             navNuevo.Enabled = True
             navModificar.Enabled = False
             navEliminar.Enabled = False
-            'LimpiarCampos()
+
         End If
         TipoTransaccion = String.Empty
         btnAceptar.Text = "Aceptar"
@@ -1029,7 +853,6 @@ Public Class frmLetes
         If CET Or PBUR Or VCN Then
             coleccion.Add(IntAcumulado)
         End If
-        'oDAOLetes.NuevoIngreso(coleccion, Instrumento)
         Return coleccion
     End Function
 
@@ -1110,28 +933,12 @@ Public Class frmLetes
             Me.cboBase.SelectedIndex = 0
         End If
     End Sub
-    Function ValidarControles() As Boolean
-        Dim valor As Boolean = True
-
-        Dim vValorNominal As Double = GetValorNominal()
-        Dim vPlazoInversion As Integer = GetPlazoInversion()
-        Dim vCasa As String = GetCasa()
-        Dim vPeriodicidad As String = GetPeriodicidad()
-
-        If vValorNominal = 0 Then valor = False
-        If vPlazoInversion = 0 Then valor = False
-        If vCasa = "" Then valor = False
-        If vPeriodicidad = "" Then valor = False
-
-        Return valor
-    End Function
 
     Private Sub CargarRegistroBD()
-        'oCELetes = New CELetes
-        'oDAOLetes.CargarRegistro(oCELetes, TipoDocumento, IdDocumento)
+
         Dim oCELetes As LETESCE
         CodigoInversion = Variables.Codigo
-        oCELetes = oDAOLetes.CargarRegistro(CodigoInversion)
+
         If Not oCELetes Is Nothing Then
 
 
@@ -1156,20 +963,6 @@ Public Class frmLetes
             vPrecio = vPrecio * 100
 
 
-            'Me.txtValorNominal.Text = vValorNominal.ToString
-            'Me.dtpFechaOperacion.Value = vFechaOperacion
-            'Me.dtpFechaLiquidacion.Value = vFechaLiquidacion
-            'Me.dtpFechaVencimiento.Value = vFechaVencimiento
-            'Me.txtPlazoInversion.Text = vPlazoInversion.ToString
-            'Me.cboCasasCorredoras.SelectedValue = vCodigoCasa
-            'Me.cboPeriodicidad.SelectedValue = vPeriodicidad
-            'Me.txtRendimientoBruto.Text = vRendimientoBruto.ToString
-            'Me.txtRendimientoNeto.Text = vRendimientoNeto.ToString
-            'Me.txtIngresoBruto.Text = vIngresoBruto.ToString
-            'Me.txtIngresoNeto.Text = vIngresoNeto.ToString
-            'Me.txtValorTransado.Text = vValorNominal.ToString
-            'Me.txtPrecio.Text = vPrecio.ToString
-            'Me.txtTotalAPagar.Text = vTotalAPagar.ToString
         End If
     End Sub
 
@@ -1178,14 +971,9 @@ Public Class frmLetes
         IdDocumento = vId
         TipoDocumento = vTipo
     End Sub
-    Public Sub CargarRegistro(ByVal CodInversion As String)
-        Modo = "C"
-        CodigoInversion = CodInversion
-    End Sub
 
-    Sub GuardarRegistro()
 
-    End Sub
+
 
     Private Sub txtRendimientoBruto_MouseCaptureChanged(sender As Object, e As EventArgs) Handles txtRendimientoBruto.MouseCaptureChanged
 
@@ -2255,7 +2043,7 @@ Public Class frmLetes
         Dim Fechaliquidacion = dtpFechaLiquidacion.Value
 
 
-        'If (cboBase.SelectedIndex = 0) Then
+
         If (IndexBase = 0 Or IndexBase = 2) Then
 
 
@@ -2289,7 +2077,7 @@ Public Class frmLetes
 
 
     Private Sub txtRendimientoBruto_Leave(sender As Object, e As EventArgs) Handles txtRendimientoBruto.Leave
-        ' txtRendimientoBruto.Text = CStr(GetRendimientoBruto())
+
         Rellenar()
     End Sub
 
@@ -2623,33 +2411,7 @@ Public Class frmLetes
     End Sub
 
 
-    Sub LimpiarCampos()
-
-        chbValorPar.Checked = False
-        txtValorNominal.Text = 0
-        txtPlazoInversion.Text = 0
-        cboCasasCorredoras.SelectedIndex = -1
-        cboBase.SelectedIndex = -1
-        txtPorcentajeComisionBolsa.Text = 0
-        txtPorcentajeComisionCasa.Text = 0
-        txtComisionBolsa.Text = 0
-        txtComisionCasa.Text = 0
-        txtRendimientoBruto.Text = 0
-        txtRendimientoNeto.Text = 0
-        txtIngresoBruto.Text = 0
-        txtIngresoNeto.Text = 0
-        txtValorTransado.Text = 0
-        txtPrecio.Text = 0
-        txtTotalAPagar.Text = 0
-        dtpFechaOperacion.Value = Date.Now.Date
-        dtpFechaLiquidacion.Value = Date.Now.Date
-        dtpFechaVencimiento.Value = Date.Now.Date
-        dtpUltimaFecha.Value = Date.Now.Date
-        dtpRedencion.Value = Date.Now.Date
-        txtInteresAcumulado.Text = 0
-        txtOtrosCostos.Text = 0
 
-    End Sub
 
 
     Sub CargarTransladoNuevo()

+ 0 - 1
FRM/frmMenuCostos.Designer.vb

@@ -102,7 +102,6 @@ Partial Class frmMenuCostos
         Me.ClientSize = New System.Drawing.Size(639, 232)
         Me.Controls.Add(Me.Panel1)
         Me.Name = "frmMenuCostos"
-        Me.Text = "frmMenuCostos"
         Me.Panel1.ResumeLayout(False)
         Me.ResumeLayout(False)
 

+ 21 - 201
FRM/frmNotaEstructurada.vb

@@ -10,7 +10,7 @@
     Dim codigo As String = Variables.Codigo
     Dim Operaciones As New Operaciones
     Dim NotaCalcular As New NotaEstructuradaCE
-    'Dim oUtilidades As New Utilidades
+
 
     Private _TipoTransaccion As String
     Private _IdDocumento As Integer
@@ -57,7 +57,7 @@
 
 
     Private Sub frmNotaEstructurada_Load(sender As Object, e As EventArgs) Handles MyBase.Load
-        'Me.txtBase.Text = AnioBase.ToString
+
         dgvIntereses.Columns.Clear()
         AgregarCampos()
 
@@ -78,7 +78,7 @@
             Call CargarRegistroBD()
         End If
 
-        PreparardgvIntereses()
+
 
 
 
@@ -156,7 +156,7 @@
             navNuevo.Enabled = True
             navModificar.Enabled = False
             navEliminar.Enabled = False
-            'LimpiarCampos()
+
         End If
         Estado = String.Empty
         btnGME.Text = "Aceptar"
@@ -174,26 +174,13 @@
         Return Existe
     End Function
 
-    Sub LimpiarCampos()
-        txtMontoInversion.Text = "0"
-        txtPlazo.Text = 0
-        txtTasa.Text = 0
-        cboPeriodicidad.SelectedIndex = 0
-        txtRendimientoBruto.Text = "0.0%"
-        txtRendimientoNeto.Text = "0.0%"
-        dtpFechaOperacion.Value = Date.Now.Date
-        dtpFechaVencimiento.Value = Date.Now.Date
-    End Sub
+
 
     Private Sub txtPlazo_TextChanged(sender As Object, e As EventArgs)
-        'If Modo = "N" Then
-        '    RefrescarFechaVencimiento()
-        '    CalcularIntereses()
-        'End If
         Calculo()
     End Sub
     Private Sub txtPlazo_LostFocus(sender As Object, e As EventArgs)
-        '   ControlPlazo()
+
     End Sub
     Private Sub ControlPlazo()
         Dim valor As Integer
@@ -211,10 +198,6 @@
 
     End Sub
     Private Sub dtpFechaOperacion_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaOperacion.ValueChanged
-        'If Modo = "N" Then
-        '    RefrescarFechaVencimiento()
-        'End If
-        'ControlFechaOperacion()
         CalcularPlazo()
         Calculo()
     End Sub
@@ -229,18 +212,12 @@
     End Sub
 
     Private Sub txtIngresoBruto_TextChanged(sender As Object, e As EventArgs)
-        'If Modo = "N" Then
-        '    RefrescarRendimientoBruto()
-        'End If
+
     End Sub
 
 
 
     Private Sub txtTasa_TextChanged(sender As Object, e As EventArgs) Handles txtTasa.TextChanged
-        'If Modo = "N" Then
-        '    CalcularIntereses()
-        'End If
-
 
         Calculo()
         If (txtTasa.ToString.IndexOf("%") = -1) Then
@@ -250,7 +227,7 @@
         Calculo()
     End Sub
     Private Sub txtTasa_LostFocus(sender As Object, e As EventArgs) Handles txtTasa.LostFocus
-        ' ControlTasa()
+
     End Sub
     Private Sub ControlTasa()
         Dim valor As Double
@@ -270,14 +247,11 @@
 
     Private Sub txtMontoInversion_TextChanged(sender As Object, e As EventArgs) Handles txtMontoInversion.TextChanged
 
-        'If Modo = "N" Then
-        '    CalcularIntereses()
-        'End If
         CalcularPlazo()
         Calculo()
     End Sub
     Private Sub txtMontoInversion_LostFocus(sender As Object, e As EventArgs) Handles txtMontoInversion.LostFocus
-        '  ControlMontoInversion()
+
     End Sub
     Private Sub ControlMontoInversion()
         Dim valor As Double
@@ -297,9 +271,7 @@
 
 
     Private Sub txtIngresoNeto_TextChanged(sender As Object, e As EventArgs)
-        'If Modo = "N" Then
-        '    RefrescarRendimientoNeto()
-        'End If
+
     End Sub
     Sub CargarPeriodos()
         If cboPeriodicidad.Items.Count = 0 Or cboPeriodicidad.Items.Count = 1 Then
@@ -312,14 +284,6 @@
         End If
     End Sub
     Private Sub btnAceptar_Click(sender As Object, e As EventArgs)
-        'If (TipoTransaccion = "N" Or TipoTransaccion = "A") Then
-        'RefrescarClaseEntidad()
-        ' If TipoTransaccion = "A" Then
-        '      ActualizarRegistro()
-        '   End If
-        'Else
-        '    Me.Close()
-        ' End If
 
         If (Estado = "N") Then
             NuevoElemento()
@@ -332,15 +296,12 @@
 
     End Sub
 
-    Function RetornarObjeto()
-        Return oNETSCE
-    End Function
+
 
     Private Sub CargarRegistroBD()
         oNETSCE = Nothing
         oDAONEST = New DAONotaEstructurada
         CodigoInversion = Variables.Codigo
-        'oDAPDAO.CargarRegistro(oDAPCE, TipoDocumento, IdDocumento)
         oNETSCE = oDAONEST.CargarRegistro(Me.CodigoInversion)
 
         TipoTransaccion = "C"
@@ -349,14 +310,9 @@
 
     End Sub
 
-    Public Sub CargarRegistro(vId As Integer, vTipo As String)
-        TipoTransaccion = "C"
-        IdDocumento = vId
-        TipoDocumento = vTipo
-    End Sub
+
 
     Private Sub dtpFechaVencimiento_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaVencimiento.ValueChanged
-        'ControlFechaVencimiento()
         CalcularPlazo()
         Calculo()
     End Sub
@@ -371,7 +327,7 @@
     End Sub
 
     Private Sub cboPeriodicidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboPeriodicidad.SelectedIndexChanged
-        'ControlPreriodicidad()
+
         CalcularPlazo()
         Calculo()
     End Sub
@@ -404,7 +360,7 @@
 
             txtPlazo.Text = oNETSCE.Plazo.ToString
 
-            'txtPlazo.Text = 10 'oDAPCE.Plazo.ToString
+
 
 
 
@@ -423,130 +379,13 @@
 
 
     End Sub
-    Private Sub PreparardgvIntereses()
-
-
-
-
-
-
-
-    End Sub
-    Private Sub PrepararCalculoIntereses(ByVal IdFila As Integer, idColumna As Integer)
-        Dim vFila As DataGridViewRow = dgvIntereses.Rows(IdFila)
-        Dim vFilaAnterior As DataGridViewRow
-        Dim vFecha As Date
-        Dim vFechaAnterior As Date
-        Dim vPeriodicidad As String = oNETSCE.Periodicidad
-        Dim vDiasDelPeriodo As Integer
 
-        If vFila.IsNewRow Then
-            If IdFila = 0 Then
-                vFecha = oNETSCE.FechaOperacion
-            Else
-                vFilaAnterior = dgvIntereses.Rows(IdFila - 1)
-                vFecha = vFilaAnterior.Cells("Fecha").Value
-
-            End If
-            'vFecha = vFechaAnterior
-
-            If vPeriodicidad = "M" Then
-                vDiasDelPeriodo = 30
-            ElseIf vPeriodicidad = "T" Then
-                vDiasDelPeriodo = 90
-            ElseIf vPeriodicidad = "S" Then
-                vDiasDelPeriodo = 180
-            Else
-                vDiasDelPeriodo = 30
-            End If
-
-            vFila.Cells("Plazo").Value = vDiasDelPeriodo
-            If Not IdFila = 0 Then
-                vFecha = vFecha.AddDays(vFila.Cells("Plazo").Value)
-            End If
-            vFila.Cells("Fecha").Value = vFecha
-            vFila.Cells("PorcImp").Value = 0.1
-            vFila.Cells("Estado").Value = "A"
-            dgvIntereses.Rows(IdFila).Selected = False
-            'dgvIntereses.Rows.Insert(IdFila + 1)
-
-            'MsgBox("IsNewRow")
-        Else
-            'MsgBox("No IsNewRow")
-        End If
-        'CalcularIntereses(IdFila)
-        'dgvIntereses.Refresh()
-    End Sub
 
     Private Sub dgvIntereses_CellBeginEdit(sender As Object, e As DataGridViewCellCancelEventArgs) Handles dgvIntereses.CellBeginEdit
-        'MsgBox("CellBeginEdit")
-        '        PrepararCalculoIntereses(e.RowIndex, e.ColumnIndex)
-
-    End Sub
-    Private Sub CalcularIntereses(ByVal IdFila As Integer, ByVal IdCol As Integer)
-        Dim vFila As DataGridViewRow = dgvIntereses.Rows(IdFila)
-        Dim vFilaAnterior As DataGridViewRow
-        Dim vPlazo As Integer = 0
-        Dim vFechaAnterior As Date
-        Dim vFecha As Date
-        Dim vIngresoBruto As Double = 0
-        Dim vMontoInversion As Double = oNETSCE.MontoDeInversion
-        Dim vTasa As Double = oNETSCE.Tasa
-        Dim vPorcentajeImpuesto As Double = 0
-        Dim vMontoImpuesto As Double = 0
-        Dim vIngresoNeto As Double = 0
-        If (Not String.IsNullOrEmpty(vTasa.ToString) And Not vTasa.ToString = "0") Then
-            vTasa = vTasa / 100
-        End If
-
-        If (Not String.IsNullOrEmpty(vPorcentajeImpuesto.ToString) And Not vPorcentajeImpuesto.ToString = "0") Then
-            vPorcentajeImpuesto = vPorcentajeImpuesto / 100
-        End If
-
-
-        If IdFila = 0 Then
-            vFechaAnterior = oNETSCE.FechaOperacion
-        Else
-            vFilaAnterior = dgvIntereses.Rows(IdFila - 1)
-            vFechaAnterior = vFilaAnterior.Cells("Fecha").Value
-
-        End If
-
-
-        'vFecha = vFila.Cells("Fecha").Value
-        vFecha = vFechaAnterior
-
-
-        'If vFila.IsNewRow Then
-        Integer.TryParse(vFila.Cells("Plazo").Value.ToString, vPlazo)
-        Double.TryParse(vFila.Cells("PorcImp").Value.ToString, vPorcentajeImpuesto)
-
-        vFecha = DateAdd(DateInterval.Day, vPlazo, vFecha)
-        vIngresoBruto = vMontoInversion * vTasa * vPlazo
-        If (Not String.IsNullOrEmpty(Utilidades.CalcularDiasDelAnio(vFecha).ToString) And Not Utilidades.CalcularDiasDelAnio(vFecha) = 0) Then
-            vIngresoBruto = vIngresoBruto / Utilidades.CalcularDiasDelAnio(vFecha)
-        Else
-            vIngresoBruto = "0.0"
-        End If
-
-        vFila.Cells("IngrBruto").Value = vIngresoBruto
 
-        vMontoImpuesto = vIngresoBruto * vPorcentajeImpuesto
-        vFila.Cells("MontoImp").Value = vMontoImpuesto
-
-        vIngresoNeto = vIngresoBruto - vMontoImpuesto
-        vFila.Cells("IngrNeto").Value = vIngresoNeto
-
-        'End If
-        If dgvIntereses.IsCurrentCellDirty Then
-            dgvIntereses.CommitEdit(DataGridViewDataErrorContexts.Commit)
-        End If
-
-
-        RefrescarClaseEntidad()
-        RefrescarValorControles()
     End Sub
 
+
     Private Sub RefrescarClaseEntidad()
         ControlMontoInversion()
         ControlFechaOperacion()
@@ -559,15 +398,6 @@
 
     Private Sub dgvIntereses_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles dgvIntereses.CellEndEdit
 
-        'If e.ColumnIndex = dgvIntereses.Columns("PorcImp").Index Then
-        '    Dim valor As Double
-        '    valor = dgvIntereses.Rows(e.RowIndex).Cells("PorcImp").Value
-        '    valor = valor / 100
-
-        '    dgvIntereses.Rows(e.RowIndex).Cells("PorcImp").Value = valor
-        'End If
-        'CalcularIntereses(e.RowIndex, e.ColumnIndex)
-
     End Sub
 
     Private Sub dgvIntereses_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvIntereses.CellContentClick
@@ -576,7 +406,7 @@
     Private Sub PrepararNuevo()
         oNETSCE = New NotaEstructuradaCE
         RefrescarValorControles()
-        'PreparardgvIntereses()
+
 
     End Sub
 
@@ -589,30 +419,21 @@
     End Sub
 
     Private Sub dgvIntereses_RowPostPaint(sender As Object, e As DataGridViewRowPostPaintEventArgs) Handles dgvIntereses.RowPostPaint
-        'MsgBox("RowPostPaint")
+
     End Sub
 
     Private Sub dgvIntereses_RowPrePaint(sender As Object, e As DataGridViewRowPrePaintEventArgs) Handles dgvIntereses.RowPrePaint
-        'MsgBox("RowPrePaint")
+
     End Sub
 
     Private Sub dgvIntereses_RowsAdded(sender As Object, e As DataGridViewRowsAddedEventArgs) Handles dgvIntereses.RowsAdded
-        'MsgBox("RowsAdded")
+
     End Sub
 
     Private Sub dgvIntereses_RowValidated(sender As Object, e As DataGridViewCellEventArgs) Handles dgvIntereses.RowValidated
 
     End Sub
-    Private Sub ActualizarRegistro()
-        Dim res As Integer
-        RefrescarClaseEntidad()
-        res = oDAONEST.Actualizar(oNETSCE)
-        If res > 0 Then
-            MsgBox("Registro Guardado")
-        Else
-            MsgBox("Algo no salio bien.")
-        End If
-    End Sub
+
 
     Private Sub navModificar_Click(sender As Object, e As EventArgs) Handles navModificar.Click
 
@@ -772,7 +593,7 @@
 
 
     Private Sub Button1_Click(sender As Object, e As EventArgs)
-        'ColeccionElementos()
+
     End Sub
 
 
@@ -783,7 +604,6 @@
         For i As Integer = 0 To Index
 
             Dim colec As Collection = ColeccionElementos(i)
-            'oDAPDAO.NuevoElemento(colec, codigo)
             diccionario.Add(i, colec)
         Next
 

+ 6 - 130
FRM/frmPrestamoEmpresariales.vb

@@ -60,7 +60,6 @@
 
         End If
         FinCarga = True
-        '  CargarDetalles()
         ExisteInversion()
         ValidarExistencia()
         CargarTransladoNuevo()
@@ -108,15 +107,7 @@
         End If
         Return False
     End Function
-    Sub CargarFecha()
-        Dim Index As Integer = dgvDetalles.CurrentRow.Index
-        Dim Anterior As Integer = Index - 1
-        Dim Fecha = dtpFechaOperacion.Value
-        Dim strFecha = Format(Fecha, "dd/MM/yyyy")
-        If (String.IsNullOrEmpty(dgvDetalles.Rows(Index).Cells("Fechas de Pago").Value)) Then
-            dgvDetalles.Rows(Index).Cells("Fechas de Pago").Value = strFecha
-        End If
-    End Sub
+
 
 
     Function CanRegistros()
@@ -361,29 +352,6 @@
             Dim Salir As Boolean = False
             FechaAux = FechaFinal
 
-
-
-
-
-
-            'While (Mes = FechaFinal.Month) Or (FechaFinal.Month = FechaVen.Month)
-            '    FechaFinal = Format(FechaFinal, "dd/MM/yyyy")
-            '    FechaVen = Format(FechaVen, "dd/MM/yyyy")
-            '    FechaFinal = FechaFinal.AddDays(1)
-            '    If (FechaFinal > FechaVen) Then
-
-            '        Salir = True
-            '        Exit While
-            '    End If
-
-            'End While
-
-
-
-
-
-
-
             While (Mes = FechaFinal.Month)
                 FechaFinal = Format(FechaFinal, "dd/MM/yyyy")
                 FechaVen = Format(FechaVen, "dd/MM/yyyy")
@@ -625,7 +593,7 @@
             SaldoAnterior = Monto
             PagoPendienteAnterior = dgvDetalles.Rows(Index - 1).Cells("Saldo Pendiente").Value
             Amortizacion = dgvDetalles.Rows(Index - 1).Cells("Amortizacion").Value
-            'PagoPendiente = dgvDetalles.Rows(Index).Cells("Saldo Pendiente").Value
+
 
             If (SaldoAnterior = Amortizado) Then
                 Saldo = 0
@@ -653,8 +621,6 @@
     Function Plazo(ByVal Index As Integer, ByVal fecha2 As Date)
 
         Dim fecha1 As Date
-        Dim fecha1Str As String
-        Dim fecha2Str As String
         Dim Valor
         Dim Anterior = Index - 1
         If (Index = 0) Then
@@ -783,13 +749,7 @@
         Return Valor
     End Function
 
-    Sub BorrarAnterior(ByVal Index As Integer)
-        Dim IndexAnterior As Integer = Index - 1
-        Dim Cantidad As Integer = dgvDetalles.Rows().Count - 1
-        If (Cantidad >= 0) Then
-            dgvDetalles.Rows(Index).Cells("Amortizacion").Value = 0
-        End If
-    End Sub
+
 
     Function CalculoAmortizacion(ByVal Ultimo As Integer, ByVal V_txtMonto As Double)
         Dim Monto As Integer = 0
@@ -815,20 +775,7 @@
         Return Valor
     End Function
 
-    Function SaldoFinal(ByVal Index As Integer, ByVal V_txtMonto As Double)
-        Dim Valor As Double
 
-        Dim Anterior As Integer = Index - 1
-        If (Index = 0) Then
-            Valor = V_txtMonto - dgvDetalles.Rows(Index).Cells("Amortizacion").Value
-        ElseIf (Index > 0) Then
-            Valor = dgvDetalles.Rows(Anterior).Cells("Saldo Final").Value - dgvDetalles.Rows(Index).Cells("Amortizacion").Value
-
-        Else
-            Valor = 0
-        End If
-        Return Valor
-    End Function
 
     Function Coleccion()
         Dim colec As New Collection
@@ -917,22 +864,13 @@
     End Function
 
 
-    Sub Nuevo(ByVal codigo As String)
 
-        PrestamoConsulta.NuevoDato(Coleccion, codigo)
-    End Sub
 
 
-    Sub ProcesoDatos(ByVal Colec As Collection, ByVal codigo As String, ByVal Diccionario As Dictionary(Of Integer, String), ByVal Diccionario2 As Dictionary(Of String, Collection), ByVal Estado As String)
 
-        PrestamoConsulta.ProcesoDatos(Colec, codigo, Diccionario2, Estado)
-    End Sub
 
 
-    Sub Modificar(ByVal codigo As String)
 
-        PrestamoConsulta.ModificarDato(Coleccion, codigo)
-    End Sub
 
     Sub NuevoDetalle(ByVal AgregarModificar As Boolean, ByVal Cantidad As Integer)
 
@@ -986,59 +924,10 @@
 
     End Sub
 
-    Sub ModificarDetalle(ByVal codigo As String)
-
-        Dim i As Integer = 0
-        Dim CantidadRegistrosDB = CanRegistros()
-        Dim CantidadRegistros As Integer = dgvDetalles.Rows.Count - 1
-
-        While i < CantidadRegistrosDB
-            If i < CantidadRegistros Then
-
-
-
-                Dim coleccion = ColeccionDetalle(i)
-                If PrestamoConsulta.ModificarDetalle(coleccion, codigo) Is Nothing Then
-
-                    Exit Sub
-                End If
-            End If
-            i += 1
-        End While
-
-
-
-        NuevoDetalle(True, CantidadRegistrosDB)
-        CantidadRegistrosDB = CanRegistros()
-
-        EliminarDetalles(CantidadRegistros, CantidadRegistrosDB)
-
-    End Sub
-
 
-    Function ColeccionModificar(ByVal codigo As String)
 
-        Dim i As Integer = 0
-        Dim CantidadRegistrosDB = CanRegistros()
-        Dim CantidadRegistros As Integer = dgvDetalles.Rows.Count - 1
-        Dim diccionario As New Dictionary(Of String, Collection)
-        While i < CantidadRegistrosDB
-            If i < CantidadRegistros Then
-
-
-
-                Dim coleccion = ColeccionDetalle(i)
-                diccionario.Add(i, coleccion)
-            End If
-            i += 1
-        End While
 
 
-
-
-        Return diccionario
-    End Function
-
     Function ColeccionNuevo(ByVal codigo As String)
 
 
@@ -1086,7 +975,6 @@
     End Sub
 
     Private Sub dgvDetalles_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles dgvDetalles.CellEndEdit
-        '       CargarFecha()
 
         Calculos(True, False)
 
@@ -1165,8 +1053,6 @@
             PrestamoConsulta.ProcesoDatos(Colec, codigo, Diccionario2, "Nuevo")
 
 
-            'Nuevo(codigo)
-            'ModificarDetalle(codigo)
 
         ElseIf Not ExisteValidacion() Then
 
@@ -1192,7 +1078,7 @@
     Private Sub navModificar_Click(sender As Object, e As EventArgs) Handles navModificar.Click
         Estado = "M"
         btnAccion.Text = "Modificar"
-        '     btnagregar.Text = "Modificar"
+
     End Sub
 
     Private Sub navNuevo_Click(sender As Object, e As EventArgs) Handles navNuevo.Click
@@ -1204,21 +1090,11 @@
     Private Sub navEliminar_Click(sender As Object, e As EventArgs) Handles navEliminar.Click
         Estado = "B"
         btnAccion.Text = "Eliminar"
-        '  btnagregar.Text = "Eliminar"
+
     End Sub
 
     Private Sub btnagregar_Click(sender As Object, e As EventArgs)
-        'Dim codigo As String = Variables.Codigo
-
-        'If (Estado = "N") Then
-        '    NuevoDetalle(codigo)
-        'End If
-        'If (Estado = "M") Then
-        '    ModificarDetalle(codigo)
-        'End If
-        'If (Estado = "B") Then
-        '    EliminarDetalle(codigo)
-        'End If
+
     End Sub
 
     Private Sub txtMonto_TextChanged(sender As Object, e As EventArgs) Handles txtMonto.TextChanged

+ 6 - 74
FRM/frmPrestamoPersonal.vb

@@ -23,7 +23,7 @@ Public Class frmPrestamoPersonal
         Formato()
         Calculos(False)
 
-        ' Calculos()
+
         ExisteInversion()
         ValidarExistencia()
         CargarTransladoNuevo()
@@ -729,32 +729,7 @@ Public Class frmPrestamoPersonal
 
         End If
 
-        'Else
-
-        'Dim Index As Integer = dgvAmortizacion.CurrentRow.Index
-        'dgvAmortizacion.Rows(Index).Cells(2).Value = Periodo(Index)
-        'dgvAmortizacion.Rows(Index).Cells(4).Value = PagoCuotaMensual(Index)
-        'If (String.IsNullOrEmpty(dgvAmortizacion.Rows(Index).Cells(10).Value)) Then
-        '   dgvAmortizacion.Rows(Index).Cells(10).Value = SeguroDaños(Index)
-        'End If
-        'If (String.IsNullOrEmpty(dgvAmortizacion.Rows(Index).Cells(11).Value)) Then
-        '   dgvAmortizacion.Rows(Index).Cells(11).Value = SeguroVivienda(Index)
-        'End If
-
-        'dgvAmortizacion.Rows(Index).Cells(12).Value = TotalCuota(Index)
-        'dgvAmortizacion.Rows(Index).Cells(13).Value = TotalCuota(Index)
-        'If (String.IsNullOrEmpty(dgvAmortizacion.Rows(Index).Cells(14).Value)) Then
-        '    dgvAmortizacion.Rows(Index).Cells(14).Value = 0
-        ' End If
 
-        ' dgvAmortizacion.Rows(Index).Cells(3).Value = PagoInicial(Index)
-        ' dgvAmortizacion.Rows(Index).Cells(5).Value = PagoInteresIVA(Index)
-        '  dgvAmortizacion.Rows(Index).Cells(7).Value = PagoIntereses(Index)
-        '   dgvAmortizacion.Rows(Index).Cells(6).Value = IVAIntereses(Index)
-        '    dgvAmortizacion.Rows(Index).Cells(8).Value = Abono(Index)
-        '     dgvAmortizacion.Rows(Index).Cells(9).Value = PrestamoRemanente(Index)
-
-        'IndexIterable = False
 
 
 
@@ -951,7 +926,6 @@ Public Class frmPrestamoPersonal
 
     Private Sub dgvAmortizacion_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvAmortizacion.CellContentClick
         CargarDatos()
-        '  Calculos()
     End Sub
 
     Private Sub dgvAmortizacion_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles dgvAmortizacion.CellEndEdit
@@ -963,21 +937,20 @@ Public Class frmPrestamoPersonal
         EstadoAccion = "M"
         btnAccion.Text = "Modificar"
 
-        'btnagregar.Text = "Modificar"
+
     End Sub
 
     Private Sub navNuevo_Click(sender As Object, e As EventArgs) Handles navNuevo.Click
         EstadoAccion = "N"
         btnAccion.Text = "Nuevo"
 
-        '  btnagregar.Text = "Nuevo"
+
     End Sub
 
     Private Sub navEliminar_Click(sender As Object, e As EventArgs) Handles navEliminar.Click
         EstadoAccion = "B"
         btnAccion.Text = "Eliminar"
 
-        'btnagregar.Text = "Eliminar"
     End Sub
 
 
@@ -985,7 +958,7 @@ Public Class frmPrestamoPersonal
     Sub CargarColecciones()
         CargarDeudor()
         CargarDetalles()
-        ' CargarAmortizacion()
+
     End Sub
 
 
@@ -1080,8 +1053,6 @@ Public Class frmPrestamoPersonal
         If (EstadoAccion = "B") Then
 
             PrestamoConsulta.Eliminar(codigo)
-            'PrestamoConsulta.EliminarDetalle(codigo)
-            'PrestamoConsulta.EliminarAmortizacion(codigo)
             ValidarExistencia()
 
         End If
@@ -1090,9 +1061,6 @@ Public Class frmPrestamoPersonal
             If (Validar) Then
 
                 PrestamoConsulta.ProcesoDatos(colecciondeuda, colecciondetalle, codigo, diccionarioAmort, "Modificar", "Modificar")
-                'PrestamoConsulta.ModificarDetalle(colecciondetalle, codigo)
-                'PrestamoConsulta.ModificarDeudor(colecciondeuda, codigo)
-                'ModificarAmort(codigo)
 
 
 
@@ -1104,10 +1072,7 @@ Public Class frmPrestamoPersonal
             Dim Validar = ValidarDatos()
             If (Validar) Then
                 PrestamoConsulta.ProcesoDatos(colecciondeuda, colecciondetalle, codigo, diccionarioAmort, "Nuevo", "Nuevo")
-                'PrestamoConsulta.NuevoDetalle(colecciondetalle, codigo)
-                'PrestamoConsulta.NuevoDeudor(colecciondeuda, codigo)
 
-                'NuevoAmort(codigo)
                 ValidarExistencia()
 
             End If
@@ -1142,7 +1107,7 @@ Public Class frmPrestamoPersonal
             navNuevo.Enabled = True
             navModificar.Enabled = False
             navEliminar.Enabled = False
-            'LimpiarCampos()
+
         End If
         EstadoAccion = String.Empty
         btnAccion.Text = "Aceptar"
@@ -1163,18 +1128,7 @@ Public Class frmPrestamoPersonal
 
         Return Existe
     End Function
-    Sub LimpiarCampos()
-        dtpFechaOtorgamiento.Value = Date.Now.Date
-        dtpFechaPago.Value = Date.Now.Date
-        txtTasaInteres.Text = "0.0%"
-        txtAñoPrestamo.Text = 0
-        txtCuotasMensuales.Text = 0
-        txtMontoPrestamo.Text = 0
-        txtCuotaSinSeguro.Text = 0
-        txtSeguro.Text = 0
-        txtCuotaReal.Text = 0
-        dgvAmortizacion.Rows.Clear()
-    End Sub
+
 
     Function ColeccionDeudor()
         Dim coleccion As New Collection
@@ -1274,36 +1228,14 @@ Public Class frmPrestamoPersonal
     End Function
 
 
-    Sub ModificarAmort(ByVal codigo As String)
-
-        PrestamoConsulta.EliminarAmortizacion(codigo)
 
-        NuevoAmort(codigo)
-    End Sub
 
     Private Sub txtTasaInteres_TextChanged(sender As Object, e As EventArgs) Handles txtTasaInteres.TextChanged
         Calculos(False)
     End Sub
 
     Private Sub btnagregar_Click(sender As Object, e As EventArgs)
-        'Dim coleccionAmor = coleccionAmortizacion()
-        'Dim codigo As String = Variables.Codigo
-
-
-        'If (EstadoAccion = "N") Then
-
-
-        '    PrestamoConsulta.NuevaAmortizacion(coleccionAmor, codigo)
-
-        'End If
-        'If (EstadoAccion = "B") Then
-        '    Dim Siguiente = dgvAmortizacion.CurrentRow.Cells(0).Value
-        '    PrestamoConsulta.EliminarAmortizacion(codigo, Siguiente)
-        'End If
-        'If (EstadoAccion = "M") Then
 
-        '    PrestamoConsulta.ModificarAmortizacion(coleccionAmor, codigo)
-        'End If
     End Sub
 
     Private Sub btnAccion2_Click(sender As Object, e As EventArgs)

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 191 - 195
FRM/frmPrincipalInicio.Designer.vb


+ 2 - 5
FRM/frmPrincipalInicio.vb

@@ -3,10 +3,7 @@
         Listas()
     End Sub
     Sub Fuente()
-        lblTitulo.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
-        lblRendimiento.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
-        lblIngreso.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
-        lblPortafolio.ForeColor = Drawing.Color.FromArgb(15, 151, 208)
+
 
 
 
@@ -103,7 +100,7 @@
 
     End Sub
 
-    Private Sub pnlRendimientoTotal_Paint(sender As Object, e As PaintEventArgs) Handles pnlRendimientoTotal.Paint
+    Private Sub pnlRendimientoTotal_Paint(sender As Object, e As PaintEventArgs)
 
     End Sub
 

+ 0 - 91
FRM/frmRendimientoFiltro.vb

@@ -113,93 +113,12 @@
 
 
 
-    Function EmpresaSeleccionada(ByVal NombreEmpresa As String)
-        Dim xCheckBox As New Control
-        Dim Activa As Boolean = False
-        For Each xCheckBox In Me.flpEmpresa.Controls
-            If TypeOf xCheckBox Is CheckBox Then
-                If xCheckBox.Name = NombreEmpresa Then
-                    If xCheckBox.BackColor.Name.ToString = "ffeaeae8" Then
-                        Activa = True
-                    Else
-                        Activa = False
-                    End If
-                End If
-            End If
-        Next
-        Return Activa
-    End Function
-
-
-    Function InstrumentosSeleccionados(ByVal NombreInstrumentos As String)
-        Dim xCheckBox As New Control
-        Dim Activa As Boolean = False
-        For Each xCheckBox In Me.flpInstrumento.Controls
-            If TypeOf xCheckBox Is CheckBox Then
-                If xCheckBox.Name = NombreInstrumentos Then
-                    If xCheckBox.BackColor.Name.ToString = "ffeaeae8" Then
-                        Activa = True
-                    Else
-                        Activa = False
-                    End If
-                End If
-            End If
-        Next
-        Return Activa
-    End Function
-
-    Function EstadoInternacionales(ByRef NombrePais As String)
-        Dim Paises As String = "Todos"
-        Dim Activo As Boolean = False
-        If rdbInternacionales.Checked Then
-            Paises = "Intl"
-
-        ElseIf rdbNacionales.Checked Then
-            Paises = "SV"
-
-        Else
-            Paises = "Todos"
-        End If
-
-        If Paises = "Intl" Then
-
-            If NombrePais = "SV" Then
-
-                Activo = False
-            Else
-                Activo = True
-            End If
-        ElseIf Paises = "SV" Then
-            If NombrePais = "SV" Then
 
-                Activo = True
-            Else
-                Activo = False
-            End If
-        ElseIf Paises = "Todos" Then
-            Activo = True
-
-        End If
-        Return Activo
-    End Function
 
 
-    Function CalculoActivo(ByVal MontoValor As Double)
-        Dim MontoTotal As Double = 0
-        Dim ValidarMonto As Double = 0
-        Dim Total As Double = 0
 
-        If String.IsNullOrEmpty(txtPortTotal.Text) Then
-            MontoTotal = txtPortTotal.Text
-        End If
 
-        If String.IsNullOrEmpty(MontoValor) Then
-            ValidarMonto = MontoValor
-        End If
-        Total = MontoTotal + ValidarMonto
-        Return Total
 
-    End Function
 
     Private Sub frmRendimientoTotal_Load(sender As Object, e As EventArgs) Handles MyBase.Load
         TipoRendimiento()
@@ -1010,17 +929,7 @@
 
     End Sub
 
-    Sub TipoRendimientoFecha()
-        If rdbFecha.Checked Then
-            TipoFecha = "F"
-        ElseIf rdbRangoFechas.Checked Then
-            TipoFecha = "FR"
-
-        Else
-            TipoFecha = "N"
 
-        End If
-    End Sub
     Sub ActualizarListas()
 
         EmpresaRendimientoDiario()

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 22 - 1285
FRM/frmReporto.vb


+ 12 - 13
FRM/frmReportoArbitraje.Designer.vb

@@ -24,8 +24,8 @@ Partial Class frmReportoArbitraje
     Private Sub InitializeComponent()
         Me.components = New System.ComponentModel.Container()
         Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmReportoArbitraje))
-        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
-        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
+        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
+        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
         Me.BindingNavigator1 = New System.Windows.Forms.BindingNavigator(Me.components)
         Me.BindingNavigatorAddNewItem = New System.Windows.Forms.ToolStripButton()
         Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel()
@@ -172,20 +172,20 @@ Partial Class frmReportoArbitraje
         Me.dgvArbitraje.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.[Single]
         Me.dgvArbitraje.ColumnHeadersHeight = 25
         Me.dgvArbitraje.ColumnHeadersVisible = False
-        DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
-        DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window
-        DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
-        DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText
-        DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight
-        DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText
-        DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
-        Me.dgvArbitraje.DefaultCellStyle = DataGridViewCellStyle3
+        DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
+        DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window
+        DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
+        DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText
+        DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
+        DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
+        DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[False]
+        Me.dgvArbitraje.DefaultCellStyle = DataGridViewCellStyle1
         Me.dgvArbitraje.Dock = System.Windows.Forms.DockStyle.Fill
         Me.dgvArbitraje.Location = New System.Drawing.Point(0, 0)
         Me.dgvArbitraje.Name = "dgvArbitraje"
         Me.dgvArbitraje.RowHeadersVisible = False
-        DataGridViewCellStyle4.BackColor = System.Drawing.Color.White
-        Me.dgvArbitraje.RowsDefaultCellStyle = DataGridViewCellStyle4
+        DataGridViewCellStyle2.BackColor = System.Drawing.Color.White
+        Me.dgvArbitraje.RowsDefaultCellStyle = DataGridViewCellStyle2
         Me.dgvArbitraje.RowTemplate.Height = 40
         Me.dgvArbitraje.RowTemplate.ReadOnly = True
         Me.dgvArbitraje.ShowCellErrors = False
@@ -233,7 +233,6 @@ Partial Class frmReportoArbitraje
         Me.Controls.Add(Me.Panel2)
         Me.Controls.Add(Me.BindingNavigator1)
         Me.Name = "frmReportoArbitraje"
-        Me.Text = "frmReportoArbitraje"
         CType(Me.BindingNavigator1, System.ComponentModel.ISupportInitialize).EndInit()
         Me.BindingNavigator1.ResumeLayout(False)
         Me.BindingNavigator1.PerformLayout()

+ 9 - 108
FRM/frmResultadoTitularizacion.vb

@@ -197,18 +197,6 @@ Public Class frmResultadoTitularizacion
         Amortizacion.Name = "Amortizacion"
         Saldos.Name = "Saldos"
 
-
-        'dgvAmortizacionCapital.Columns.Add(Correlativo)
-        'dgvAmortizacionCapital.Columns.Add(Fecha)
-        'dgvAmortizacionCapital.Columns.Add(CesionFlujo)
-        'dgvAmortizacionCapital.Columns.Add(AmortCapital)
-        'dgvAmortizacionCapital.Columns.Add(Interes)
-        'dgvAmortizacionCapital.Columns.Add(Amortizacion)
-        'dgvAmortizacionCapital.Columns.Add(Saldos)
-
-
-
-
     End Sub
 
     Sub ValidarExistencia()
@@ -281,31 +269,6 @@ Public Class frmResultadoTitularizacion
         Return coleccion
     End Function
 
-    Function ColeccionAmorCap()
-        'Dim coleccion As New Collection
-        'Dim Correlativo, Fecha, CSFlujo, AmortCap, Interes, Amort, Saldos As String
-        'Correlativo = dgvAmortizacionCapital.CurrentRow.Cells(0).Value
-        'Fecha = dgvAmortizacionCapital.CurrentRow.Cells(1).Value
-        'CSFlujo = dgvAmortizacionCapital.CurrentRow.Cells(2).Value
-        'AmortCap = dgvAmortizacionCapital.CurrentRow.Cells(3).Value
-        'Interes = dgvAmortizacionCapital.CurrentRow.Cells(4).Value
-        'Amort = dgvAmortizacionCapital.CurrentRow.Cells(5).Value
-        'Saldos = dgvAmortizacionCapital.CurrentRow.Cells(6).Value
-
-        'coleccion.Add(Correlativo)
-        'coleccion.Add(Fecha)
-        'coleccion.Add(CSFlujo)
-        'coleccion.Add(AmortCap)
-        'coleccion.Add(Interes)
-        'coleccion.Add(Amort)
-        'coleccion.Add(Saldos)
-
-
-        'Return coleccion
-    End Function
-
-
-
     Function ColeccionAmort(ByVal Index As Integer)
         Dim coleccion As New Collection
 
@@ -345,22 +308,16 @@ Public Class frmResultadoTitularizacion
 
     Private Sub navModificar_Click(sender As Object, e As EventArgs) Handles navModificar.Click
         btnTit0.Text = "Modificar"
-        'btnAmortCap.Text = "Modificar"
-        'btnAmort.Text = "Modificar"
         Estado = "M"
     End Sub
 
     Private Sub navNuevo_Click(sender As Object, e As EventArgs) Handles navNuevo.Click
         btnTit0.Text = "Nuevo"
-        'btnAmortCap.Text = "Nuevo"
-        'btnAmort.Text = "Nuevo"
         Estado = "N"
     End Sub
 
     Private Sub navEliminar_Click(sender As Object, e As EventArgs) Handles navEliminar.Click
         btnTit0.Text = "Eliminar"
-        'btnAmortCap.Text = "Eliminar"
-        'btnAmort.Text = "Eliminar"
         Estado = "B"
     End Sub
 
@@ -370,26 +327,14 @@ Public Class frmResultadoTitularizacion
         Dim Amortizacion As Dictionary(Of String, Collection) = coleccionNueva()
 
         If (Estado = "N") Then
-
             TitularizacionConsulta.ProcesoDatos(DatosAmortizacion, codigo, Amortizacion, "Nuevo")
-            'NuevoTIT()
-            'ModificarAmort()
-            'ValidarExistencia()
-            'ModificarAmort()
         ElseIf (Estado = "M") Then
-            'ModificarTIT()
-            'ValidarExistencia()
             TitularizacionConsulta.ProcesoDatos(DatosAmortizacion, codigo, Amortizacion, "Modificar")
-            'ModificarAmort()
         ElseIf (Estado = "B") Then
             EliminarTIT()
 
         End If
 
-
-
-
-
         ValidarExistencia()
     End Sub
 
@@ -399,8 +344,7 @@ Public Class frmResultadoTitularizacion
     End Sub
 
     Sub NuevoAmortCap()
-        Dim coleccion = ColeccionAmorCap()
-        TitularizacionConsulta.NuevaAmortCap(coleccion, Codigo)
+
     End Sub
 
 
@@ -497,14 +441,10 @@ Public Class frmResultadoTitularizacion
     End Sub
 
     Sub ModificarAmortCap()
-        Dim coleccion = ColeccionAmorCap()
-        TitularizacionConsulta.ModificarAmortCap(coleccion, Codigo)
+
     End Sub
 
-    'Sub ModificarAmort()
-    '    Dim coleccion = ColeccionAmort()
-    '    TitularizacionConsulta.ModificarAmort(coleccion, Codigo)
-    'End Sub
+
 
 
     Sub EliminarTIT()
@@ -515,8 +455,7 @@ Public Class frmResultadoTitularizacion
     End Sub
 
     Sub EliminarAmortCap()
-        'Dim Correlativo = dgvAmortizacionCapital.CurrentRow.Cells(0).Value
-        'TitularizacionConsulta.EliminarAmortCap(Codigo, Correlativo)
+
     End Sub
 
     Sub EliminarAmort()
@@ -548,7 +487,6 @@ Public Class frmResultadoTitularizacion
         While dr.Read
             ConvertirString = Format(dr("Fecha"), "dd/MM/yyyy")
 
-            'dgvAmortizacionCapital.Rows.Add(dr("Correlativo"), ConvertirString, dr("CSFlujo"), dr("AmortCap"), dr("Interes"), dr("Amort"), dr("Saldos"))
         End While
     End Sub
 
@@ -608,10 +546,7 @@ Public Class frmResultadoTitularizacion
 
     Sub LLenarFechaAmortCap()
         Dim Fecha As String = GenerarFecha()
-        'Dim Vacio = dgvAmortizacionCapital.CurrentRow.Cells(1).Value
-        'If (String.IsNullOrEmpty(Vacio)) Then
-        '    dgvAmortizacionCapital.CurrentRow.Cells(1).Value = Fecha
-        'End If
+
 
     End Sub
 
@@ -665,42 +600,14 @@ Public Class frmResultadoTitularizacion
     End Sub
 
 
-    Sub CalculosAmortCap()
-
-        Dim CF = 0.0, AmortCap = 0.0, Interes = 0.0, Amort = 0.0, Saldos = 0.0, Emistot = 0.0, Cantidad = 0, Posicion = 0, PosicionAnterior = 0
-        Dim Total As Integer = 0
-
-        'Posicion = dgvAmortizacionCapital.CurrentRow.Index
-        'If (dgvAmortizacionCapital.CurrentRow IsNot Nothing) Then
-
-
-        '    PosicionAnterior = Posicion - 1
-        '    Cantidad = dgvAmortizacionCapital.Rows.Count - 1
-        '    CF = dgvAmortizacionCapital.CurrentRow.Cells(2).Value
-        '    AmortCap = dgvAmortizacionCapital.CurrentRow.Cells(3).Value
-        '    Emistot = txtEmisionTotal.Text
-
-
-        'Total = CalcularCantidad(Cantidad)
-        '    Interes = CalcularInteres(CF, AmortCap)
-        '    Amort = CalcularAmort(Total, AmortCap)
-        '    Saldos = CalcularSaldos(Posicion, Emistot, AmortCap, PosicionAnterior)
 
 
-        '    dgvAmortizacionCapital.CurrentRow.Cells(4).Value = Interes
-        '    dgvAmortizacionCapital.CurrentRow.Cells(5).Value = Amort
-        '    dgvAmortizacionCapital.CurrentRow.Cells(6).Value = Saldos
-        'End If
-    End Sub
-
     Function CalcularSaldos(ByVal Posicion As Double, ByVal Emistot As Double, ByVal AmortCap As Double, ByVal PosicionAnterior As Integer)
         Dim Saldos As Double = 0
         If Posicion = 0 Then
             Saldos = Emistot - AmortCap
         ElseIf (Posicion > 0) Then
-            'Dim SaldoAnterior As Double
-            'SaldoAnterior = dgvAmortizacionCapital.Rows(PosicionAnterior).Cells(6).Value
-            'Saldos = SaldoAnterior - AmortCap
+
         End If
         Return Saldos
     End Function
@@ -714,13 +621,7 @@ Public Class frmResultadoTitularizacion
     End Function
 
 
-    Function CalcularCantidad(ByVal Cantidad As Integer)
-        Dim Total As Double = 0
-        For i As Integer = 0 To Cantidad
-            'Total = Total + dgvAmortizacionCapital.Rows(i).Cells(3).Value
-        Next
-        Return Total
-    End Function
+
     Function CalcularInteres(ByVal CF As Double, ByVal AmortCap As Double)
         Dim Interes As Double = 0
         Interes = CF - AmortCap
@@ -926,11 +827,11 @@ Public Class frmResultadoTitularizacion
     End Sub
 
     Private Sub dgvAmortizacionCapital_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs)
-        CalculosAmortCap()
+
     End Sub
 
     Private Sub dgvAmortizacion_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles dgvAmortizacion.CellEndEdit
-        'CalculosAmort()
+
     End Sub
 
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles TbAmortizacion.Click, btnExcel.Click

+ 1 - 16
FRM/frmSeleccionTitulosReportos.vb

@@ -122,7 +122,7 @@
                         ObtenerInstanciaObjetotexto = Item
 
                         ObtenerInstanciaObjetocheque = sender
-                        Seleccionado()
+
                     Else
                         ObtenerInstanciaObjetotexto = Item
                         NombreTrasladar = sender.name.ToString
@@ -325,9 +325,7 @@
 
     End Sub
 
-    Sub Seleccionado()
 
-    End Sub
 
     Private Sub flpTitulos_CursorChanged(sender As Object, e As EventArgs) Handles flpTitulos.CursorChanged
 
@@ -538,20 +536,7 @@
     End Sub
 
 
-    Public Function SoloNumeros(ByVal strCadena As String) As String
-        Dim SoloNumero As String = ""
-        strCadena = Replace(strCadena, " ", "")
-        Dim index As Integer
-        For index = 1 To Len(strCadena)
-            If (Mid$(strCadena, index, 1) Like "#") _
-                Or Mid$(strCadena, index, 1) = "." Then
-
 
-                SoloNumero = SoloNumero & Mid$(strCadena, index, 1)
-            End If
-        Next
-        Return SoloNumero
-    End Function
 
     Private Sub lblMontoUsado_Click(sender As Object, e As EventArgs) Handles lblMontoUsado.Click
 

binární
Resources/Anexar.png


binární
Resources/Aprobado.png


binární
Resources/Aprobado2.png


binární
Resources/Busqueda.png


binární
Resources/Corregir.png


binární
Resources/Modificar.png


binární
Resources/Rechazado.png


binární
Resources/Revisión.png


+ 2 - 13
frmBuscarDeLista.vb

@@ -26,26 +26,15 @@ Public Class frmBuscarDeLista
         Return strCodigoPrincipal
     End Function
 
-    Sub CargarResultado()
-        'Me.dgvBuscarDeLista.DataSource = ds.Tables("Resultado")
-        Me.dgvBuscarDeLista.Refresh()
-    End Sub
+
 
     Private Sub frmBuscarDeLista_Load(sender As Object, e As EventArgs) Handles MyBase.Load
 
     End Sub
-    Sub GenerarFormato()
-        dgvBuscarDeLista.Columns("Id").Visible = False
-    
-    End Sub
+
 
     Private Sub dgvBuscarDeLista_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvBuscarDeLista.CellClick
-        'Dim IdFila As Integer
-        'IdFila = e.RowIndex
-        'Dim FilaSeleccionada As DataGridViewRow
 
-        'FilaSeleccionada = dgvBuscarDeLista.Rows(IdFila)
-        'Me.strCodigoPrincipal = FilaSeleccionada.Cells(0).Value.ToString
         If InversionPropuesta = 1 Then
             frmPIN.CargarDatosContenedor()
         ElseIf InversionPropuesta = 2 Then

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 359 - 441
frmINV.Designer.vb


+ 1 - 1
frmINV.resx

@@ -658,6 +658,6 @@
     <value>163, 23</value>
   </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>40</value>
+    <value>43</value>
   </metadata>
 </root>

+ 24 - 129
frmINV.vb

@@ -84,8 +84,6 @@
         If GenerarReportoVenta Then
             Navegador.Enabled = False
             Modo = "NM"
-
-            'HabilitarBotones()'
             btnAccion.Text = "Guardar"
             ModoInversion()
             PrepararNuevo()
@@ -111,8 +109,6 @@
 
     Private Sub frmInversiones_Load(sender As Object, e As EventArgs) Handles MyBase.Load
         'TODO: esta línea de código carga datos en la tabla 'InversionesDEVDataSet5.PIN0' Puede moverla o quitarla según sea necesario.
-        'Me.PIN0TableAdapter.Fill(Me.InversionesDEVDataSet5.PIN0)
-
         frmProgreso.PgbProgreso.Value = 1
         Call CargarEstadosInversion()
         frmProgreso.PgbProgreso.Value = 5
@@ -170,8 +166,6 @@
         frmProgreso.PgbProgreso.Value = 96
         Modificar()
         frmProgreso.PgbProgreso.Value = 100
-        'CodigoCompra()
-
         frmProgreso.Visible = False
         ConfigurarReportoVenta()
     End Sub
@@ -283,15 +277,11 @@
 
 
     Private Sub CargarNavegador()
-
         vBindingSource.DataSource = oInversionDAO.ListaCodigosInversion
         Navegador.BindingSource = vBindingSource
-        'vBindingSource.Position = 0
-    End Sub
-    Private Sub LimpiarNavegador()
-        vBindingSource.DataSource = Nothing
     End Sub
 
+
     Private Sub CargarTipoOperacion()
 
         Me.cboTipoOperacion.DataSource = oDAOGeneral.ListaTipoOperacion
@@ -456,8 +446,6 @@
         txtCodigoManual.ReadOnly = False
         cboPlazoFactor.Enabled = True
         cboPeriodicidad.Enabled = True
-
-
         cboTipoOperacion.Enabled = True
         cboOrigenDeFondos.Enabled = True
         cboTipoRenta.Enabled = True
@@ -469,8 +457,6 @@
         cboOrigenDeFondos.BackColor = Color.White
         cboTipoRenta.BackColor = Color.White
         cboTipoTasa.BackColor = Color.White
-
-
         cboEmpresas.BackColor = Color.White
         cboInstrumentos.BackColor = Color.White
         cboEmisores.BackColor = Color.White
@@ -544,7 +530,7 @@
     End Sub
     Private Sub Buscar()
 
-        'frmBuscarDeLista.dgvBuscarDeLista.DataSource = oInversionDAO.Buscar(oInversionCE)
+
         If frmBuscarDeLista.ShowDialog = DialogResult.OK Then
             If Not frmBuscarDeLista.CodigoPrincipal = Nothing Then
 
@@ -657,15 +643,6 @@
                 End If
             End If
 
-
-
-
-
-            If retorno >= 1 Then
-                GuardarInstrumentoFinanciero()
-
-            End If
-
         End If
         If TipoOperacion = "M" Then
 
@@ -684,54 +661,12 @@
             MsgBox("Operación Completada.")
         End If
     End Sub
-    Sub GuardarInstrumentoFinanciero()
-        Dim vRetorno As Integer
-        Dim vCodigoInversion As String = oInversionCE.CodigoIversion
-
-        If Not oInstrumentoFinanciero Is Nothing Then
-            Dim oAccionesCE As New AccionesCE
-            Dim oBonosCE As New BonosCE
-            Dim oDAPCE As New DepositosAPlazoCE
-            Dim oLETESCE As New LETESCE
-            Dim oReportoCE As New ReportosCE
-
 
-            If oInstrumentoFinanciero.GetType.ToString = oAccionesCE.GetType.ToString Then
-                Dim oDAOAcciones As AccionesDAO = New AccionesDAO
-                vRetorno = oDAOAcciones.Nuevo(oInstrumentoFinanciero)
-            End If
-
-            If oInstrumentoFinanciero.GetType.ToString = oBonosCE.GetType.ToString Then
-                Dim oDAOBonos As BonosDAO = New BonosDAO
-                vRetorno = oDAOBonos.Nuevo(oInstrumentoFinanciero)
-            End If
-
-            If oInstrumentoFinanciero.GetType.ToString = oDAPCE.GetType.ToString Then
-                Dim oDAODAP As DepositosAPlazoDAO = New DepositosAPlazoDAO
-                oInstrumentoFinanciero.CodigoInversion = vCodigoInversion
-                vRetorno = oDAODAP.Nuevo(oInstrumentoFinanciero)
-            End If
-
-            If oInstrumentoFinanciero.GetType.ToString = oLETESCE.GetType.ToString Then
-                Dim oDAOLetes As LETESDAO = New LETESDAO
-                vRetorno = oDAOLetes.Nuevo(oInstrumentoFinanciero)
-            End If
-
-            If oInstrumentoFinanciero.GetType.ToString = oReportoCE.GetType.ToString Then
-                Dim oDAOReportos As ReportosDAO = New ReportosDAO
-                vRetorno = oDAOReportos.Nuevo(oInstrumentoFinanciero)
-            End If
-        End If
-    End Sub
     Private Sub btnAccion_Click(sender As Object, e As EventArgs) Handles btnAccion.Click
         ControlEstadoProceso()
 
         If TipoOperacion = "B" Then
-            '  BoquearBotones()'
-
             Buscar()
-
-
         End If
         If TipoOperacion = "N" Or TipoOperacion = "M" Then
 
@@ -1324,7 +1259,6 @@
 
                     FormFuturos.Dispose()
                     FormFuturos = New frmFuturos(TipOperacion)
-                    'FormFuturos.CargarRegistro(oInversionCE.CodigoIversion)
                     FormFuturos.ShowDialog()
                 Else
                     If NuevaPosInstrumento Then
@@ -1428,7 +1362,6 @@
 
                     FormPrestamoPersonal.Dispose()
                     FormPrestamoPersonal = New frmPrestamoPersonal
-                    'FormPrestamoPersonal.CargarRegistro(oInversionCE.CodigoIversion)
                     FormPrestamoPersonal.ShowDialog()
                 Else
                     If NuevaPosInstrumento Then
@@ -1470,7 +1403,6 @@
 
                     FormPrestamoEmpresarial.Dispose()
                     FormPrestamoEmpresarial = New frmPrestamoEmpresariales
-                    'FormPrestamoEmpresarial.CargarRegistro(oInversionCE.CodigoIversion)
                     FormPrestamoEmpresarial.ShowDialog()
                 Else
                     If NuevaPosInstrumento Then
@@ -1568,7 +1500,6 @@
 
                     FormLete.Dispose()
                     FormLete = New frmLetes
-                    'FormLete.CargarRegistro(oInversionCE.CodigoIversion)
                     FormLete.ShowDialog()
                 Else
                     If NuevaPosInstrumento Then
@@ -1751,10 +1682,7 @@
         Dim Valor As String = General.EstadoInversion(Codigo)
         If Valor = "C" Then
             Modo = "NM"
-        ModoInversion()
-
-
-
+            ModoInversion()
             PrepararEdicion()
         End If
 
@@ -1780,15 +1708,9 @@
         End If
 
     End Sub
-    Private Sub ActivarNavegacion()
-        Me.TipoOperacion = "C"
 
-    End Sub
 
     Private Sub navSiguienteRegistro_Click(sender As Object, e As EventArgs)
-        'ActivarNavegacion()
-
-
         If Me.TipoOperacion = "B" Or Me.TipoOperacion = "M" Then
             CargarRegistro(vBindingSource.Current("DocId").ToString)
         ElseIf Me.TipoOperacion = "C" Then
@@ -1827,9 +1749,7 @@
         End If
         EstadoBoton()
     End Sub
-    Private Sub RefrescarClaseEntidad()
 
-    End Sub
 
     Private Sub cboEmisores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboEmisores.SelectedIndexChanged
         ControlEmisores()
@@ -1849,16 +1769,12 @@
     Private Sub cboInstrumentos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboInstrumentos.SelectedIndexChanged
         ControlInstrumentos()
         controladores.TInstrumento = cboInstrumentos.SelectedIndex
-        'ConsAcciones(TipoOperacion)
-
     End Sub
     Private Sub ControlInstrumentos()
         If Not String.IsNullOrEmpty(TipoOperacion) Then
-            '  And (String.IsNullOrEmpty(Me.cboInstrumentos.SelectedValue.ToString))
-            'Controlar
+
             If (Not String.IsNullOrEmpty(Me.cboInstrumentos.SelectedValue)) Then
                 oInversionCE.CodigoInstrumentoFinanciero = Me.cboInstrumentos.SelectedValue
-                'oInversionCE.TipoInstrumentoFinanciero = oInversionDAO.ObtenerTipoInstrumentoFinanciero(oInversionCE.CodigoInstrumentoFinanciero)
             End If
         End If
         If TipoOperacion = "N" Then
@@ -2034,8 +1950,6 @@
 
     Private Sub navNuevo_Click(sender As Object, e As EventArgs) Handles navNuevo.Click
         Modo = "NM"
-
-        'HabilitarBotones()'
         btnAccion.Text = "Guardar"
         ModoInversion()
         PrepararNuevo()
@@ -2055,18 +1969,13 @@
         Me.cboCalificaciones.BackColor = Color.White
         Me.cboCalificadoras.BackColor = Color.White
         Me.txtCodigoManual.BackColor = Color.White
-
         Me.txtCodigoInversion.Enabled = False
         Me.cboEstadoDocumento.SelectedValue = "A"
         Me.cboEstadoDocumento.Enabled = False
-
         Me.cboTipoOperacion.SelectedValue = "C"
         Me.cboTipoOperacion.Enabled = False
-
-
         Me.cboEstadoProceso.SelectedValue = "R"
         Me.cboEstadoProceso.Enabled = False
-
         Me.cboOrigenDeFondos.SelectedValue = "D"
         Me.cboOrigenDeFondos.Enabled = False
 
@@ -2093,9 +2002,7 @@
     End Sub
     Private Sub ControlFechaDocumento()
         If TipoOperacion = "N" Or TipoOperacion = "M" Then
-
             oInversionCE.FechaDocumento = dtpFechaDocumento.Value.Date
-
         End If
     End Sub
 
@@ -2148,19 +2055,9 @@
 
 
     End Sub
-    Private Sub ConsAcciones(ByRef valor As String)
-        If (controladores.TInstrumento <= 2 And controladores.TInstrumento >= 0 And valor = "N") Then
-            Dim frmAcciones As New frmAcciones(valor)
-            frmAcciones.Show()
-        End If
-    End Sub
 
-    Private Sub ConsAccionesBuscar(ByRef valor As String)
-        If (controladores.TInstrumento <= 2 And controladores.TInstrumento >= 0) Then
-            Dim frmAcciones As New frmAcciones(valor)
-            frmAcciones.Show()
-        End If
-    End Sub
+
+
 
     Private Sub navEliminar_Click(sender As Object, e As EventArgs) Handles navEliminar.Click
 
@@ -2306,10 +2203,6 @@
 
         frmBuscar.Show()
 
-
-
-
-
     End Sub
 
 
@@ -2782,7 +2675,6 @@
             End If
         Next
         pnlContenedor.Visible = False
-
         CargarTabla()
     End Sub
     Sub eventoCancelar()
@@ -3569,13 +3461,6 @@
         Dim CodigoInversion As String = txtCodigoInversion.Text
         Dim Empresa As String = cboEmpresas.SelectedValue
         Dim oRequisicionDePago As New frmReqPago(CodigoInversion, Empresa, "Individual")
-        'oRequisicionDePago.CodigoInversion = oPropuestaInversionCE.CodigoInversion
-        'oRequisicionDePago.CodigoEmpresa = oPropuestaInversionCE.CodigoEmpresa
-
-
-
-
-
         oRequisicionDePago.ShowDialog()
     End Sub
 
@@ -3712,12 +3597,6 @@
     Sub EstadoControladoresNAV()
         Dim Estado As String = String.Empty
 
-        'R
-        'C
-        'A
-        'P
-        'I
-        'F
 
 
 
@@ -3793,7 +3672,7 @@
 
     End Sub
 
-    Private Sub TableLayoutPanel2_Paint(sender As Object, e As PaintEventArgs) Handles TableLayoutPanel2.Paint
+    Private Sub TableLayoutPanel2_Paint(sender As Object, e As PaintEventArgs)
 
     End Sub
 
@@ -3805,7 +3684,23 @@
         CargarTabla()
     End Sub
 
-    Private Sub Label15_Click(sender As Object, e As EventArgs) Handles Label15.Click
+    Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter
+
+    End Sub
+
+    Private Sub Panel5_Paint(sender As Object, e As PaintEventArgs)
+
+    End Sub
+
+    Private Sub Panel6_Paint(sender As Object, e As PaintEventArgs) 
+
+    End Sub
+
+    Private Sub TbIngresarModificar_Click(sender As Object, e As EventArgs) Handles TbIngresarModificar.Click
+
+    End Sub
+
+    Private Sub Button4_Click(sender As Object, e As EventArgs)
 
     End Sub
 End Class

+ 1 - 7
frmImprimir.vb

@@ -16,13 +16,7 @@ Public Class frmImprimir
 
     End Sub
 
-    Sub New(ByRef NombreRPT As String, ByRef IdDocumento As String, ByRef VistaPrevia As Boolean)
 
-        Me.New
-        Me.NombreRPT = NombreRPT
-        Me.IdDocumento = IdDocumento
-        CargarRPT()
-    End Sub
 
 
     Private Sub frmImpresion_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -36,7 +30,7 @@ Public Class frmImprimir
         Dim cInfo = New ConnectionInfo()
         Dim oRPT As New ReportDocument
 
-        'MsgBox("Cultura: " & Threading.Thread.CurrentThread.CurrentUICulture.LCID.ToString)
+
 
         crViewer.SetProductLocale(Threading.Thread.CurrentThread.CurrentUICulture.LCID)
 

+ 1 - 8
frmIngresosConsulta.vb

@@ -59,14 +59,7 @@
     Private Sub Refrescar()
         ListaIngresos()
     End Sub
-    Private Sub ColorEstadosGrid()
-        For i = 0 To dgvIngresos.RowCount - 1
-            If Me.dgvIngresos.Rows(i).Cells("CodValidacion").Value = "V" _
-                And Me.dgvIngresos.Rows(i).Cells("Contab").Value = "N" Then
-                Me.dgvIngresos.Rows(i).DefaultCellStyle.BackColor = Color.Red
-            End If
-        Next
-    End Sub
+
 
     Private Sub chkDesde_CheckedChanged(sender As Object, e As EventArgs) Handles chkDesde.CheckedChanged
         Refrescar()

+ 9 - 28
frmInicio.vb

@@ -4,24 +4,11 @@
     Dim mousey As Integer
     Dim FormularioActivo As Form
 
-    Sub InicializarDisenioDeControles()
-        'Me.FormBorderStyle = FormBorderStyle.None
-        'Me.pnlCuerpo.Dock = DockStyle.Fill
-    End Sub
+
 
 
     Sub FormularioHijo(frmHijo As Form)
-        'If Me.pnlCuerpo.Controls.Count > 0 Then
-        '    Me.pnlCuerpo.Controls.RemoveAt(0)
-        'End If
-        'frmHijo.TopLevel = False
-        ''frmHijo.FormBorderStyle = FormBorderStyle.None
-        'frmHijo.Dock = DockStyle.Fill
-        'Me.pnlCuerpo.Controls.Add(frmHijo)
-        'Me.pnlCuerpo.Tag = frmHijo
-        'frmHijo.FormBorderStyle = FormBorderStyle.None
-        'frmHijo.BackColor = System.Drawing.Color.WhiteSmoke
-        'frmHijo.Show()
+
         frmHijo.MdiParent = Me
         frmHijo.Show()
     End Sub
@@ -41,12 +28,8 @@
     End Sub
 
     Private Sub frmInicio_Load(sender As Object, e As EventArgs) Handles MyBase.Load
-        InicializarDisenioDeControles()
-        'FormularioHijo(frmDashboards)
-        'frmDashboards_tmp.MdiParent = Me
-        'frmDashboards.WindowState = FormWindowState.Maximized
-        'frmDashboards.FormBorderStyle = FormBorderStyle.FixedToolWindow
-        'frmDashboards_tmp.Show()
+
+
 
     End Sub
 
@@ -67,23 +50,21 @@
     End Sub
 
     Private Sub pnlEncabezado_DoubleClick(sender As Object, e As EventArgs)
-        'Me.WindowState = FormWindowState.Normal
+
     End Sub
 
 
 
     Private Sub btnInicio_Click(sender As Object, e As EventArgs)
-        'FormularioHijo(frmDashboards_tmp)
+
     End Sub
 
     Private Sub btnInverntario_Click(sender As Object, e As EventArgs) Handles btnInverntario.Click
-        'FormularioHijo(frmInversiones_Buscar)
-        'Me.FormularioActivo = frmINV
-        'Aplicacion.FormularioHijo(FormularioActivo)
+
     End Sub
 
     Private Sub btnDisponibilidades_Click(sender As Object, e As EventArgs) Handles btnDisponibilidades.Click
-        'FormularioHijo(frmDisponibilidades)
+
     End Sub
 
     Private Sub PictureBox3_Click(sender As Object, e As EventArgs)
@@ -97,7 +78,7 @@
     End Sub
 
     Private Sub btnInicio_Click_1(sender As Object, e As EventArgs) Handles btnInicio.Click
-        'FormularioHijo(frmDashboards)
+
     End Sub
 
     Private Sub pnlCuerpo_Paint(sender As Object, e As PaintEventArgs)

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 326 - 411
frmPIN.designer.vb


+ 24 - 18
frmPIN.resx

@@ -133,6 +133,12 @@
   <metadata name="PIN0BindingSource4.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>202, 95</value>
   </metadata>
+  <metadata name="PIN0BindingSource4.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>202, 95</value>
+  </metadata>
+  <metadata name="InversionesDEVDataSet5.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 95</value>
+  </metadata>
   <metadata name="InversionesDEVDataSet5.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 95</value>
   </metadata>
@@ -185,15 +191,15 @@
   <data name="navNuevo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHbSURBVDhPnZE7TNtQFIZdhnblsbB2LRtzJ0BMQIdOqRMe
-        IcjEIJZ0rreiqqoqpE5loagJbUAIR0jAilQgCsI8TIiSQB6ggA1O4jTxQ0E5+F4lgUQYRfzSp6Njn/td
-        +14CJcN9b07ys60J7kdH4nixg+e9L/GLRhIOz7zKHk63ZEJfX8cC74r5IDNIO6f81BglOuyUOFqH3YAa
-        nkhZLfZNLEhufWuVg1/6tJ0e0AMDoHMfQFUkULX/puQLMiAJFlz4P7dlA73KNNNV0g8mOrXtbtD2SIik
-        S6YgCUlSYlnwqy3HM2/03feg/XsLqr8fBEHQuWgKfrv/wArrq7K4tAwHsetaATowgfe2j404bjVDwq6x
-        52ggJhUhKioQMYiKapVYulgrqGTQNqqIGRlY3yoeCJ1L8HN2Dubn3VU8C14Ip2RzgZQr4E9FA/HrPPBn
-        l3B4Wkv8RmlMEEzlgYtewp4BqhVOrkwEtjrBcVICt+dv9QARqD+5yJoIrLWCyE0RQoJyj7Fz6ErFzxsS
-        7D9yjag/itddYyVWciT9UJCUS5hEuT7kUYHFMl7IGIK19Q088BSKmoOhoUm+vJQgAOCF8Qusy/UJnOMu
-        oJ0fcTWDpmndRjp8DMM0lRXPDUHcAct+a+v+ZunfAAAAAElFTkSuQmCC
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHdSURBVDhPnZFLTBpRFIanLtptxY1bt2Xn2lXbdOVj4YoO
+        +ADMyGjc0HXHlU3TGNOkq7qxRrTFpumQJrZbEx8E4/gYkQCWhwac0QGGwjyC4Tj3BqgQpyH9ky8nZ+bc
+        787cS6DkuYXHaX7RkuI+WFMn61ae9z/EL9pJNPr+UeHoTWc+8q4nERqqlMLMCO2ZCVITlOh2UqKrBacB
+        NTaVsducm1iQ3p63yOG3/druc9BDg6BzL0FVJFC1P6aUyjIgCRZcBOe6CqEXyizztKofTvVqO89A2ych
+        lquagiQkSYk1waeuIs880feGQdvqAzU4AIIg6Fw8Ayu+z/CdDTRY//oNDhNXzQJ0YALv754Yd99ohoTd
+        YM/RQEKqQFxUIGYQF9UGiVylWVDPiMOliHkZ2MAPPBA5l+Dj4hIsL/sarK75IZqRzQVSsYw/FQ0kr0rA
+        /87C0VkzyWulPUE4UwIunoV9A1TrnF6aCBwtgpO0BL7VL40DRKD+9KJgIrA3C2LXFYgIyl+MnSOXKn7e
+        luDgnmtE/XGy5RrrsZPjubuCtFzFpGr1LvcKbLbJct4QbPz8hQf+haIWYXR0mq8tJQgAeGD8Auv1vgbP
+        pBdozytczaBpWneQ7gDDMB01xf+GIG4BtKJr5IW+zUQAAAAASUVORK5CYII=
 </value>
   </data>
   <data name="navModificar.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -214,15 +220,15 @@
   <data name="navEliminar.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGzSURBVDhPlZM7S8NQGIZT0/4AF3HwVnAQwamlm1TrZfMH
-        KC6iiJODQ0UXN0Gtgw2hUycXHeygFBWEqIsguDi4eSlISpvWXtN7+3q+0NRqW6sfPCQczvvk+84hXLV6
-        GBaGrQ0DjA5GQ1kymUxckqRyqVRCM3K5HARBOGB7m0psFE6n01BVtUYikUAsFkMoFNIkwWAQoig2SAwM
-        G23IZrPI5/Pak0ilUojH4wiHw5qAdQn6iMfj0SVa1QQU1iEBBZLJJBRF+TYOQZlq9ktQLBZrG+id5tZH
-        iUQiWieyLLcW/KReQp3QeUSj0b8LCF1C49CZkIjW/ywgCoWCdi4kIWjtXwLq4u3EjbuFYVxNmHAz1w/B
-        ZhB/FVBIJ+AT8OgcRda/j8rTBdSjNUj2kfLlmHG1rYDav50fRIaF4Z4B1juBbTOU3TH4x/mXloJ6CbVd
-        efChvmJb3dhyGCs1gcvlqjSTENezfUh7FwEWyjk5fDACKzwupvh3ElBZ2fWorX6m1+M93C8PQV43I7xh
-        wvOSAVd2Y/l8smOzmud6GVYGXU1TvNNd4qmDl6ntMzsfOhzldziO4z4B5l6DPKpAaFMAAAAASUVORK5C
-        YII=
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGySURBVDhPlZM7S0JhGMePHv0ALdHQTWiIoElxE80uWx+g
+        aIkimhoajFqaDCoa8nBwcmqpIYdCKgisliBoaWjrIsQRb3k93vXf+xw8ZqlpD/w4h5f3/zvP874crlb9
+        DCPD3IFhhpbRVMZsNpvw+/2VcrmMVuTzeQiCcMj2tpSYKZzJZCDLcp1kMol4PI5QKKRIgsEgRFFskmgY
+        ZtqQy+VQKBSUJ5FOp5FIJBAOhxUB6xL0EbfbrUqUqgsorEICCqRSKUQikR/jEJSpZb8FpVKpvoHeaW51
+        lGg0qnQiSVJ7wW8aJdQJnUcsFuteQKgSGofOhES03rWAKBaLyrmQhKC1fwmoi/dTF+4Xx3A9qcft/BAE
+        s0b8U0AhlYBXwJPDgpzvANXnS8jH6/BbxytXNt1aRwG1f7cwgiwLwzULbPQAOwZE9mzwTfCvbQWNEmq7
+        +uhFY8W3+7Bt11XrAqfTWW0lIW7mBpHxLAEslHdw+GQEVnlcTvMfJKAyseuR2/1Mbyf7eFgZhbRhQHhT
+        j5dlDa6tusrFlHarlucGGCYGXU1LPDO94pmdl6jtcysfOrLwuxzHcV/XMYMnvM3l1gAAAABJRU5ErkJg
+        gg==
 </value>
   </data>
   <data name="navEliminarRegistro.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 78 - 415
frmPIN.vb


+ 106 - 100
frmPrincipal.Designer.vb

@@ -28,15 +28,6 @@ Partial Class frmPrincipal
         Me.ToolTip = New System.Windows.Forms.ToolTip(Me.components)
         Me.PanelMenu = New System.Windows.Forms.Panel()
         Me.mnuPrincipal = New System.Windows.Forms.MenuStrip()
-        Me.lblInversionesTXT = New System.Windows.Forms.Label()
-        Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
-        Me.pnlPrincipal = New System.Windows.Forms.Panel()
-        Me.lblTitulo = New System.Windows.Forms.Label()
-        Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
-        Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
-        Me.ToolStrip = New System.Windows.Forms.ToolStrip()
-        Me.MenuStrip = New System.Windows.Forms.MenuStrip()
-        Me.Button1 = New System.Windows.Forms.Button()
         Me.mnuInicio = New System.Windows.Forms.ToolStripMenuItem()
         Me.mnuPropuestas = New System.Windows.Forms.ToolStripMenuItem()
         Me.mnuInversiones = New System.Windows.Forms.ToolStripMenuItem()
@@ -62,17 +53,26 @@ Partial Class frmPrincipal
         Me.FToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
         Me.ArbitrajeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
         Me.picLogo = New System.Windows.Forms.PictureBox()
+        Me.lblInversionesTXT = New System.Windows.Forms.Label()
+        Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
+        Me.pnlPrincipal = New System.Windows.Forms.Panel()
+        Me.Button1 = New System.Windows.Forms.Button()
+        Me.lblTitulo = New System.Windows.Forms.Label()
+        Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
+        Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
+        Me.ToolStrip = New System.Windows.Forms.ToolStrip()
         Me.NewToolStripButton = New System.Windows.Forms.ToolStripButton()
         Me.OpenToolStripButton = New System.Windows.Forms.ToolStripButton()
         Me.SaveToolStripButton = New System.Windows.Forms.ToolStripButton()
         Me.PrintToolStripButton = New System.Windows.Forms.ToolStripButton()
         Me.PrintPreviewToolStripButton = New System.Windows.Forms.ToolStripButton()
         Me.HelpToolStripButton = New System.Windows.Forms.ToolStripButton()
+        Me.MenuStrip = New System.Windows.Forms.MenuStrip()
         Me.PanelMenu.SuspendLayout()
         Me.mnuPrincipal.SuspendLayout()
+        CType(Me.picLogo, System.ComponentModel.ISupportInitialize).BeginInit()
         Me.pnlPrincipal.SuspendLayout()
         Me.ToolStrip.SuspendLayout()
-        CType(Me.picLogo, System.ComponentModel.ISupportInitialize).BeginInit()
         Me.SuspendLayout()
         '
         'PanelMenu
@@ -103,95 +103,6 @@ Partial Class frmPrincipal
         Me.mnuPrincipal.TabIndex = 15
         Me.mnuPrincipal.Text = "MenuStrip1"
         '
-        'lblInversionesTXT
-        '
-        Me.lblInversionesTXT.AutoSize = True
-        Me.lblInversionesTXT.Font = New System.Drawing.Font("Century Gothic", 12.0!, System.Drawing.FontStyle.Bold)
-        Me.lblInversionesTXT.ForeColor = System.Drawing.Color.White
-        Me.lblInversionesTXT.ImeMode = System.Windows.Forms.ImeMode.NoControl
-        Me.lblInversionesTXT.Location = New System.Drawing.Point(76, 101)
-        Me.lblInversionesTXT.Name = "lblInversionesTXT"
-        Me.lblInversionesTXT.Size = New System.Drawing.Size(93, 19)
-        Me.lblInversionesTXT.TabIndex = 5
-        Me.lblInversionesTXT.Text = "Inversiones"
-        '
-        'StatusStrip1
-        '
-        Me.StatusStrip1.Location = New System.Drawing.Point(254, 704)
-        Me.StatusStrip1.Name = "StatusStrip1"
-        Me.StatusStrip1.Size = New System.Drawing.Size(1116, 22)
-        Me.StatusStrip1.TabIndex = 12
-        Me.StatusStrip1.Text = "StatusStrip1"
-        '
-        'pnlPrincipal
-        '
-        Me.pnlPrincipal.BackColor = System.Drawing.Color.White
-        Me.pnlPrincipal.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
-        Me.pnlPrincipal.Controls.Add(Me.Button1)
-        Me.pnlPrincipal.Controls.Add(Me.lblTitulo)
-        Me.pnlPrincipal.Dock = System.Windows.Forms.DockStyle.Fill
-        Me.pnlPrincipal.Location = New System.Drawing.Point(254, 49)
-        Me.pnlPrincipal.Margin = New System.Windows.Forms.Padding(3, 15, 3, 3)
-        Me.pnlPrincipal.Name = "pnlPrincipal"
-        Me.pnlPrincipal.Padding = New System.Windows.Forms.Padding(0, 50, 0, 0)
-        Me.pnlPrincipal.Size = New System.Drawing.Size(1116, 655)
-        Me.pnlPrincipal.TabIndex = 14
-        '
-        'lblTitulo
-        '
-        Me.lblTitulo.BackColor = System.Drawing.Color.White
-        Me.lblTitulo.Dock = System.Windows.Forms.DockStyle.Top
-        Me.lblTitulo.Font = New System.Drawing.Font("Century Gothic", 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
-        Me.lblTitulo.ForeColor = System.Drawing.Color.FromArgb(CType(CType(21, Byte), Integer), CType(CType(37, Byte), Integer), CType(CType(60, Byte), Integer))
-        Me.lblTitulo.ImageAlign = System.Drawing.ContentAlignment.TopCenter
-        Me.lblTitulo.Location = New System.Drawing.Point(0, 50)
-        Me.lblTitulo.Name = "lblTitulo"
-        Me.lblTitulo.RightToLeft = System.Windows.Forms.RightToLeft.Yes
-        Me.lblTitulo.Size = New System.Drawing.Size(1116, 33)
-        Me.lblTitulo.TabIndex = 2
-        Me.lblTitulo.Text = "SISTEMA DE INVERSIONES INVERLEC"
-        Me.lblTitulo.TextAlign = System.Drawing.ContentAlignment.TopCenter
-        '
-        'ToolStripSeparator1
-        '
-        Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
-        Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
-        '
-        'ToolStripSeparator2
-        '
-        Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
-        Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25)
-        '
-        'ToolStrip
-        '
-        Me.ToolStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewToolStripButton, Me.OpenToolStripButton, Me.SaveToolStripButton, Me.ToolStripSeparator1, Me.PrintToolStripButton, Me.PrintPreviewToolStripButton, Me.ToolStripSeparator2, Me.HelpToolStripButton})
-        Me.ToolStrip.Location = New System.Drawing.Point(0, 24)
-        Me.ToolStrip.Name = "ToolStrip"
-        Me.ToolStrip.Size = New System.Drawing.Size(1370, 25)
-        Me.ToolStrip.TabIndex = 6
-        Me.ToolStrip.Text = "ToolStrip"
-        '
-        'MenuStrip
-        '
-        Me.MenuStrip.BackColor = System.Drawing.Color.FromArgb(CType(CType(35, Byte), Integer), CType(CType(39, Byte), Integer), CType(CType(45, Byte), Integer))
-        Me.MenuStrip.Location = New System.Drawing.Point(0, 0)
-        Me.MenuStrip.Name = "MenuStrip"
-        Me.MenuStrip.Size = New System.Drawing.Size(1370, 24)
-        Me.MenuStrip.TabIndex = 5
-        Me.MenuStrip.Text = "MenuStrip"
-        '
-        'Button1
-        '
-        Me.Button1.BackColor = System.Drawing.Color.Transparent
-        Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
-        Me.Button1.Location = New System.Drawing.Point(6, 3)
-        Me.Button1.Name = "Button1"
-        Me.Button1.Size = New System.Drawing.Size(50, 35)
-        Me.Button1.TabIndex = 14
-        Me.Button1.Text = "≡"
-        Me.Button1.TextAlign = System.Drawing.ContentAlignment.TopCenter
-        Me.Button1.UseVisualStyleBackColor = False
-        '
         'mnuInicio
         '
         Me.mnuInicio.AutoSize = False
@@ -249,6 +160,7 @@ Partial Class frmPrincipal
         Me.mnuIngresos.Text = "  Ingresos"
         Me.mnuIngresos.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
         Me.mnuIngresos.ToolTipText = "Ingresos"
+        Me.mnuIngresos.Visible = False
         '
         'mnuIngresosDashboards
         '
@@ -275,6 +187,7 @@ Partial Class frmPrincipal
         Me.mnuDisponibilidades.Text = "   Disponibilidades"
         Me.mnuDisponibilidades.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
         Me.mnuDisponibilidades.ToolTipText = "Disponibilidades"
+        Me.mnuDisponibilidades.Visible = False
         '
         'mnuPresupuesto
         '
@@ -289,6 +202,7 @@ Partial Class frmPrincipal
         Me.mnuPresupuesto.Text = "   Presupuesto"
         Me.mnuPresupuesto.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
         Me.mnuPresupuesto.ToolTipText = "Presupuesto"
+        Me.mnuPresupuesto.Visible = False
         '
         'mnuInformes
         '
@@ -303,6 +217,7 @@ Partial Class frmPrincipal
         Me.mnuInformes.Text = "  Informes"
         Me.mnuInformes.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
         Me.mnuInformes.ToolTipText = "Informes"
+        Me.mnuInformes.Visible = False
         '
         'mnuConfiguracion
         '
@@ -317,6 +232,7 @@ Partial Class frmPrincipal
         Me.mnuConfiguracion.Text = "  Configuración"
         Me.mnuConfiguracion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
         Me.mnuConfiguracion.ToolTipText = "Configuración"
+        Me.mnuConfiguracion.Visible = False
         '
         'mnuCalificadoras
         '
@@ -407,6 +323,7 @@ Partial Class frmPrincipal
         Me.FToolStripMenuItem.Size = New System.Drawing.Size(250, 40)
         Me.FToolStripMenuItem.Text = "  Costos Financieros"
         Me.FToolStripMenuItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
+        Me.FToolStripMenuItem.Visible = False
         '
         'ArbitrajeToolStripMenuItem
         '
@@ -431,6 +348,86 @@ Partial Class frmPrincipal
         Me.picLogo.TabIndex = 0
         Me.picLogo.TabStop = False
         '
+        'lblInversionesTXT
+        '
+        Me.lblInversionesTXT.AutoSize = True
+        Me.lblInversionesTXT.Font = New System.Drawing.Font("Century Gothic", 12.0!, System.Drawing.FontStyle.Bold)
+        Me.lblInversionesTXT.ForeColor = System.Drawing.Color.White
+        Me.lblInversionesTXT.ImeMode = System.Windows.Forms.ImeMode.NoControl
+        Me.lblInversionesTXT.Location = New System.Drawing.Point(76, 101)
+        Me.lblInversionesTXT.Name = "lblInversionesTXT"
+        Me.lblInversionesTXT.Size = New System.Drawing.Size(93, 19)
+        Me.lblInversionesTXT.TabIndex = 5
+        Me.lblInversionesTXT.Text = "Inversiones"
+        '
+        'StatusStrip1
+        '
+        Me.StatusStrip1.Location = New System.Drawing.Point(254, 704)
+        Me.StatusStrip1.Name = "StatusStrip1"
+        Me.StatusStrip1.Size = New System.Drawing.Size(1116, 22)
+        Me.StatusStrip1.TabIndex = 12
+        Me.StatusStrip1.Text = "StatusStrip1"
+        '
+        'pnlPrincipal
+        '
+        Me.pnlPrincipal.BackColor = System.Drawing.Color.White
+        Me.pnlPrincipal.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
+        Me.pnlPrincipal.Controls.Add(Me.Button1)
+        Me.pnlPrincipal.Controls.Add(Me.lblTitulo)
+        Me.pnlPrincipal.Dock = System.Windows.Forms.DockStyle.Fill
+        Me.pnlPrincipal.Location = New System.Drawing.Point(254, 49)
+        Me.pnlPrincipal.Margin = New System.Windows.Forms.Padding(3, 15, 3, 3)
+        Me.pnlPrincipal.Name = "pnlPrincipal"
+        Me.pnlPrincipal.Padding = New System.Windows.Forms.Padding(0, 50, 0, 0)
+        Me.pnlPrincipal.Size = New System.Drawing.Size(1116, 655)
+        Me.pnlPrincipal.TabIndex = 14
+        '
+        'Button1
+        '
+        Me.Button1.BackColor = System.Drawing.Color.Transparent
+        Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
+        Me.Button1.Location = New System.Drawing.Point(6, 3)
+        Me.Button1.Name = "Button1"
+        Me.Button1.Size = New System.Drawing.Size(50, 35)
+        Me.Button1.TabIndex = 14
+        Me.Button1.Text = "≡"
+        Me.Button1.TextAlign = System.Drawing.ContentAlignment.TopCenter
+        Me.Button1.UseVisualStyleBackColor = False
+        '
+        'lblTitulo
+        '
+        Me.lblTitulo.BackColor = System.Drawing.Color.White
+        Me.lblTitulo.Dock = System.Windows.Forms.DockStyle.Top
+        Me.lblTitulo.Font = New System.Drawing.Font("Century Gothic", 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
+        Me.lblTitulo.ForeColor = System.Drawing.Color.FromArgb(CType(CType(21, Byte), Integer), CType(CType(37, Byte), Integer), CType(CType(60, Byte), Integer))
+        Me.lblTitulo.ImageAlign = System.Drawing.ContentAlignment.TopCenter
+        Me.lblTitulo.Location = New System.Drawing.Point(0, 50)
+        Me.lblTitulo.Name = "lblTitulo"
+        Me.lblTitulo.RightToLeft = System.Windows.Forms.RightToLeft.Yes
+        Me.lblTitulo.Size = New System.Drawing.Size(1116, 33)
+        Me.lblTitulo.TabIndex = 2
+        Me.lblTitulo.Text = "SISTEMA DE INVERSIONES INVERLEC"
+        Me.lblTitulo.TextAlign = System.Drawing.ContentAlignment.TopCenter
+        '
+        'ToolStripSeparator1
+        '
+        Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
+        Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
+        '
+        'ToolStripSeparator2
+        '
+        Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
+        Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25)
+        '
+        'ToolStrip
+        '
+        Me.ToolStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewToolStripButton, Me.OpenToolStripButton, Me.SaveToolStripButton, Me.ToolStripSeparator1, Me.PrintToolStripButton, Me.PrintPreviewToolStripButton, Me.ToolStripSeparator2, Me.HelpToolStripButton})
+        Me.ToolStrip.Location = New System.Drawing.Point(0, 24)
+        Me.ToolStrip.Name = "ToolStrip"
+        Me.ToolStrip.Size = New System.Drawing.Size(1370, 25)
+        Me.ToolStrip.TabIndex = 6
+        Me.ToolStrip.Text = "ToolStrip"
+        '
         'NewToolStripButton
         '
         Me.NewToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
@@ -485,6 +482,15 @@ Partial Class frmPrincipal
         Me.HelpToolStripButton.Size = New System.Drawing.Size(23, 22)
         Me.HelpToolStripButton.Text = "Ayuda"
         '
+        'MenuStrip
+        '
+        Me.MenuStrip.BackColor = System.Drawing.Color.FromArgb(CType(CType(35, Byte), Integer), CType(CType(39, Byte), Integer), CType(CType(45, Byte), Integer))
+        Me.MenuStrip.Location = New System.Drawing.Point(0, 0)
+        Me.MenuStrip.Name = "MenuStrip"
+        Me.MenuStrip.Size = New System.Drawing.Size(1370, 24)
+        Me.MenuStrip.TabIndex = 5
+        Me.MenuStrip.Text = "MenuStrip"
+        '
         'frmPrincipal
         '
         Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -505,10 +511,10 @@ Partial Class frmPrincipal
         Me.PanelMenu.PerformLayout()
         Me.mnuPrincipal.ResumeLayout(False)
         Me.mnuPrincipal.PerformLayout()
+        CType(Me.picLogo, System.ComponentModel.ISupportInitialize).EndInit()
         Me.pnlPrincipal.ResumeLayout(False)
         Me.ToolStrip.ResumeLayout(False)
         Me.ToolStrip.PerformLayout()
-        CType(Me.picLogo, System.ComponentModel.ISupportInitialize).EndInit()
         Me.ResumeLayout(False)
         Me.PerformLayout()
 

+ 9 - 12
frmPrincipal.resx

@@ -123,18 +123,6 @@
   <metadata name="mnuPrincipal.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>660, 17</value>
   </metadata>
-  <metadata name="mnuPrincipal.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>660, 17</value>
-  </metadata>
-  <metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>428, 17</value>
-  </metadata>
-  <metadata name="ToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>125, 17</value>
-  </metadata>
-  <metadata name="MenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="picLogo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
@@ -626,6 +614,12 @@
         RERERET1tGGT/w9rzhbMxHU7wwAAAABJRU5ErkJggg==
 </value>
   </data>
+  <metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>428, 17</value>
+  </metadata>
+  <metadata name="ToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>125, 17</value>
+  </metadata>
   <data name="NewToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -716,6 +710,9 @@
         1W6KlE7inrYTcS2Xq5EZ3H9UhUxlY2gyKMAi0R+3BHAuvd7mVQAAAABJRU5ErkJggg==
 </value>
   </data>
+  <metadata name="MenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
   <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>52</value>
   </metadata>

+ 1 - 2
frmPrincipal.vb

@@ -95,7 +95,7 @@ Public Class frmPrincipal
         Me.ToolStrip.Visible = False
 
         Me.mnuPrincipal.Renderer = New MenuPrincipalRender()
-        ''inicio()
+
 
     End Sub
 
@@ -108,7 +108,6 @@ Public Class frmPrincipal
 
 
         frmPortafolio.WindowState = FormWindowState.Normal
-        'frmPortafolio.FormBorderStyle = FormBorderStyle.None
         frmPortafolio.Dock = DockStyle.Fill
         frmPortafolio.Show()
         Me.Focus()

+ 1 - 3
frmReqPago.vb

@@ -63,9 +63,7 @@ Public Class frmReqPago
         CargarCodigo()
 
         inicializar()
-        'If TipoEstado = "Lista" Then
-        'Me.RPAGTableAdapter.Fill(Me.InversionesDataSet1.RPAG)
-        'End If
+
 
 
         If RequisicionDePagoDAO.ExisteRequisicion(CodigoInv) Then

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů