ClientesVendedoresSubProyectos

This commit is contained in:
rakcsle
2021-12-01 18:56:12 -07:00
parent edfc948945
commit 1e676fd18a
3 changed files with 83 additions and 2 deletions

View File

@@ -3868,6 +3868,28 @@ Public Class ClsPaginas
End Property
#End Region
Property GlobalDTClientesVendedoresSubProyectos(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTClientesVendedoresSubProyectos-{0}", CveEmpresa)
If Application(AppNombre) Is Nothing Then
Dim ObjInv As New ClsVentas
If ObjInv.GetClientesVendedoresSubProyectos(-1, -1, -1, CveEmpresa) Then Application(AppNombre) = ObjInv.DtResultados
ObjInv.Dispose()
End If
GlobalDTClientesVendedoresSubProyectos = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTClientesVendedoresSubProyectos-{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
#End Region

View File

@@ -5249,6 +5249,66 @@ Public Class ClsVentas
Return Retorno
End Function
#Region "C L I E N T E S V E N D E D O R E S S U B P R O Y E C T O S"
Public Function GetClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedoresSubProyectosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los vendedores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedoresSubProyectosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemoveClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedoresSubProyectosRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region "IDisposable Support"

View File

@@ -839,8 +839,7 @@ Partial Class Bancos_PolizaCheque
For Each Gvr As GridViewRow In GvMov.Rows
If Gvr.DataKey("CveConcepto").ToEntero = 30 Then
If Gvr.FCTextBox("TxtAbono").Text.ToDecimal = TxtImporte.Text.ToDecimal Then
If Gvr.FCTextBox("TxtAbono").Text.ToDecimal = TxtImporte.Text.ToDecimal Or Gvr.FCTextBox("TxtCargo").Text.ToDecimal = TxtImporte.Text.ToDecimal Then
ValidaConcepto30 = True
End If