autorización de límite
This commit is contained in:
@@ -4388,6 +4388,134 @@ Public Class ClsVentas
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region " AUTORIZACION LIMITES "
|
||||||
|
|
||||||
|
Public Function AutorizacionLimitesGet(CveCliente As Integer, CveCveVendedor As Integer, CveEstatus As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Vta_AutorizacionLimitesGet", CommandType.StoredProcedure)
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveCveVendedor", SqlDbType.Int).Value = CveCveVendedor
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
OnError("Ocurrió un error al obtener las Autorizaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function AutorizacionLimitesRemove(CveAutorizacion As Integer, CveCliente As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Vta_AutorizacionLimitesRemove", CommandType.StoredProcedure)
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
OnError("Ocurrió un error al eliminar la Autorización.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function AutorizacionLimitesAdd(CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveUsuario As Integer, CveEstatus As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Vta_AutorizacionLimitesAdd", CommandType.StoredProcedure)
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
|
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
OnError("Ocurrió un error al agregar la Autorización.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function AutorizacionLimitesEstatusUpdate(CveAutorizacion As Integer, CveCliente As Integer, CveVenta As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Vta_AutorizacionlimitesEstatusUpdate", CommandType.StoredProcedure)
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
|
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
OnError("Ocurrió un error al actualizar la Autorización.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function AutorizacionLimitesUpdate(CveAutorizacion As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Vta_AutorizacionLimitesUpdate", CommandType.StoredProcedure)
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
|
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
|
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
OnError("Ocurrió un error al actualizar el Estatus de la Autorización.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
#Region "CANCELACION REMISION"
|
#Region "CANCELACION REMISION"
|
||||||
|
|
||||||
Public Function UpdateCancelaRemision(CveVenta As Integer, SeCancelaRemision As Boolean) As Boolean
|
Public Function UpdateCancelaRemision(CveVenta As Integer, SeCancelaRemision As Boolean) As Boolean
|
||||||
|
|||||||
Reference in New Issue
Block a user