Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -54,7 +54,6 @@ Partial Class PopUpBuscarClientes
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
|
||||
Dim Nombre As String = "-1"
|
||||
Dim Codigo As String = "-1"
|
||||
@@ -70,30 +69,37 @@ Partial Class PopUpBuscarClientes
|
||||
If TxtTelefono.Text.Trim <> String.Empty Then Telefono = TxtTelefono.Text.Trim
|
||||
If TxtMail.Text.Trim <> String.Empty Then Mail = TxtMail.Text.Trim
|
||||
|
||||
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjClientes.DtResultados
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 Then
|
||||
GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (10450, 10460, 10458)")
|
||||
LtlTotalRegistros.Text = "0"
|
||||
ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 Then
|
||||
GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (27448)")
|
||||
If ValidarUnFiltroSeleccionado() Then
|
||||
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
||||
DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente) Then
|
||||
If ObjClientes.DtResultados.Rows.Count > 0 Then
|
||||
LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjClientes.DtResultados
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 Then
|
||||
GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (10450, 10460, 10458)")
|
||||
LtlTotalRegistros.Text = "0"
|
||||
ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 Then
|
||||
GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (27448)")
|
||||
LtlTotalRegistros.Text = "0"
|
||||
End If
|
||||
Else
|
||||
LtlTotalRegistros.Text = "0"
|
||||
GV.DataSource = Nothing
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
LtlTotalRegistros.Text = "0"
|
||||
GV.DataSource = Nothing
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
GV.DataBind()
|
||||
|
||||
UPDatos.Update()
|
||||
|
||||
TblBusqueda.Visible = True
|
||||
Else
|
||||
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjClientes.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
|
||||
@@ -127,4 +133,17 @@ Partial Class PopUpBuscarClientes
|
||||
e.Row.FCLiteral("LtlMail").Text = String.Format("<div class='truncate' style='width:100px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Mail"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ValidarUnFiltroSeleccionado() As Boolean
|
||||
If TxtNombre.Text.Trim <> String.Empty Then Return True
|
||||
If TxtCodigo.Text.Trim <> String.Empty Then Return True
|
||||
If TxtNombreCorto.Text.Trim <> String.Empty Then Return True
|
||||
If TxtRFC.Text.Trim <> String.Empty Then Return True
|
||||
If TxtTelefono.Text.Trim <> String.Empty Then Return True
|
||||
If TxtMail.Text.Trim <> String.Empty Then Return True
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
|
||||
Return False
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -88,7 +88,6 @@ Partial Class PopUpBuscarFolio
|
||||
|
||||
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
|
||||
Dim Serie As String = "-1"
|
||||
Dim Folio As Integer = -1
|
||||
@@ -123,23 +122,31 @@ Partial Class PopUpBuscarFolio
|
||||
PeidoContrato = If(TxtPedidoContrato.Text.Length = 0, "-1", TxtPedidoContrato.Text.Trim)
|
||||
OrdenCompra = If(TxtOrdenCompra.Text.Length = 0, "-1", TxtOrdenCompra.Text.Trim)
|
||||
|
||||
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1), DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
LtlTotalRegistros.Text = "0"
|
||||
GV.DataSource = Nothing
|
||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||
If ValidarUnFiltroSeleccionado() Then
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero,
|
||||
DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1),
|
||||
DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||
GV.DataSource = ObjVentas.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
|
||||
|
||||
ObjVentas.Dispose()
|
||||
GV.DataBind()
|
||||
|
||||
UPDatos.Update()
|
||||
|
||||
TblBusqueda.Visible = True
|
||||
Else
|
||||
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
ObjVentas.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
|
||||
@@ -271,4 +278,20 @@ Partial Class PopUpBuscarFolio
|
||||
DdlEstatusFactura.Items.Add(New ListItem("Todos", "-1"))
|
||||
DdlEstatusFactura.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Function ValidarUnFiltroSeleccionado() As Boolean
|
||||
If DdlTipoDocto.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlEstatusFactura.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlUsuario.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlPS.SelectedValue.ToEntero > 0 Then Return True
|
||||
|
||||
If DdlNombre.SelectedValue.ToEntero > 0 Then Return True
|
||||
If TxtFolioFiscal.Text.Trim.Length > 0 Then Return True
|
||||
If TxtPedidoContrato.Text.Length > 0 Then Return True
|
||||
If TxtOrdenCompra.Text.Length > 0 Then Return True
|
||||
|
||||
Return False
|
||||
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -64,18 +64,24 @@ Partial Class PopUpBuscarPs
|
||||
If TxtCodigoBarras.Text.Trim = "" Then CodigoBarras = "-1" Else CodigoBarras = TxtCodigoBarras.Text.Trim
|
||||
If TxtNombre.Text = "" Then Nombre = "-1" Else Nombre = TxtNombre.Text.ToUpper
|
||||
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPS(-1, Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Codigo:=Codigo, CodigoBarras:=CodigoBarras, PS:=Nombre, pEstado:=DdlEstado.SelectedValue.ToEntero, CveTipoPS:=DdlCveTipoPS.SelectedValue.ToEntero, pAplicaParaVenta:=DdlAplicaVenta.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjPS.DtResultados
|
||||
dvbusqueda.Visible = True
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
dvbusqueda.Visible = False
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
If ValidarUnFiltroSeleccionado() Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPS(-1, Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Codigo:=Codigo, CodigoBarras:=CodigoBarras, PS:=Nombre,
|
||||
pEstado:=DdlEstado.SelectedValue.ToEntero, CveTipoPS:=DdlCveTipoPS.SelectedValue.ToEntero, pAplicaParaVenta:=DdlAplicaVenta.SelectedValue.ToEntero,
|
||||
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjPS.DtResultados
|
||||
dvbusqueda.Visible = True
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
dvbusqueda.Visible = False
|
||||
End If
|
||||
ObjPS.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
GvDatos.DataBind()
|
||||
GvDatos.UseAccessibleHeader = True
|
||||
Else
|
||||
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -91,6 +97,17 @@ Partial Class PopUpBuscarPs
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Function ValidarUnFiltroSeleccionado() As Boolean
|
||||
If TxtCodigo.Text.Trim <> String.Empty Then Return True
|
||||
If TxtCodigoBarras.Text.Trim <> String.Empty Then Return True
|
||||
If TxtNombre.Text.Trim <> String.Empty Then Return True
|
||||
|
||||
If DdlCveTipoPS.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlAplicaVenta.SelectedValue.ToEntero > 0 Then Return True
|
||||
If DdlCompuesto.SelectedValue.ToEntero > 0 Then Return True
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user