From 09da35b9ebe3e9d665e951fbda97106b165def38 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 4 Apr 2020 22:20:30 -0700 Subject: [PATCH] - tipo de dato Decimal --- App_Code/ClsContabilidad.vb | 58 ++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 85eb0934c..d394db9b6 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -111,40 +111,40 @@ Public Class ClsContabilidad If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc Data = New DataTable End Sub -#Region "Conexiones" +#Region "Conexiones" - Private Sub ConexionAdd() - If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + Private Sub ConexionAdd() + If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try DataAdapter("PA_Sis_RegistrarConexion") With SqlAdapter.SelectCommand.Parameters .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output - End With - SqlAdapter.Fill(Data) - CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero - Catch ex As Exception - OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - End If - End Sub - - Private Sub ConexionClose() - If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then - - DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) - - Try - SqlAdapter.Fill(Data) - - Catch ex As Exception - OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - CveConexion = 0 - End If - + End With + SqlAdapter.Fill(Data) + CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero + Catch ex As Exception + OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + End If + End Sub + + Private Sub ConexionClose() + If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + + DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) + + Try + SqlAdapter.Fill(Data) + + Catch ex As Exception + OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + CveConexion = 0 + End If + End Sub #End Region @@ -866,8 +866,8 @@ Public Class ClsContabilidad .Add("@Importe", SqlDbType.Money).Value = If(CveConceptoContable = 30, Importe, Math.Round(Importe, 2)) .Add("@ImporteMX", SqlDbType.Money).Value = Math.Round(ImporteMX, 2) .Add("@ImporteME", SqlDbType.Money).Value = Math.Round(ImporteME, 3) - .Add("@TC", SqlDbType.Float).Value = TipoCambio - .Add("@TCPago", SqlDbType.Float).Value = TipoCambioPago + .Add("@TC", SqlDbType.Decimal).Value = TipoCambio + .Add("@TCPago", SqlDbType.Decimal).Value = TipoCambioPago .Add("@Referencia", SqlDbType.VarChar).Value = Referencia .Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable .Add("@Concepto", SqlDbType.VarChar).Value = Concepto