Commit inicial Ventas Productivo
This commit is contained in:
100
Bancos/PopUpBuscarColectiva.aspx.vb
Normal file
100
Bancos/PopUpBuscarColectiva.aspx.vb
Normal file
@@ -0,0 +1,100 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Partial Class Bancos_PopUpBuscarColectiva
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private ReadOnly Property Tipo As Integer
|
||||
Get
|
||||
Return ViewState("Tipo").ToString.ToEntero
|
||||
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 = 780
|
||||
RegistraScript("$get('tdContenido').style.height='465px'")
|
||||
TxtColectiva.Focus()
|
||||
|
||||
If Request("EsThickbox") IsNot Nothing Then
|
||||
hdnEsThickbox.Value = Request("EsThickbox")
|
||||
Else
|
||||
hdnEsThickbox.Value = "N"
|
||||
End If
|
||||
|
||||
If Request("Tipo") IsNot Nothing AndAlso IsNumeric(Request("Tipo")) AndAlso Request("Tipo").ToEntero > 0 Then
|
||||
ViewState("Tipo") = Request("Tipo")
|
||||
DdlTipo.SelectedValue = ViewState("Tipo").ToString
|
||||
DdlTipo.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
|
||||
Dim ObjColectiva As New ClsGenerales
|
||||
|
||||
Dim Colectiva As String = "-1"
|
||||
Dim Codigo As String = "-1"
|
||||
'Dim RFC As String = "-1"
|
||||
'Dim Direccion As String = "-1"
|
||||
'Dim Telefono As String = "-1"
|
||||
'Dim Correo As String = "-1"
|
||||
'Dim Tipo As Integer = -1
|
||||
'Dim IdCtaContable As Integer = -1
|
||||
'Dim CtaContable As String = "-1"
|
||||
|
||||
If TxtColectiva.Text.Trim <> String.Empty Then Colectiva = TxtColectiva.Text.Trim
|
||||
If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim
|
||||
|
||||
If ObjColectiva.GetColectivas(-1, Colectiva, Codigo, DdlTipo.SelectedValue, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjColectiva.DtResultados.Rows.Count > 0 Then
|
||||
LtlTotalRegistros.Text = ObjColectiva.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjColectiva.DtResultados
|
||||
Else
|
||||
LtlTotalRegistros.Text = "0"
|
||||
GV.DataSource = Nothing
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjColectiva.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(40)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(200)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(200)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(60)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(60)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(130)
|
||||
End If
|
||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
Dim Liga As String = String.Empty
|
||||
|
||||
Liga = String.Format("<a class='Texto' href='javascript:Ir2({0},{1});'>", e.Row.DBCampo("CveColectiva"), e.Row.DBCampo("Tipo"))
|
||||
e.Row.FCLiteral("LtlCodigo").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("Codigo"))
|
||||
e.Row.FCLiteral("LtlDireccion").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("Direccion"))
|
||||
e.Row.FCLiteral("LtlColectiva").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("Colectiva"))
|
||||
e.Row.FCLiteral("LtlCorreo").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("Correo"))
|
||||
e.Row.FCLiteral("LtlRFC").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("RFC"))
|
||||
'e.Row.FCLiteral("LtlCtaContable").Text = String.Format("{0}{1}</a>", Liga, e.Row.DBCampo("CtaContable"))
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user