Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -125,7 +125,7 @@ Partial Class Contratos_PopUpBuscarContrato
|
||||
End Sub
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs) Handles BtnBuscar.Click
|
||||
|
||||
Dim objContratos As New ClsContratos
|
||||
|
||||
|
||||
Dim NumeroContrato As String = "-1"
|
||||
Dim Estatus As Integer = 1
|
||||
@@ -141,20 +141,27 @@ Partial Class Contratos_PopUpBuscarContrato
|
||||
If TxtResponsable.Text.Trim.Length > 0 Then Responsable = TxtResponsable.Text
|
||||
If TxtNumeroContrato.Text.Trim.Length > 0 Then NumeroContrato = TxtNumeroContrato.Text
|
||||
|
||||
If (objContratos.GetContratosBusquedaRep(DdlTipo.SelectedValue.ToEntero, DdlTipoContrato.SelectedValue.ToEntero, NumeroContrato, Descripcion,
|
||||
Ubicacion, Responsable, Estatus, DdlProyecto.SelectedValue.ToEntero, DdlSubProtecto.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, DdlCliente.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero)) Then
|
||||
GV.DataSource = objContratos.DtResultados
|
||||
LtlTotalRegistros.Text = objContratos.DtResultados.Rows.Count.ToString
|
||||
If ValidarUnFiltroSeleccionado() Then
|
||||
Dim objContratos As New ClsContratos
|
||||
If (objContratos.GetContratosBusquedaRep(DdlTipo.SelectedValue.ToEntero, DdlTipoContrato.SelectedValue.ToEntero, NumeroContrato, Descripcion, Ubicacion, Responsable, Estatus,
|
||||
DdlProyecto.SelectedValue.ToEntero, DdlSubProtecto.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, DdlCliente.SelectedValue.ToEntero,
|
||||
DdlProveedor.SelectedValue.ToEntero)) Then
|
||||
GV.DataSource = objContratos.DtResultados
|
||||
LtlTotalRegistros.Text = objContratos.DtResultados.Rows.Count.ToString
|
||||
Else
|
||||
GV.DataSource = Nothing
|
||||
LtlTotalRegistros.Text = "0"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
objContratos.Dispose()
|
||||
GV.DataBind()
|
||||
UPDatos.Update()
|
||||
Else
|
||||
GV.DataSource = Nothing
|
||||
LtlTotalRegistros.Text = "0"
|
||||
Alert("Seleccione un criterio de busqueda", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
objContratos.Dispose()
|
||||
GV.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
|
||||
@@ -173,6 +180,19 @@ Partial Class Contratos_PopUpBuscarContrato
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ValidarUnFiltroSeleccionado() As Boolean
|
||||
If TxtDescripcion.Text.Trim.Length > 0 Then Return True
|
||||
If TxtUbicacion.Text.Trim.Length > 0 Then Return True
|
||||
If TxtResponsable.Text.Trim.Length > 0 Then Return True
|
||||
If TxtNumeroContrato.Text.Trim.Length > 0 Then Return True
|
||||
'If DdlTipo.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlTipoContrato.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlProyecto.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlSubProtecto.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlCliente.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlProveedor.SelectedValue.ToEntero > 0 Then Return True
|
||||
Return False
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user