Commit inicial Ventas Productivo
This commit is contained in:
76
Prospeccion/RepProspeccionDetalle.aspx.vb
Normal file
76
Prospeccion/RepProspeccionDetalle.aspx.vb
Normal file
@@ -0,0 +1,76 @@
|
||||
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Prospeccion_RepProspeccionDetalle
|
||||
Inherits ClsPaginas
|
||||
'Confinguración
|
||||
#Region "Propiedades"
|
||||
|
||||
Private Property CveVendedor As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveVendedor")), -1, ViewState("CveVendedor").ToString.ToEntero)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveVendedor") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveClasificacion As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveClasificacion")), -1, ViewState("CveClasificacion").ToString.ToEntero)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveClasificacion") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveEstatus As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CveEstatus")), -1, ViewState("CveEstatus").ToString.ToEntero)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveEstatus") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Private Function RequestValue(Name As String, DefaultValue As Integer) As Integer
|
||||
If Not IsNothing(Request(Name)) AndAlso IsNumeric(Request(Name)) Then
|
||||
Return Request(Name).ToString.ToEntero
|
||||
End If
|
||||
Return DefaultValue
|
||||
End Function
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CveVendedor = RequestValue("CveVendedor", CveVendedor)
|
||||
CveClasificacion = RequestValue("CveClasificacion", CveClasificacion)
|
||||
CveEstatus = RequestValue("CveEstatus", CveEstatus)
|
||||
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) : DdlVendedor.DataBind() : DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlEstatus.DataSource = GlobalDTProspectosEstatus(UsuarioActual.CveEmpresa) : DdlEstatus.DataBind() : DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlProspectoClasificacion.DataSource = GlobalDTProspectosClasificaciones(UsuarioActual.CveEmpresa) : DdlProspectoClasificacion.DataBind() : DdlProspectoClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlVendedor.SelectedValueExist(CveVendedor.ToString())
|
||||
DdlEstatus.SelectedValueExist(CveEstatus.ToString())
|
||||
DdlProspectoClasificacion.SelectedValueExist(CveClasificacion.ToString())
|
||||
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero
|
||||
Dim CveClasificacion As Integer = DdlProspectoClasificacion.SelectedValue.ToEntero
|
||||
Dim CveEstatus As Integer = DdlEstatus.SelectedValue.ToEntero
|
||||
Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa
|
||||
Dim ObjPros As New ClsProspectos
|
||||
If ObjPros.GetRepProspeccionDetalle(CveVendedor, CveClasificacion, CveEstatus, CveEmpresa) Then
|
||||
GVDatos.DataSource = ObjPros.DtResultados
|
||||
GVDatos.DataBind()
|
||||
End If
|
||||
ObjPros.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user