Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -75,7 +75,7 @@ Public Class ClsAC
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -98,7 +98,7 @@ Public Class ClsAC
|
||||
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
|
||||
|
||||
@@ -70,7 +70,7 @@ Public Class ClsAC2
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -93,7 +93,7 @@ Public Class ClsAC2
|
||||
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
|
||||
|
||||
@@ -117,7 +117,7 @@ Public Class ClsAF
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -140,7 +140,7 @@ Public Class ClsAF
|
||||
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
|
||||
|
||||
@@ -83,7 +83,7 @@ Public Class ClsAIMMGM
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -106,7 +106,7 @@ Public Class ClsAIMMGM
|
||||
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
|
||||
|
||||
@@ -68,7 +68,7 @@ Public Class ClsAcarreos
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -91,7 +91,7 @@ Public Class ClsAcarreos
|
||||
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
|
||||
|
||||
@@ -75,7 +75,7 @@ Public Class ClsAcumuladores
|
||||
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -98,7 +98,7 @@ Public Class ClsAcumuladores
|
||||
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
|
||||
|
||||
@@ -211,7 +211,7 @@ Public Class ClsBancos
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -234,7 +234,7 @@ Public Class ClsBancos
|
||||
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
|
||||
|
||||
@@ -114,7 +114,7 @@ Public Class ClsBase
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -137,7 +137,7 @@ Public Class ClsBase
|
||||
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
|
||||
|
||||
@@ -76,7 +76,7 @@ Public Class ClsCGame
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -99,7 +99,7 @@ Public Class ClsCGame
|
||||
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
|
||||
|
||||
@@ -72,7 +72,7 @@ Public Class ClsCRM
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -95,7 +95,7 @@ Public Class ClsCRM
|
||||
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
|
||||
|
||||
@@ -86,7 +86,7 @@ Public Class ClsClaseBase
|
||||
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -109,7 +109,7 @@ Public Class ClsClaseBase
|
||||
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
|
||||
|
||||
@@ -72,7 +72,7 @@ Public Class ClsClasificaciones
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -95,7 +95,7 @@ Public Class ClsClasificaciones
|
||||
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
|
||||
|
||||
@@ -207,7 +207,7 @@ Public Class ClsClientes
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -230,7 +230,7 @@ Public Class ClsClientes
|
||||
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
|
||||
|
||||
@@ -69,7 +69,7 @@ Public Class ClsCompEstatusFactura
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -92,7 +92,7 @@ Public Class ClsCompEstatusFactura
|
||||
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
|
||||
|
||||
@@ -192,7 +192,7 @@ Public Class ClsCompProveedores
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -215,7 +215,7 @@ Public Class ClsCompProveedores
|
||||
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
|
||||
|
||||
@@ -88,7 +88,7 @@ Public Class ClsCompras
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -111,7 +111,7 @@ Public Class ClsCompras
|
||||
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
|
||||
|
||||
@@ -66,7 +66,7 @@ Public Class ClsContPAQi
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
ConexionAdd()
|
||||
'ConexionAdd()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ Public Class ClsContPAQi
|
||||
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -9960,19 +9960,19 @@ Public Class ClsContPAQi
|
||||
Public Function FNC_GetCounter() As Boolean
|
||||
|
||||
Dim Retorno = False
|
||||
StrSQL.Clear()
|
||||
StrSQL.Append(" IF OBJECT_ID ('FNC_GetCounter') IS NOT NULL DROP FUNCTION FNC_GetCounter")
|
||||
SqlDataAdapter(StrSQL.ToString, CommandType.Text)
|
||||
'StrSQL.Clear()
|
||||
'StrSQL.Append(" IF OBJECT_ID ('FNC_GetCounter') IS NOT NULL DROP FUNCTION FNC_GetCounter")
|
||||
'SqlDataAdapter(StrSQL.ToString, CommandType.Text)
|
||||
|
||||
Try
|
||||
SqlAdapter.SelectCommand.ExecuteNonQuery()
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al eliminar la funcion FNC_GetCounter", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
'Try
|
||||
' SqlAdapter.SelectCommand.ExecuteNonQuery()
|
||||
'Catch ex As Exception
|
||||
' Me.OnError("Ocurrió un error al eliminar la funcion FNC_GetCounter", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
'End Try
|
||||
|
||||
|
||||
StrSQL.Clear()
|
||||
StrSQL.Append(" CREATE FUNCTION [dbo].[FNC_GetCounter] ")
|
||||
StrSQL.Append(" CREATE OR ALTER FUNCTION [dbo].[FNC_GetCounter] ")
|
||||
StrSQL.Append(" ( ")
|
||||
StrSQL.Append(" @TipoCounter VARCHAR(200) ")
|
||||
StrSQL.Append(" ) ")
|
||||
|
||||
@@ -56,7 +56,7 @@ Public Class ClsContPAQi2
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
ConexionAdd()
|
||||
'ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Sub New(Empresa As Empresa)
|
||||
@@ -73,7 +73,7 @@ Public Class ClsContPAQi2
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
ConexionAdd()
|
||||
'ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub SqlDataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -93,7 +93,7 @@ Public Class ClsContPAQi2
|
||||
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -1035,7 +1035,7 @@ Public Class ClsContPAQi2
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||
ConexionClose()
|
||||
'ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -119,7 +119,7 @@ Public Class ClsContabilidad
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -142,7 +142,7 @@ Public Class ClsContabilidad
|
||||
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
|
||||
|
||||
@@ -90,7 +90,7 @@ Public Class ClsContratos
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -113,7 +113,7 @@ Public Class ClsContratos
|
||||
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
|
||||
|
||||
@@ -68,7 +68,7 @@ Public Class ClsDG
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -91,7 +91,7 @@ Public Class ClsDG
|
||||
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
|
||||
|
||||
@@ -66,7 +66,7 @@ Public Class ClsDesarrollo
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -89,7 +89,7 @@ Public Class ClsDesarrollo
|
||||
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
|
||||
|
||||
@@ -39,7 +39,7 @@ Public Class ClsEdoc
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -62,7 +62,7 @@ Public Class ClsEdoc
|
||||
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
|
||||
|
||||
@@ -78,7 +78,7 @@ Public Class ClsEdocumentacion
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -101,7 +101,7 @@ Public Class ClsEdocumentacion
|
||||
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
|
||||
|
||||
@@ -66,7 +66,7 @@ Public Class ClsEdosFinancieros
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -89,7 +89,7 @@ Public Class ClsEdosFinancieros
|
||||
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
|
||||
|
||||
@@ -61,7 +61,7 @@ Public Class ClsEncuestas
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -84,7 +84,7 @@ Public Class ClsEncuestas
|
||||
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
|
||||
|
||||
@@ -83,7 +83,7 @@ Public Class ClsEsquemasComisiones
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -106,7 +106,7 @@ Public Class ClsEsquemasComisiones
|
||||
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
|
||||
|
||||
@@ -69,7 +69,7 @@ Public Class ClsEstatusFactura
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -92,7 +92,7 @@ Public Class ClsEstatusFactura
|
||||
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
|
||||
|
||||
@@ -77,7 +77,7 @@ Public Class ClsEventos
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -100,7 +100,7 @@ Public Class ClsEventos
|
||||
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
|
||||
|
||||
@@ -60,7 +60,7 @@ Public Class ClsFISConfiguracion
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -83,7 +83,7 @@ Public Class ClsFISConfiguracion
|
||||
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
|
||||
|
||||
@@ -145,7 +145,7 @@ Public Class ClsFinanzas
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -168,7 +168,7 @@ Public Class ClsFinanzas
|
||||
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
|
||||
|
||||
@@ -88,7 +88,7 @@ Public Class ClsFlotillas
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -111,7 +111,7 @@ Public Class ClsFlotillas
|
||||
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
|
||||
|
||||
@@ -83,7 +83,7 @@ Public Class ClsGPS
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -106,7 +106,7 @@ Public Class ClsGPS
|
||||
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
|
||||
|
||||
@@ -58,7 +58,7 @@ Public Class ClsGPSHerramientas
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -81,7 +81,7 @@ Public Class ClsGPSHerramientas
|
||||
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
|
||||
|
||||
@@ -96,7 +96,7 @@ Public Class ClsGenerales
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -119,7 +119,7 @@ Public Class ClsGenerales
|
||||
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
|
||||
|
||||
@@ -95,7 +95,7 @@ Public Class ClsGralFolios
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -118,7 +118,7 @@ Public Class ClsGralFolios
|
||||
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
|
||||
|
||||
@@ -70,7 +70,7 @@ Public Class ClsGralProductosServiciosCaracteristicas
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -93,7 +93,7 @@ Public Class ClsGralProductosServiciosCaracteristicas
|
||||
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
|
||||
|
||||
@@ -66,7 +66,7 @@ Public Class ClsImpuestos
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -89,7 +89,7 @@ Public Class ClsImpuestos
|
||||
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
|
||||
|
||||
@@ -70,7 +70,7 @@ Public Class ClsIndicadores
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -93,7 +93,7 @@ Public Class ClsIndicadores
|
||||
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
|
||||
|
||||
@@ -170,7 +170,7 @@ Public Class ClsInventarios
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -193,7 +193,7 @@ Public Class ClsInventarios
|
||||
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
|
||||
@@ -4663,6 +4663,55 @@ Public Class ClsInventarios
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddProductosServiciosAlmacenSeccion(CvePS As Integer, CveAlmacen As Integer, CveAlmacenSeccion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_ProductosServiciosAlmacenSeccionAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveAlmacenSeccion", SqlDbType.Int).Value = CveAlmacenSeccion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar el ps de la seccion de almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetProductosServiciosAlmacenSeccion(CvePS As Integer, CveAlmacen As Integer, CveAlmacenSeccion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_ProductosServiciosAlmacenSeccionGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveAlmacenSeccion", SqlDbType.Int).Value = CveAlmacenSeccion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el ps de la seccion de almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveProductosServiciosAlmacenSeccion(CvePSAlmacenSeccion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_ProductosServiciosAlmacenSeccionRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePSAlmacenSeccion", SqlDbType.Int).Value = CvePSAlmacenSeccion
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el ps de la seccion de almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -52,7 +52,7 @@ Public Class ClsLeyendasFiscales
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -75,7 +75,7 @@ Public Class ClsLeyendasFiscales
|
||||
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
|
||||
|
||||
@@ -66,7 +66,7 @@ Public Class ClsMF
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -89,7 +89,7 @@ Public Class ClsMF
|
||||
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
|
||||
|
||||
@@ -54,7 +54,7 @@ Public Class ClsMetodosPagos
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -77,7 +77,7 @@ Public Class ClsMetodosPagos
|
||||
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
|
||||
|
||||
@@ -164,7 +164,7 @@ Public Class ClsModulos
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -187,7 +187,7 @@ Public Class ClsModulos
|
||||
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
|
||||
|
||||
@@ -69,7 +69,7 @@ Public Class ClsMonedas
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -92,7 +92,7 @@ Public Class ClsMonedas
|
||||
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
|
||||
|
||||
@@ -64,7 +64,7 @@ Public Class ClsMovimientos
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -87,7 +87,7 @@ Public Class ClsMovimientos
|
||||
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
|
||||
|
||||
@@ -141,7 +141,7 @@ Public Class ClsNominas
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -164,7 +164,7 @@ Public Class ClsNominas
|
||||
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
|
||||
|
||||
@@ -190,7 +190,7 @@ Public Class ClsOC
|
||||
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("@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)
|
||||
@@ -206,14 +206,13 @@ Public Class ClsOC
|
||||
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)
|
||||
CveConexion = 0
|
||||
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
|
||||
|
||||
@@ -133,7 +133,7 @@ Public Class ClsOIEventos
|
||||
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("@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)
|
||||
@@ -149,14 +149,13 @@ Public Class ClsOIEventos
|
||||
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)
|
||||
CveConexion = 0
|
||||
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
|
||||
|
||||
@@ -122,7 +122,7 @@ Public Class ClsOS
|
||||
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("@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)
|
||||
@@ -138,14 +138,14 @@ Public Class ClsOS
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -88,7 +88,7 @@ Public Class ClsPV
|
||||
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("@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)
|
||||
@@ -104,14 +104,14 @@ Public Class ClsPV
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -91,7 +91,7 @@ Public Class ClsPresupuestos
|
||||
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("@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)
|
||||
@@ -107,14 +107,14 @@ Public Class ClsPresupuestos
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -170,7 +170,7 @@ Public Class ClsProductosServicios
|
||||
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("@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)
|
||||
@@ -186,14 +186,14 @@ Public Class ClsProductosServicios
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -72,7 +72,7 @@ Public Class ClsProsEncuestas
|
||||
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("@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)
|
||||
@@ -88,14 +88,14 @@ Public Class ClsProsEncuestas
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -185,7 +185,7 @@ Public Class ClsProspectos
|
||||
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("@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)
|
||||
@@ -201,14 +201,14 @@ Public Class ClsProspectos
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -78,7 +78,7 @@ Public Class ClsProyectos
|
||||
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("@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)
|
||||
@@ -94,14 +94,14 @@ Public Class ClsProyectos
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -71,7 +71,7 @@ Public Class ClsPruebasJJMQ
|
||||
SqlDataAdapter("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("@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)
|
||||
@@ -87,14 +87,14 @@ Public Class ClsPruebasJJMQ
|
||||
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
SqlDataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -108,7 +108,7 @@ Public Class ClsPuntoVenta
|
||||
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("@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)
|
||||
@@ -124,14 +124,14 @@ Public Class ClsPuntoVenta
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -86,7 +86,7 @@ Public Class ClsRH
|
||||
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("@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)
|
||||
@@ -102,14 +102,14 @@ Public Class ClsRH
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -79,7 +79,7 @@ Public Class ClsRMA
|
||||
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("@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)
|
||||
@@ -95,14 +95,14 @@ Public Class ClsRMA
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -102,7 +102,7 @@ Public Class ClsSAT
|
||||
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("@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)
|
||||
@@ -118,14 +118,14 @@ Public Class ClsSAT
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -76,7 +76,7 @@ Public Class ClsSCTLicencias
|
||||
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("@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)
|
||||
@@ -92,14 +92,14 @@ Public Class ClsSCTLicencias
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -57,7 +57,7 @@ Public Class ClsSeguimiento
|
||||
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("@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)
|
||||
@@ -73,14 +73,14 @@ Public Class ClsSeguimiento
|
||||
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)
|
||||
CveConexion = 0
|
||||
|
||||
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
|
||||
|
||||
@@ -245,7 +245,7 @@ Public Class ClsSisEmpresas
|
||||
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("@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)
|
||||
@@ -253,7 +253,6 @@ Public Class ClsSisEmpresas
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -261,13 +260,13 @@ Public Class ClsSisEmpresas
|
||||
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)
|
||||
CveConexion = 0
|
||||
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
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ Public Class ClsSisNotificaciones
|
||||
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("@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)
|
||||
@@ -131,13 +131,13 @@ Public Class ClsSisNotificaciones
|
||||
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)
|
||||
CveConexion = 0
|
||||
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
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ Public Class ClsSisParametros
|
||||
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("@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)
|
||||
@@ -121,13 +121,13 @@ Public Class ClsSisParametros
|
||||
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)
|
||||
CveConexion = 0
|
||||
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
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ Public Class ClsSisProcesos
|
||||
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("@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)
|
||||
@@ -113,13 +113,13 @@ Public Class ClsSisProcesos
|
||||
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)
|
||||
CveConexion = 0
|
||||
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
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ Public Class ClsSisRoles
|
||||
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("@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)
|
||||
@@ -91,13 +91,13 @@ Public Class ClsSisRoles
|
||||
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)
|
||||
CveConexion = 0
|
||||
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
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ Public Class ClsSisUsuarios
|
||||
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("@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)
|
||||
@@ -119,13 +119,13 @@ Public Class ClsSisUsuarios
|
||||
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)
|
||||
CveConexion = 0
|
||||
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
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ Public Class ClsStiReports
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -48,7 +50,7 @@ Public Class ClsStiReports
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -60,7 +62,44 @@ Public Class ClsStiReports
|
||||
'SqlAdapter.SelectCommand.CommandTimeout = 800
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
Try
|
||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||
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 Sub
|
||||
#End Region
|
||||
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
@@ -84,6 +123,7 @@ Public Class ClsStiReports
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,6 +17,8 @@ Public Class ClsSubProyectos
|
||||
Private Data As DataTable
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -46,7 +48,7 @@ Public Class ClsSubProyectos
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -57,6 +59,43 @@ Public Class ClsSubProyectos
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
Try
|
||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||
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 Sub
|
||||
#End Region
|
||||
|
||||
Public Function IniciaTransacSQL() As SqlTransaction
|
||||
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
|
||||
@@ -405,6 +444,7 @@ Public Class ClsSubProyectos
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -31,6 +31,8 @@ Public Class ClsSucursales
|
||||
Private _Estado As String
|
||||
Private _Pais As String
|
||||
Private _CP As Integer
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -112,7 +114,7 @@ Public Class ClsSucursales
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -123,6 +125,44 @@ Public Class ClsSucursales
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
Try
|
||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||
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 Sub
|
||||
#End Region
|
||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -334,6 +374,7 @@ Public Class ClsSucursales
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -28,6 +28,8 @@ Public Class ClsTemporal
|
||||
'Atributos de la clase
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -49,7 +51,7 @@ Public Class ClsTemporal
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -61,7 +63,44 @@ Public Class ClsTemporal
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
Try
|
||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||
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 Sub
|
||||
#End Region
|
||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -276,6 +315,7 @@ Public Class ClsTemporal
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -21,6 +21,8 @@ Public Class ClsTiposEventos
|
||||
'Atributos de la clase
|
||||
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -43,7 +45,7 @@ Public Class ClsTiposEventos
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
@@ -54,7 +56,44 @@ Public Class ClsTiposEventos
|
||||
End With
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
Try
|
||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||
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 Sub
|
||||
#End Region
|
||||
Public Function GetTiposEventos() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
@@ -169,6 +208,7 @@ Public Class ClsTiposEventos
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -17,6 +17,8 @@ Public Class ClsUnidadesMedida
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -40,7 +42,7 @@ Public Class ClsUnidadesMedida
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Public Function IniciaTransacSQL() As SqlTransaction
|
||||
@@ -70,7 +72,7 @@ Public Class ClsUnidadesMedida
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -81,7 +83,44 @@ Public Class ClsUnidadesMedida
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
Try
|
||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||
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 Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -288,6 +327,7 @@ Public Class ClsUnidadesMedida
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -112,7 +112,7 @@ Public Class ClsVentas
|
||||
DataAdapter("PA_Sis_RegistrarConexion")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = HttpContext.Current.Request.Url.AbsolutePath.ToString
|
||||
.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)
|
||||
@@ -135,7 +135,7 @@ Public Class ClsVentas
|
||||
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
|
||||
|
||||
@@ -20,6 +20,8 @@ Public Class ClsVtaPromociones
|
||||
|
||||
'Atributos de la clase
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'Cve de la conexion registrada
|
||||
Private CveConexion As Integer = 0
|
||||
|
||||
#End Region
|
||||
#Region "Propiedades"
|
||||
@@ -35,14 +37,58 @@ Public Class ClsVtaPromociones
|
||||
Sub New()
|
||||
SqlConexion = New SqlConnection
|
||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
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 Sub
|
||||
Private Sub DataAdapter(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
.Parameters.Clear()
|
||||
.CommandText = pStrSQL
|
||||
.CommandType = TipoComando
|
||||
End With
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#End Region
|
||||
Public Function GetVta_Promociones(Fecha As String, CveSucursal As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
@@ -116,6 +162,7 @@ Public Class ClsVtaPromociones
|
||||
' This code added by Visual Basic to correctly implement the disposable pattern.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
@@ -12,11 +12,13 @@ Public Class ClsVtaVendedores
|
||||
Private SqlTransacc As SqlTransaction
|
||||
Private SqlCommand As SqlCommand
|
||||
Private Data As DataTable
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Public ReadOnly Property DtResultados() As DataTable
|
||||
Get
|
||||
DtResultados = Data
|
||||
End Get
|
||||
@@ -33,7 +35,7 @@ Public Class ClsVtaVendedores
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
|
||||
End Try
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
|
||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
|
||||
@@ -53,7 +55,7 @@ Public Class ClsVtaVendedores
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
|
||||
ConexionAdd()
|
||||
End Sub
|
||||
Private Sub DataAdapter(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand
|
||||
@@ -65,6 +67,42 @@ Public Class ClsVtaVendedores
|
||||
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
|
||||
Data = New DataTable
|
||||
End Sub
|
||||
#Region "Conexiones"
|
||||
|
||||
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 Sub
|
||||
#End Region
|
||||
Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||
With SqlCommand
|
||||
.Parameters.Clear()
|
||||
@@ -242,8 +280,9 @@ Public Class ClsVtaVendedores
|
||||
#Region " IDisposable Support "
|
||||
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||
Dispose(True)
|
||||
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
|
||||
ConexionClose()
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -447,18 +447,7 @@ Namespace Modelos
|
||||
Private Sub IniciaValoresVentas()
|
||||
If CveVenta > 0 AndAlso CveEmpresa > 0 Then
|
||||
Me.DtAnticipos = New DataTable()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
'CARGA PROMOCIONES
|
||||
If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, Me.CveEmpresa) Then
|
||||
Me.DtPromociones = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
'CARGA FIRMAS
|
||||
If ObjVentas.GetVentasFirmas(CveVenta) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
DtFirmas = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
Me.DtAntNCVinculadas = New DataTable()
|
||||
Me.DtPagos = New DataTable()
|
||||
Me.DtRemisiones = New DataTable()
|
||||
Me.DtInventario = New DataTable()
|
||||
@@ -473,7 +462,48 @@ Namespace Modelos
|
||||
Me.DtImpuestosLocales = New DataTable()
|
||||
Me.DtOtrosConceptos = New DataTable()
|
||||
Me.CveContratoSecciones = ""
|
||||
'Me.DtInventario = DtDetalle.FiltraParametros("CveTipoPS = 2")
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
'CARGA PROMOCIONES
|
||||
If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, Me.CveEmpresa) Then
|
||||
Me.DtPromociones = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
'CARGA FIRMAS
|
||||
If ObjVentas.GetVentasFirmas(CveVenta) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Me.DtFirmas = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
|
||||
'CARGA ANTICIPOS
|
||||
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
|
||||
If TipoDocto.Contiene("Ing", "Ant", "Rem") Then
|
||||
'carga as notas de credito vinculadas
|
||||
If ObjVentas.GetVentasAntNC(CveVenta, -1) Then
|
||||
Me.DtAntNCVinculadas = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
|
||||
If TipoDocto.Contiene("Egs", "Dev", "Ant") Then
|
||||
If ObjVentas.GetVentasAntNC(-1, CveVenta) Then
|
||||
Me.DtNCVinculadas = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ObjVentas.GetVentaOtrosConceptos(UsuarioActual.CveEmpresa, CveVenta) Then
|
||||
Me.DtOtrosConceptos = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
'Dim ObjMovtos As New ClsMovimientos()
|
||||
'If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente, CveMoneda) Then
|
||||
' Me.DtAnticipos = ObjMovtos.DtResultados.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, "AND Tipo = 'Ant'", "")} {If(TipoDocto = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
'End If
|
||||
'ObjMovtos.Dispose()
|
||||
|
||||
If Me.RealizarDevolucionAlmacen Then
|
||||
Me.CveAlmacenDevolucion = Me.CveAlmacenDevolucionVenta
|
||||
@@ -1873,34 +1903,36 @@ Namespace Modelos
|
||||
|
||||
|
||||
Select Case ConceptoContable
|
||||
Case 1 'Cliente
|
||||
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then
|
||||
importeMovimiento = ((ObjFactura.Total - ObjFactura.TotalOtrosConceptos) * ValorMultiplicador)
|
||||
importeMX = (importeMovimiento * tipoCambio * Multiplicador)
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaComplementaria
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then
|
||||
importeMX = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta,
|
||||
CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento),
|
||||
TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
CveCuentaCliente = CveCuenta
|
||||
Case 1 'Cliente
|
||||
If Not ObjFactura.TipoDocto.Contiene("Egs", "Rem", "RNC") Then
|
||||
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
'If ObjFactura.TipoDocto.Contiene("Ant") Then
|
||||
' TipoMovimiento = Not TipoMovimiento 'lo contrario a ingreso, en este caso es anticipo
|
||||
'End If
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria
|
||||
CveCuenta = 0
|
||||
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then
|
||||
importeMX = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
CveCuentaCliente = CveCuenta
|
||||
End If
|
||||
|
||||
Case 3 'Cliente
|
||||
@@ -1948,79 +1980,80 @@ Namespace Modelos
|
||||
End If
|
||||
Case 277 'Remisión del cliente
|
||||
|
||||
If ObjFactura.TipoDocto = "RNC" Then
|
||||
importeMovimiento = ((ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador)
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
CveCuentaCliente = CveCuenta
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "RNC" Then
|
||||
importeMovimiento = (ObjFactura.Total - TotalOtrosConceptos) * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
IdCtaContableCliente = IdCtaContable
|
||||
CveCuentaCliente = CveCuenta
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
importeMovimiento = 0
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
|
||||
|
||||
Case 12 'Nota de Credito
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
importeMovimiento = (ObjFactura.Total * ValorMultiplicador)
|
||||
importeMX = (importeMovimiento * tipoCambio * Multiplicador).RoundSQL
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
Dim ImporteConcepto12 As Decimal = 0
|
||||
Dim ImporteAcumulado91 As Decimal = 0
|
||||
Dim CveUltimaVenta As Integer = 0
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
Else
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = 0
|
||||
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then
|
||||
importeMX = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
ImporteConcepto12 = importeMX.RoundSQL
|
||||
If importeMovimiento <> 0 Then
|
||||
If IdCtaContable <= 0 Then
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
End If
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
importeMovimiento = ObjFactura.Total * ValorMultiplicador
|
||||
importeMX = (importeMovimiento * tipoCambio * Multiplicador).RoundSQL
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
Dim ImporteConcepto12 As Decimal = 0
|
||||
Dim ImporteAcumulado91 As Decimal = 0
|
||||
Dim CveUltimaVenta As Integer = 0
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
If tipoCambio = 1 Then
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContClientes
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaClientes
|
||||
ElseIf UsaComplementariaClientes Then
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria
|
||||
CveCuenta = 0
|
||||
|
||||
If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then
|
||||
importeMX = importeMovimiento
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera
|
||||
End If
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
ImporteConcepto12 = importeMX.RoundSQL
|
||||
If importeMovimiento <> 0 Then
|
||||
If IdCtaContable <= 0 Then
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
If CveCuenta <= 0 Then
|
||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
CveCuentaContabilizacion = 0
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
End If
|
||||
importeMovimiento = 0
|
||||
|
||||
If ValorMultiplicador = 1 Then
|
||||
@@ -2155,30 +2188,74 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
'APLICA DEVOLUCION SALDOS DIRECTOS
|
||||
If AplicaDevolucion Then
|
||||
If ObjFactura.AplicaDevolucion Then
|
||||
Dim TipoCambioFactura = ObjFactura.TipoCambio
|
||||
Dim importeMovimientoDev = ObjFactura.Total
|
||||
importeMovimientoDev = If(ObjFactura.SaldoVentaDevolucion < importeMovimientoDev, ObjFactura.SaldoVentaDevolucion, importeMovimientoDev)
|
||||
If importeMovimientoDev > 0 Then
|
||||
Dim importeMXDev = importeMovimientoDev * tipoCambio * Multiplicador
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimientoDev.FormatoNumero(2)}"
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, 251, Concepto,
|
||||
FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVentaDevolucion,
|
||||
CveCliente:=ObjFactura.CveCliente, ImporteMX:=importeMXDev,
|
||||
ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev),
|
||||
CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimientoDev, Referencia, 91, Concepto,
|
||||
FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta,
|
||||
CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion,
|
||||
ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev),
|
||||
CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
importeMovimientoDev = If(ObjFactura.SaldoVentaDevolucion < importeMovimientoDev, ObjFactura.SaldoVentaDevolucion, importeMovimientoDev)
|
||||
If importeMovimientoDev > 0 Then
|
||||
Dim importeMXDev = importeMovimientoDev * tipoCambio * Multiplicador
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimientoDev.FormatoNumero(2)}"
|
||||
|
||||
If UsaComplementariaClientes AndAlso tipoCambio > 1 Then
|
||||
importeMXDev = importeMovimientoDev
|
||||
Dim ImporteComplementaria As Decimal = ((importeMovimientoDev * tipoCambio) - importeMovimientoDev).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimientoDev, Referencia, 203, Concepto, FechaMovimiento, IdCtaContableClienteComplementaria, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=ImporteComplementaria, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=TipoCambioFactura) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, importeMovimientoDev, Referencia, 91, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If UsaComplementariaClientes AndAlso TipoCambioFactura > 1 Then
|
||||
importeMXDev = importeMovimientoDev
|
||||
Dim ImporteComplementaria As Decimal = ((importeMovimientoDev * TipoCambioFactura) - importeMovimientoDev).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, 207, Concepto, FechaMovimiento, IdCtaContableClienteComplementaria, -1, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, ImporteMX:=ImporteComplementaria, ImporteME:=If(TipoCambioFactura = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar, CveVentaAmortizacion:=ObjFactura.CveVenta, TipoCambio:=TipoCambioFactura) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, importeMovimientoDev, Referencia, 251, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVentaDevolucion, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMXDev, ImporteME:=If(tipoCambio = 1, 0, importeMovimientoDev), CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If tipoCambio <> TipoCambioFactura Then
|
||||
Dim difFluctuacion As Decimal = tipoCambio - TipoCambioFactura
|
||||
Dim CveConceptoFluctua As Integer = 64 '64.ganacia, 65.perdida
|
||||
Dim TipoMovtoFluctua As Boolean = True
|
||||
Dim IdCtaContableFluctua As Integer
|
||||
If difFluctuacion < 0 Then
|
||||
CveConceptoFluctua = 65
|
||||
TipoMovtoFluctua = False
|
||||
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
|
||||
Else
|
||||
CveConceptoFluctua = 64
|
||||
TipoMovtoFluctua = True
|
||||
IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
|
||||
CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
|
||||
End If
|
||||
Dim ImporteFluctuacion As Decimal = Math.Abs((importeMovimientoDev * difFluctuacion).RoundSQL)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=TipoCambioFactura, CveCuenta:=CveCuenta) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
'ErrorPrepoliza = True
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -2188,9 +2265,9 @@ Namespace Modelos
|
||||
Case 136 'Otros Conceptos Dinamicos
|
||||
If ObjFactura.DtOtrosConceptos IsNot Nothing Then
|
||||
For Each row2 As DataRow In ObjFactura.DtOtrosConceptos.Rows
|
||||
If row2("CantidadConcepto").ToString().ToDecimal > 0 Then
|
||||
If row2("Importe").ToString().ToDecimal > 0 Then
|
||||
|
||||
importeMovimiento = (row2("CantidadConcepto").ToString().ToDecimal * ValorMultiplicador)
|
||||
importeMovimiento = (row2("Importe").ToString().ToDecimal * ValorMultiplicador)
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
@@ -2221,6 +2298,29 @@ Namespace Modelos
|
||||
'[IPP] SI ES REFACTURACION LOS ANTICIPOS NO LOS DEBE APLICAR EN EL INGRESO REFACTURADO (VIEJO)
|
||||
If NuevaFactura = 1 And ObjFactura.CveVenta = CveDevolucion Then
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto = "Ing" AndAlso ValorMultiplicador = -1 Then
|
||||
For Each row2 As DataRow In ObjFactura.DtAntNCVinculadas.Rows
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 11 Then
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal * ValorMultiplicador '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos
|
||||
CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2("CveVenta").ToString().ToEntero, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
Else
|
||||
ObjFactura.SeGuardoPrePoliza = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'cuando es anticipo
|
||||
@@ -2231,7 +2331,7 @@ Namespace Modelos
|
||||
ObjFactura.CveTipoAmortizacionAnticipo = 1 AndAlso ObjFactura.TipoDocto.Contiene("Ing") OrElse
|
||||
ObjFactura.CveTipoAmortizacionAnticipo = 3 Then
|
||||
|
||||
For Each row2 As DataRow In DtAnticipos.Rows
|
||||
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 3 Then
|
||||
CveIEAnticipo = row2("CveIE").ToString.ToEntero
|
||||
importeMovimiento = row2("Importe").ToString().ToDecimal() '- ((row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / row2.DataKey("TotalAnticipo").ToDecimal) * row2.DataKey("IVAAnticipo").ToDecimal)
|
||||
@@ -2336,7 +2436,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
Else
|
||||
If DtAnticipos IsNot Nothing Then
|
||||
If ObjFactura.DtAnticipos IsNot Nothing Then
|
||||
For Each row2 As DataRow In ObjFactura.DtAnticipos.Rows
|
||||
|
||||
If row2("CveConceptoContable").ToString().ToEntero = 12 Then
|
||||
@@ -2659,9 +2759,9 @@ Namespace Modelos
|
||||
|
||||
|
||||
Case 30 'PAGO - BANCOS
|
||||
If DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0 Then
|
||||
If ObjFactura.DtPagos IsNot Nothing AndAlso ObjFactura.DtPagos.Rows.Count > 0 Then
|
||||
|
||||
For Each DrPago As DataRow In DtPagos.Rows
|
||||
For Each DrPago As DataRow In ObjFactura.DtPagos.Rows
|
||||
CveIEPago = -1
|
||||
|
||||
FolioIE = -1
|
||||
@@ -2837,29 +2937,29 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
If ObjConta.ValorPolizaDescuadre = 2 Then
|
||||
ErrorPrepoliza = True
|
||||
Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError)
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
'Simplificacion de PrePolizas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(ObjFactura.CvePrePoliza, 2) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorPrepoliza = True
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
End If
|
||||
|
||||
'ContPAQ El movimiento 1 es el de Venta
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso Not ErrorPrepoliza Then
|
||||
If idCuentaContabilizacion > 0 Then
|
||||
If ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa, ObjConta:=objContPaqi) Then
|
||||
Else
|
||||
'ErrorList.Add("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico")
|
||||
'ErrorPrepoliza = True
|
||||
End If
|
||||
Else
|
||||
ErrorList.Add(String.Format("Falta asignación de las siguientes cuentas contables: {0}", CuentasContablesInvalidas))
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLog(ex.ToString())
|
||||
ErrorPrepoliza = True
|
||||
@@ -4750,6 +4850,7 @@ Namespace Modelos
|
||||
Public Property DtFirmas As Data.DataTable
|
||||
Public Property DtDesgloseImpuestos As Data.DataTable
|
||||
Public Property DtDocumentosRelacionados As Data.DataTable
|
||||
Public Property DtAntNCVinculadas As Data.DataTable
|
||||
Public Property DtNCVinculadas As Data.DataTable
|
||||
|
||||
Public Property DtAnticipos As Data.DataTable
|
||||
|
||||
@@ -278,7 +278,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
|
||||
'verifica existencias
|
||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140) Then
|
||||
If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141) Then
|
||||
UsaGlobal = False
|
||||
|
||||
Dim objInv As New ClsInventarios
|
||||
|
||||
@@ -991,6 +991,7 @@ public partial class CGame_Fletes : ClsPaginas
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Alert(ex.ToString(), TipoMensaje.MsgError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,7 +447,7 @@ public partial class CGame_GenerarOrdenCorte : ClsPaginas
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Alert("Ocurrio un error " + ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1226,7 +1226,6 @@ Partial Class Compras_Compras
|
||||
ObjPersonal.Dispose()
|
||||
DdlPersonal.DataBind()
|
||||
DdlPersonalReembolso.DataBind()
|
||||
ObjPersonal.Dispose()
|
||||
|
||||
|
||||
'Carga Proveedor
|
||||
|
||||
110
Inventarios/RepTraspasoEmitido.aspx
Normal file
110
Inventarios/RepTraspasoEmitido.aspx
Normal file
@@ -0,0 +1,110 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepTraspasoEmitido.aspx.cs" Inherits="Inventarios_RepTraspasoEmitido" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Traspasos Emitidos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Almacen:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Inicial:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<label class="col-md-1 ">Fecha Final:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" Width="98%" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Estatus:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Emitido" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cancelado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" ShowHeaderWhenEmpty="true" EmptyDataText="No se han encontrado datos con los filtros seleccionados"
|
||||
OnRowDataBound="GvDatos_RowDataBound" DataKeyNames="CveMovimiento,FolioFiscal"
|
||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="Folio" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" Target="_blank" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="FechaMovto" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Almacen" ItemStyle-HorizontalAlign="Left" HeaderText="Almacen" />
|
||||
<asp:BoundField DataField="Estatus" ItemStyle-HorizontalAlign="Left" HeaderText="Estatus" />
|
||||
<asp:BoundField DataField="FolioFiscal" ItemStyle-HorizontalAlign="Left" HeaderText="Folio Fiscal" />
|
||||
<asp:BoundField DataField="FechaCancelacion" ItemStyle-HorizontalAlign="Left" HeaderText="Fecha Cancelación" />
|
||||
<asp:BoundField HeaderText="XML" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Cancelación">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkCancelarTraspaso" runat="server" OnClick="LnkCancelarTraspaso_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el traspaso?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
83
Inventarios/RepTraspasoEmitido.aspx.cs
Normal file
83
Inventarios/RepTraspasoEmitido.aspx.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
|
||||
public partial class Inventarios_RepTraspasoEmitido : ClsPaginas
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
DdlAlmacen.DataSource = get_GlobalDTAlmacen(UsuarioActual.CveEmpresa);
|
||||
DdlAlmacen.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlAlmacen.DataBind();
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsInventarios ObjInv = new ClsInventarios();
|
||||
if (ObjInv.GetRepTraspasosEmitidos(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), DdlEstatus.SelectedValue.ToEntero(),
|
||||
txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate()))
|
||||
{
|
||||
GvDatos.DataSource = ObjInv.DtResultados;
|
||||
}
|
||||
ObjInv.Dispose();
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
e.Row.Cells[6].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-excel\"></i></a>", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "XML",$"Tra-{e.Row.DBCampo("Folio")}","Tra")));
|
||||
e.Row.Cells[7].Text = String.Format("<a class=\"texto\" href=\"/Compras/PopUpVerFactura.aspx?P={0}\" target=\"_blank\"><i class=\"fa fa-ad-pdf\"></i></a>", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveMovimiento"), "PDF", $"Tra-{e.Row.DBCampo("Folio")}", "Tra")));
|
||||
if (e.Row.DBCampo("CveEstatusTimbrado").ToEntero()==2)
|
||||
{
|
||||
e.Row.Cells[8].Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkCancelarTraspaso_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow Gvr = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
Timbrado ObjCancelacion = new Timbrado();
|
||||
DateTime CancelacionFecha=MinFecha;
|
||||
int CveEstatusTimbrado = 0;
|
||||
string FolioFiscal = Gvr.DataKey("FolioFiscal").ToString(),SelloCancelacion ="";
|
||||
int CveMovimiento = Gvr.DataKey("CveMovimiento").ToEntero();
|
||||
if (ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, 0, "XAXX010101000", UsuarioActual.Empresa.RFC, 2,false))
|
||||
{
|
||||
CancelacionFecha = ObjCancelacion.CancelacionFecha;
|
||||
SelloCancelacion = ObjCancelacion.CancelacionAcuse;
|
||||
CveEstatusTimbrado = 2;
|
||||
}else
|
||||
{
|
||||
Alert("La factura no se pudo cancelar ante el SAT", TipoMensaje.MsgError);
|
||||
}
|
||||
if (CveEstatusTimbrado > 0)
|
||||
{
|
||||
ClsInventarios ObjInv = new ClsInventarios();
|
||||
if (ObjInv.UpdateMovimientoTimbrado(CveMovimiento, CveEstatusTimbrado, FolioFiscal, CancelacionFecha, SelloCancelacion))
|
||||
{
|
||||
Alert("El traspaso se cancelo correctamente.", TipoMensaje.MsgInformacion);
|
||||
@@ -209,9 +209,9 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" id="DvTamanio" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlTamanio" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Tamaño" DataValueField="CveTamaño" Width="350px">
|
||||
<asp:ListItem Value="-1">Seleccione</asp:ListItem>
|
||||
@@ -548,10 +548,12 @@
|
||||
<label class="col-md-4">¿Aplica IEPS?</label>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkAplicaIeps" CssClass="" AutoPostBack="true" data-size="small" runat="server" Text=" " /></td>
|
||||
|
||||
</div>
|
||||
<label class="col-md-4">¿Graba en IVA?</label>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox ID="ChkIepsIVA" CssClass="" Enabled="false" data-size="small" runat="server" Text=" " /></td>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -715,6 +717,7 @@
|
||||
|
||||
<div class="col-md-6" style="text-align: left">
|
||||
<input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" />Seleccionar Todos
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align: right">
|
||||
<label>Aplicar precio minimo</label>
|
||||
@@ -932,6 +935,47 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UpSeccionAlmacen" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivSeccionAlmacen" runat="server" visible="false">
|
||||
<div class="portlet xspadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-briefcase font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Secciones de Almacen</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<asp:LinkButton ID="LnkSeccionAlmacenAdd" OnClick="LnkSeccionAlmacenAdd_Click" runat="server" data-toggle="tooltip" data-placement="right" title="Agregar Seccion de Almacen" CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:GridView ID="GvSeccionAlmacen" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePSAlmacenSeccion,CveAlmacen,CveAlmacenSeccion"
|
||||
EmptyDataText="No se encontraron Productos/Servicios Adicionales"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None" OnRowDataBound="GvSeccionAlmacen_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Almacen" HeaderText="Almacen" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="AlmacenSeccion" HeaderText="Sección Almacen" ItemStyle-HorizontalAlign="Left" />
|
||||
<%-- <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarSeccionAlmacen" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="LnkEditarSeccionAlmacen_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Eliminar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkRemoveSeccionAlmacen" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="LnkRemoveSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -1005,25 +1049,29 @@
|
||||
<th width="20%">
|
||||
<asp:LinkButton ID="LbCaracteristica1" runat="server" CausesValidation="false" Text="" CommandArgument="Caracteristica1;1" OnClick="LbOrden_Click">
|
||||
Característica
|
||||
<asp:Literal ID="ImgCaracteristica1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
|
||||
<asp:Literal ID="ImgCaracteristica1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="20%">
|
||||
<asp:LinkButton ID="LbOpcion1" runat="server" CausesValidation="false" Text="" CommandArgument="Opcion1;1" OnClick="LbOrden_Click">
|
||||
Opción
|
||||
<asp:Literal ID="ImgOpcion1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
|
||||
<asp:Literal ID="ImgOpcion1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="20%">
|
||||
<asp:LinkButton ID="LbFechaIng1" runat="server" CausesValidation="false" Text="" CommandArgument="FechaIng1;1" OnClick="LbOrden_Click">
|
||||
Fecha Ing.
|
||||
<asp:Literal ID="ImgFechaIng1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
|
||||
<asp:Literal ID="ImgFechaIng1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
<th width="20%">
|
||||
<asp:LinkButton ID="LbUsuario1" runat="server" CausesValidation="false" Text="" CommandArgument="Usuario1;1" OnClick="LbOrden_Click">
|
||||
Usuario
|
||||
<asp:Literal ID="ImgUsuario1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
|
||||
<asp:Literal ID="ImgUsuario1" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
|
||||
</asp:LinkButton>
|
||||
</th>
|
||||
|
||||
@@ -1664,6 +1712,7 @@
|
||||
<div>
|
||||
<p>
|
||||
El producto seleccionado en el recuadro de arriba sera unificado en el producto actual
|
||||
|
||||
<b>
|
||||
<asp:Literal Text="" ID="LtProductoUnificar" runat="server" /></b>
|
||||
</p>
|
||||
@@ -1895,6 +1944,7 @@
|
||||
<div id="DivTipoCla" runat="server">
|
||||
<p>
|
||||
Tipo de Clasificación:
|
||||
|
||||
</p>
|
||||
<asp:RadioButtonList ID="RblTipoClasificación" runat="server" CssClass="rbl" RepeatDirection="Vertical" RepeatLayout="Table">
|
||||
<asp:ListItem Text="Todas" Value="-1" Selected="True"></asp:ListItem>
|
||||
@@ -1904,6 +1954,7 @@
|
||||
</asp:RadioButtonList>
|
||||
<asp:LinkButton ID="BtnTipoCla" OnClick="BtnTipoCla_Click" runat="server" CssClass="btn btn-success" Text="Aceptar" />
|
||||
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -1972,6 +2023,45 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- MODAL PS ADICIONALES --%>
|
||||
<div id="DivAddSeccionAlmacen" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalSeccionAlmacen" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="h4SccionAlmacen">Sección Almacen</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlAlmacen" Width="50%" runat="server" CssClass="form-control select2me" DataValueField="CveAlmacen" DataTextField="Almacen" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvAlmacen" runat="server" ControlToValidate="DdlAlmacen" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpModalSeccionAlmacen"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RfvAlmacen"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlAlmacen.ClientID.ToString()%>">Almacen:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" Width="50%" runat="server" CssClass="form-control select2me" DataValueField="CveSeccion" DataTextField="Seccion" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacen" runat="server" ControlToValidate="DdlSeccionAlmacen" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpModalSeccionAlmacen"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceSeccionAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacen"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlSeccionAlmacen.ClientID.ToString()%>">Sección Almacen:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" style="display: block">
|
||||
<asp:UpdatePanel ID="UpFooterSeccionAlmacen" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnAddSeccionAlmacen" runat="server" OnClick="BtnAddSeccionAlmacen_Click" CssClass="btn btn-success" Text="Agregar" ValidationGroup="GrpModalSeccionAlmacen"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Literal ID="LtlScripts" runat="server"></asp:Literal>
|
||||
<%-- FIN MODAL PS ADICIONALES --%>
|
||||
</asp:Content>
|
||||
@@ -2149,9 +2239,8 @@
|
||||
|
||||
var initcarusel2 = initcarusel;
|
||||
|
||||
function ADSReady()
|
||||
{
|
||||
setPoscicion();
|
||||
function ADSReady() {
|
||||
setPoscicion();
|
||||
}
|
||||
//TERMINA: ECOMMERCE
|
||||
|
||||
|
||||
@@ -97,6 +97,15 @@ Partial Class ProductosyServicios
|
||||
ViewState("CvePSAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property DtSeccionAlmacen() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtSeccionAlmacen"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtSeccionAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -137,6 +146,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
CargarAlias()
|
||||
CargaExistencias()
|
||||
CargaGvSeccionAlmacen()
|
||||
Else
|
||||
'Configuración de Modalidad Insert
|
||||
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
|
||||
@@ -275,6 +285,10 @@ Partial Class ProductosyServicios
|
||||
CargaDdlFraccionArancelaria()
|
||||
CveSATPS = -1
|
||||
|
||||
CargaCombosSeccionAlmacen()
|
||||
DivSeccionAlmacen.Visible = UsuarioActual.Empresa.Funcionalidad(563).ToString = "1"
|
||||
CreaDtSeccionAlmacen()
|
||||
|
||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
||||
CargaCuentasContables()
|
||||
If Not (Request("CvePS") IsNot Nothing AndAlso IsNumeric(Request("CvePS")) AndAlso Request("CvePS").ToEntero > 0) Then DivUsoClasificacion.Visible = True
|
||||
@@ -1123,7 +1137,8 @@ Partial Class ProductosyServicios
|
||||
End If
|
||||
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
ObjProductosServicios.IniciaTransacSQL()
|
||||
Dim ObjInv As New ClsInventarios(ObjProductosServicios.IniciaTransacSQL())
|
||||
|
||||
Dim TieneError = False
|
||||
Dim AccionJS = ""
|
||||
Dim EsPaquete As Integer = If(gvPaqueteDetalle.Rows.Count = 0, 0, 1)
|
||||
@@ -1160,6 +1175,18 @@ Partial Class ProductosyServicios
|
||||
Next
|
||||
'Alert("El Producto o Servicio se guardó correctamente.", TipoMensaje.MsgInformacion, "document.location.href= "" / ProductosServicios.aspx?CvePS=" & ObjProductosServcios.CvePS.ToString & """;")
|
||||
AccionJS = "document.location.href=""/Ventas/CatPS.aspx"";"
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
||||
If Dr("CveAlmacen").ToString.ToEntero > 0 Then
|
||||
If Not ObjInv.AddProductosServiciosAlmacenSeccion(CvePS, Dr("CveAlmacen").ToString.ToEntero, Dr("CveAlmacenSeccion").ToString.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Ocurrió un Error al agregar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
@@ -1205,6 +1232,22 @@ Partial Class ProductosyServicios
|
||||
AccionJS = If(Ret = "Comp", "ircompras();", "document.location.href=""/Ventas/CatPS.aspx"";")
|
||||
'UpDatos.Update()
|
||||
'Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, AccionJS)
|
||||
|
||||
If Not TieneError Then
|
||||
For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
||||
If Dr("CveAlmacen").ToString.ToEntero > 0 AndAlso Not Dr("CvePSAlmacenSeccion").ToString.ToEntero > 0 Then
|
||||
If Not ObjInv.AddProductosServiciosAlmacenSeccion(CvePS, Dr("CveAlmacen").ToString.ToEntero, Dr("CveAlmacenSeccion").ToString.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
ElseIf Not Dr("CveAlmacen").ToString.ToEntero > 0 AndAlso Dr("CvePSAlmacenSeccion").ToString.ToEntero > 0 Then
|
||||
If Not ObjInv.RemoveProductosServiciosAlmacenSeccion(Dr("CvePSAlmacenSeccion").ToString.ToEntero) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Ocurrió un Error al actualizar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
@@ -2462,4 +2505,99 @@ Partial Class ProductosyServicios
|
||||
DdlCategoriaToxicidad.SelectedValue = "000"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "SECCION ALMACEN"
|
||||
|
||||
Private Sub CreaDtSeccionAlmacen()
|
||||
DtSeccionAlmacen = New DataTable
|
||||
DtSeccionAlmacen.Columns.Add("CvePSAlmacenSeccion", GetType(Integer))
|
||||
DtSeccionAlmacen.Columns.Add("CveAlmacen", GetType(Integer))
|
||||
DtSeccionAlmacen.Columns.Add("Almacen", GetType(String))
|
||||
DtSeccionAlmacen.Columns.Add("CveAlmacenSeccion", GetType(Integer))
|
||||
DtSeccionAlmacen.Columns.Add("AlmacenSeccion", GetType(String))
|
||||
End Sub
|
||||
Private Sub CargaGvSeccionAlmacen()
|
||||
Dim ObjInv As New ClsInventarios
|
||||
If ObjInv.GetProductosServiciosAlmacenSeccion(CvePS, -1, -1) Then
|
||||
GvSeccionAlmacen.DataSource = ObjInv.DtResultados
|
||||
DtSeccionAlmacen = ObjInv.DtResultados
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
GvSeccionAlmacen.DataBind()
|
||||
UpSeccionAlmacen.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaCombosSeccionAlmacen()
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlSeccionAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
|
||||
UpModalSeccionAlmacen.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkSeccionAlmacenAdd_Click(sender As Object, e As EventArgs)
|
||||
DdlAlmacen.SelectedIndex = 0
|
||||
DdlSeccionAlmacen.SelectedIndex = 0
|
||||
RegistraScript("$('#DivAddSeccionAlmacen').modal();")
|
||||
UpModalSeccionAlmacen.Update()
|
||||
End Sub
|
||||
'Protected Sub LnkEditarSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||
' Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
' DdlAlmacen.SelectedValueExist(gvRow.DataKey("CvAlmacen"))
|
||||
' DdlSeccionAlmacen.SelectedValueExist(gvRow.DataKey("CveAlmacenSeccion"))
|
||||
' RegistraScript("$('#DivAddSeccionAlmacen').modal();")
|
||||
' UpModalSeccionAlmacen.Update()
|
||||
'End Sub
|
||||
Protected Sub LnkRemoveSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
If gvRow.DataKey("CvePSAlmacenSeccion").ToEntero > 0 Then
|
||||
DtSeccionAlmacen.Rows(gvRow.RowIndex)("CveAlmacen") = -1
|
||||
Else
|
||||
DtSeccionAlmacen.Rows(gvRow.RowIndex.ToEntero).Delete()
|
||||
End If
|
||||
DtSeccionAlmacen.AcceptChanges()
|
||||
GvSeccionAlmacen.DataSource = DtSeccionAlmacen
|
||||
GvSeccionAlmacen.DataBind()
|
||||
UpSeccionAlmacen.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||
If DtSeccionAlmacen.FiltraParametros($"CveAlmacen = {DdlAlmacen.SelectedValue}").Rows.Count > 0 Then
|
||||
Alert("No se puede especificar el mismo almacen en dos secciones", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Row As DataRow = Nothing
|
||||
Row = DtSeccionAlmacen.NewRow
|
||||
Row("CvePSAlmacenSeccion") = -1
|
||||
Row("CveAlmacen") = DdlAlmacen.SelectedValue.ToEntero
|
||||
Row("Almacen") = DdlAlmacen.SelectedItem.Text
|
||||
Row("CveAlmacenSeccion") = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||
Row("AlmacenSeccion") = DdlSeccionAlmacen.SelectedItem.Text
|
||||
DtSeccionAlmacen.Rows.Add(Row)
|
||||
DtSeccionAlmacen.AcceptChanges()
|
||||
GvSeccionAlmacen.DataSource = DtSeccionAlmacen
|
||||
GvSeccionAlmacen.DataBind()
|
||||
UpSeccionAlmacen.Update()
|
||||
|
||||
RegistraScript("$('#DivAddSeccionAlmacen').modal('hide');")
|
||||
End Sub
|
||||
|
||||
Protected Sub GvSeccionAlmacen_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If Not e.Row.DBCampo("CveAlmacen").ToEntero > 0 Then
|
||||
e.Row.Visible = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -132,7 +132,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes["Fecha"].Value.ToDate();
|
||||
}
|
||||
|
||||
// var FueCancelado = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC).Mensaje;
|
||||
var FueCancelado = CancelarDocumento(CveVenta, CveEstatus, CveCliente, Folio, uuid, CancelacionAcuse, CancelacionFecha, TipoDocto, total.ToDouble(), UsuarioActual.Empresa.CvePAC).Mensaje;
|
||||
|
||||
sb.AppendFormat("{0} <br/>", FueCancelado);
|
||||
if (CveEstatus.Contiene(4, 5) && EsRefacturacion)
|
||||
@@ -170,188 +170,187 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
//private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion)
|
||||
//{
|
||||
// //var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa);
|
||||
// //var retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse);
|
||||
// return retorno;
|
||||
//}
|
||||
|
||||
private int GenerarPolizaAC(ClsContPAQi ObjAC, int CveVenta, string Folio, int CveCliente, string TipoComprobante, DateTime Fecha, bool CancelacionIngreso = false)
|
||||
private Modelos.Factura.MCancelacionVentaMensaje CancelarDocumento(int CveVenta, int CveEstatus, int CveCliente, string Folio, string FolioFiscal, string CancelacionAcuse, DateTime CancelacionFecha, string TipoComprobante, double Total, int CvePACCancelacion)
|
||||
{
|
||||
int CtaCliente = 0;
|
||||
int OrdenPago = 0;
|
||||
string NombreCliente = "";
|
||||
|
||||
var ObjClientes = new ClsClientes();
|
||||
if (ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CtaCliente = ObjClientes.IdCtaContClientes;
|
||||
NombreCliente = ObjClientes.NombreComercial;
|
||||
}
|
||||
ObjClientes.Dispose();
|
||||
|
||||
var ObjVentas = new ClsVentas();
|
||||
if (ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
if (ObjVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
OrdenPago = ObjVentas.DtResultados.Rows[0]["Num3"].ToEntero();
|
||||
}
|
||||
}
|
||||
|
||||
int Retorno = 0;
|
||||
int IDPoliza = 0;
|
||||
bool ErrorAC = false;
|
||||
string Concepto = string.Format("GD {0}", NombreCliente);
|
||||
int Paridad = 1;
|
||||
bool TipoMovto = false;
|
||||
if (CancelacionIngreso)
|
||||
{
|
||||
Concepto = string.Format("Cancelación GD {0}", NombreCliente);
|
||||
Paridad = -1;
|
||||
TipoMovto = true;
|
||||
}
|
||||
var TipoPoliza = TipoComprobante.Contiene("OP", "Com") ? 3 : 1;
|
||||
DataRow dr = null;
|
||||
int CtaISSSTESON = 643;
|
||||
int CtaISPT = 1745;
|
||||
var AC = new ClsAC();
|
||||
|
||||
//var ObjAC = new ClsContPAQi(UsuarioActual.Empresa);
|
||||
//ObjAC.IniciaTransacSQL();
|
||||
|
||||
IDPoliza = ObjAC.AddPoliza(TipoPoliza, Concepto, 0, 0, UsuarioActual.CveUsuario, Fecha);
|
||||
|
||||
if (IDPoliza > 0)
|
||||
{
|
||||
if (TipoComprobante == "OP")
|
||||
{
|
||||
//Orden de PAGO
|
||||
if (OrdenPago == 1)
|
||||
{
|
||||
//ISSSTESON
|
||||
if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, false, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
|
||||
{
|
||||
if (!ObjAC.AddMovimiento(IDPoliza, CtaISSSTESON, true, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
|
||||
{
|
||||
ErrorAC = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorAC = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//ISPT
|
||||
if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, false, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
|
||||
{
|
||||
if (!ObjAC.AddMovimiento(IDPoliza, CtaISPT, true, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
|
||||
{
|
||||
ErrorAC = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorAC = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//NORMAL
|
||||
DataTable Detalles = null;
|
||||
DataTable DTPresupuestoIngresos = null;
|
||||
if (ObjVentas.GetVentaDetalle(CveVenta))
|
||||
{
|
||||
Detalles = ObjVentas.DtResultados.Copy();
|
||||
}
|
||||
if (AC.GetPresupuestoIngresos(-1, DateTime.Now.Year, true, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DTPresupuestoIngresos = AC.DtResultados.Copy();
|
||||
}
|
||||
|
||||
if (Detalles != null && DTPresupuestoIngresos != null)
|
||||
{
|
||||
var query = from gvr in Detalles.AsEnumerable()
|
||||
group gvr by gvr["CvePresupuestoIngreso"].ToString().ToEntero() into g
|
||||
select new { TotalImporte = g.Sum((x) => x["Total"].ToString().ToDouble()), CvePresupuestoIngreso = g.Key };
|
||||
|
||||
foreach (var item in query)
|
||||
{
|
||||
dr = DTPresupuestoIngresos.FiltroPrimero(string.Format("CvePresupuestoIngreso = {0}", item.CvePresupuestoIngreso));
|
||||
if (dr != null)
|
||||
{
|
||||
Concepto = string.Format("{0} - {1}: {2}", NombreCliente, TipoComprobante, Folio);
|
||||
if (ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaPorEjecutar"].ToString().ToEntero(), false, (Paridad * item.TotalImporte), "", Concepto, 0, Fecha, ""))
|
||||
{
|
||||
if (ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaDevengado"].ToString().ToEntero(), true, (Paridad * item.TotalImporte), "", Concepto, 0, Fecha, ""))
|
||||
{
|
||||
// CARGO la deuda del cliente
|
||||
if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, TipoMovto, item.TotalImporte, "", Concepto, 0, Fecha, ""))
|
||||
{
|
||||
// abono,
|
||||
if (!ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaMatriz"].ToString().ToEntero(), !TipoMovto, item.TotalImporte, "", Concepto, 0, Fecha, ""))
|
||||
{
|
||||
ErrorAC = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorAC = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorAC = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorAC = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorAC = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorAC = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ErrorAC = true;
|
||||
}
|
||||
|
||||
if (!ErrorAC)
|
||||
{
|
||||
ObjAC.AjustaPoliza(IDPoliza);
|
||||
Retorno = IDPoliza;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("Error al Agregar la Póliza de AC.", TipoMensaje.MsgError);
|
||||
}
|
||||
AC.Dispose();
|
||||
ObjVentas.Dispose();
|
||||
|
||||
return Retorno;
|
||||
var factura = new Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa);
|
||||
var retorno = factura.EjecutarCancelacionPendiente(CveEstatus, CancelacionFecha, CancelacionAcuse);
|
||||
return retorno;
|
||||
}
|
||||
|
||||
//private int GenerarPolizaAC(ClsContPAQi ObjAC, int CveVenta, string Folio, int CveCliente, string TipoComprobante, DateTime Fecha, bool CancelacionIngreso = false)
|
||||
//{
|
||||
// int CtaCliente = 0;
|
||||
// int OrdenPago = 0;
|
||||
// string NombreCliente = "";
|
||||
|
||||
// var ObjClientes = new ClsClientes();
|
||||
// if (ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa))
|
||||
// {
|
||||
// CtaCliente = ObjClientes.IdCtaContClientes;
|
||||
// NombreCliente = ObjClientes.NombreComercial;
|
||||
// }
|
||||
// ObjClientes.Dispose();
|
||||
|
||||
// var ObjVentas = new ClsVentas();
|
||||
// if (ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa))
|
||||
// {
|
||||
// if (ObjVentas.DtResultados.Rows.Count > 0)
|
||||
// {
|
||||
// OrdenPago = ObjVentas.DtResultados.Rows[0]["Num3"].ToEntero();
|
||||
// }
|
||||
// }
|
||||
|
||||
// int Retorno = 0;
|
||||
// int IDPoliza = 0;
|
||||
// bool ErrorAC = false;
|
||||
// string Concepto = string.Format("GD {0}", NombreCliente);
|
||||
// int Paridad = 1;
|
||||
// bool TipoMovto = false;
|
||||
// if (CancelacionIngreso)
|
||||
// {
|
||||
// Concepto = string.Format("Cancelación GD {0}", NombreCliente);
|
||||
// Paridad = -1;
|
||||
// TipoMovto = true;
|
||||
// }
|
||||
// var TipoPoliza = TipoComprobante.Contiene("OP", "Com") ? 3 : 1;
|
||||
// DataRow dr = null;
|
||||
// int CtaISSSTESON = 643;
|
||||
// int CtaISPT = 1745;
|
||||
// var AC = new ClsAC();
|
||||
|
||||
// //var ObjAC = new ClsContPAQi(UsuarioActual.Empresa);
|
||||
// //ObjAC.IniciaTransacSQL();
|
||||
|
||||
// IDPoliza = ObjAC.AddPoliza(TipoPoliza, Concepto, 0, 0, UsuarioActual.CveUsuario, Fecha);
|
||||
|
||||
// if (IDPoliza > 0)
|
||||
// {
|
||||
// if (TipoComprobante == "OP")
|
||||
// {
|
||||
// //Orden de PAGO
|
||||
// if (OrdenPago == 1)
|
||||
// {
|
||||
// //ISSSTESON
|
||||
// if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, false, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
|
||||
// {
|
||||
// if (!ObjAC.AddMovimiento(IDPoliza, CtaISSSTESON, true, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //ISPT
|
||||
// if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, false, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
|
||||
// {
|
||||
// if (!ObjAC.AddMovimiento(IDPoliza, CtaISPT, true, (Paridad * 0d), "", Concepto, 0, Fecha, ""))
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //NORMAL
|
||||
// DataTable Detalles = null;
|
||||
// DataTable DTPresupuestoIngresos = null;
|
||||
// if (ObjVentas.GetVentaDetalle(CveVenta))
|
||||
// {
|
||||
// Detalles = ObjVentas.DtResultados.Copy();
|
||||
// }
|
||||
// if (AC.GetPresupuestoIngresos(-1, DateTime.Now.Year, true, UsuarioActual.CveEmpresa))
|
||||
// {
|
||||
// DTPresupuestoIngresos = AC.DtResultados.Copy();
|
||||
// }
|
||||
|
||||
// if (Detalles != null && DTPresupuestoIngresos != null)
|
||||
// {
|
||||
// var query = from gvr in Detalles.AsEnumerable()
|
||||
// group gvr by gvr["CvePresupuestoIngreso"].ToString().ToEntero() into g
|
||||
// select new { TotalImporte = g.Sum((x) => x["Total"].ToString().ToDouble()), CvePresupuestoIngreso = g.Key };
|
||||
|
||||
// foreach (var item in query)
|
||||
// {
|
||||
// dr = DTPresupuestoIngresos.FiltroPrimero(string.Format("CvePresupuestoIngreso = {0}", item.CvePresupuestoIngreso));
|
||||
// if (dr != null)
|
||||
// {
|
||||
// Concepto = string.Format("{0} - {1}: {2}", NombreCliente, TipoComprobante, Folio);
|
||||
// if (ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaPorEjecutar"].ToString().ToEntero(), false, (Paridad * item.TotalImporte), "", Concepto, 0, Fecha, ""))
|
||||
// {
|
||||
// if (ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaDevengado"].ToString().ToEntero(), true, (Paridad * item.TotalImporte), "", Concepto, 0, Fecha, ""))
|
||||
// {
|
||||
// // CARGO la deuda del cliente
|
||||
// if (ObjAC.AddMovimiento(IDPoliza, CtaCliente, TipoMovto, item.TotalImporte, "", Concepto, 0, Fecha, ""))
|
||||
// {
|
||||
// // abono,
|
||||
// if (!ObjAC.AddMovimiento(IDPoliza, dr["IdCuentaMatriz"].ToString().ToEntero(), !TipoMovto, item.TotalImporte, "", Concepto, 0, Fecha, ""))
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// break;
|
||||
// }
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// break;
|
||||
// }
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ErrorAC = true;
|
||||
// }
|
||||
|
||||
// if (!ErrorAC)
|
||||
// {
|
||||
// ObjAC.AjustaPoliza(IDPoliza);
|
||||
// Retorno = IDPoliza;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Alert("Error al Agregar la Póliza de AC.", TipoMensaje.MsgError);
|
||||
// }
|
||||
// AC.Dispose();
|
||||
// ObjVentas.Dispose();
|
||||
|
||||
// return Retorno;
|
||||
//}
|
||||
private string DecodeBase64(string strXMLCodificado)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user