Commit inicial Ventas Productivo
This commit is contained in:
73
Prospeccion/PopUpBuscarProspectos.aspx.vb
Normal file
73
Prospeccion/PopUpBuscarProspectos.aspx.vb
Normal file
@@ -0,0 +1,73 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Partial Class PopUpBuscarProspectos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private ReadOnly Property OpcionBusqueda As String
|
||||
Get
|
||||
Return ViewState("Opt").ToString
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CType(Me.Master, BaseMasterPage).EsPopup = True
|
||||
CType(Me.Master, BaseMasterPage).PopupWidth = 800
|
||||
RegistraScript("$get('tdContenido').style.height='520px'")
|
||||
TxtNombre.Focus()
|
||||
|
||||
ViewState("Opt") = IfNull(Request("Opt"), "")
|
||||
|
||||
If OpcionBusqueda = "SIP" Then BtnNuevo.Visible = True
|
||||
|
||||
If Not Request("EsThickbox") Is Nothing Then
|
||||
hdnEsThickbox.Value = Request("EsThickbox")
|
||||
Else
|
||||
hdnEsThickbox.Value = "N"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
|
||||
Dim ObjProsp As New ClsProspectos()
|
||||
|
||||
Dim Nombre As String = "-1"
|
||||
Dim NombreEmpresa As String = "-1"
|
||||
Dim Celular As String = "-1"
|
||||
|
||||
If TxtNombre.Text.Trim <> String.Empty Then Nombre = TxtNombre.Text.Trim
|
||||
If TxtNombreEmpresa.Text.Trim <> String.Empty Then NombreEmpresa = TxtNombreEmpresa.Text.Trim
|
||||
If txtCelular.Text.Trim <> String.Empty Then Celular = txtCelular.Text.Trim
|
||||
|
||||
If ObjProsp.GetProspectosDetalle(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, Nombre, NombreEmpresa, Celular, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProsp.DtResultados.Rows.Count > 0 Then
|
||||
LtlTotalRegistros.Text = ObjProsp.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjProsp.DtResultados
|
||||
|
||||
Else
|
||||
LtlTotalRegistros.Text = "0"
|
||||
GV.DataSource = Nothing
|
||||
Alert("No se encontraron registros con losparámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjProsp.Dispose()
|
||||
GV.DataBind()
|
||||
UPDatos.Update()
|
||||
TblBusqueda.Visible = True
|
||||
End Sub
|
||||
|
||||
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
'e.Row.Cells(0).Width = Unit.Pixel(250)
|
||||
'e.Row.Cells(1).Width = Unit.Pixel(80)
|
||||
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.FCHyperLink("Hpl").Attributes.Add("onclick", String.Format("Ir('/Prospeccion/Prospectos.aspx?CveProspecto={0}')", e.Row.DBCampo("CveProspecto")))
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user