diff --git a/Site.master.vb b/Site.master.vb index 9e2ae8cb7..7747f4046 100644 --- a/Site.master.vb +++ b/Site.master.vb @@ -509,20 +509,20 @@ Partial Class Site End Sub Private Function GetTipoCambio() As TipoCambioActual - Dim Retorno As TipoCambioActual = Nothing + 'Dim Retorno As TipoCambioActual - 'sino existe el dato, lo carga por ser la primera vez + Dim TCT As Decimal = 0 Dim ObjGenerales As ClsGenerales = New ClsGenerales - If ObjGenerales.GetTipoCambio(-1, DateTime.Today) And ObjGenerales.DtResultados.Rows.Count > 0 Then - 'lblTipoCambio.Text = String.Format(" | TC {0:C4}", ObjGenerales.DtResultados(0)("TipoCambio").ToString().ToDecimal()) + If ObjGenerales.GetTipoCambio(-1, DateTime.Today) Then + If ObjGenerales.DtResultados.Rows.Count > 0 Then - Retorno = New TipoCambioActual With {.Fecha = DateTime.Today, .TipoCambio = ObjGenerales.DtResultados(0)("TipoCambio").ToString().ToDecimal()} + TCT = ObjGenerales.DtResultados(0)("TipoCambio").ToString().ToDecimal() End If End If ObjGenerales.Dispose() - Return Retorno + Return New TipoCambioActual With {.Fecha = DateTime.Today, .TipoCambio = TCT} End Function