Buscar solo clientes que pertenecen al vendedor
This commit is contained in:
@@ -265,7 +265,7 @@ Public Class ClsClientes
|
||||
End Sub
|
||||
Public Function GetClientes(CveCliente As Integer, Nombre As String, Codigo As String, NombreCorto As String, RFC As String, Telefono As String, Mail As String, CveSubProyecto As Integer,
|
||||
CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional Notificar As String = "-1", Optional CvePrecioLista As Integer = -1, Optional CveClienteClasificacion As Integer = -1,
|
||||
Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean
|
||||
Optional TipoCliente As Integer = -1, Optional CveVendedor As Integer = -1, Optional PermiteCreditoFiltro As Integer = -1, Optional TopSelect As Integer = 10000, Optional CveUsuarioConsulta As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_ClientesGet")
|
||||
@@ -285,6 +285,7 @@ Public Class ClsClientes
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@PermiteCredito", SqlDbType.Int).Value = PermiteCreditoFiltro
|
||||
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||
End With
|
||||
|
||||
@@ -72,8 +72,15 @@ Partial Class PopUpBuscarClientes
|
||||
If ValidarUnFiltroSeleccionado() Then
|
||||
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
Dim CveUsuarioConsulta As Integer
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(322) Then
|
||||
CveUsuarioConsulta = UsuarioActual.CveVendedor
|
||||
Else
|
||||
CveUsuarioConsulta = -1
|
||||
End If
|
||||
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
||||
DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100) Then
|
||||
DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente, TopSelect:=100, CveUsuarioConsulta:=CveUsuarioConsulta) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjClientes.DtResultados
|
||||
|
||||
Reference in New Issue
Block a user