diff --git a/App_Code/ClsCGame.vb b/App_Code/ClsCGame.vb index 417d972e9..50d497b46 100644 --- a/App_Code/ClsCGame.vb +++ b/App_Code/ClsCGame.vb @@ -492,7 +492,8 @@ Public Class ClsCGame #End Region #Region "ORDEN DE PRODUCCION" - Public Function GetOrdenProduccion(CveOrdenProduccion As Integer, CveEmpresa As Integer, CveEstatus As Integer, Folio As String, FEntregaI As Date, FEntregaF As Date, CveCliente As Integer) As Boolean + Public Function GetOrdenProduccion(CveOrdenProduccion As Integer, CveEmpresa As Integer, CveEstatus As Integer, Folio As String, FEntregaI As Date, FEntregaF As Date, + CveCliente As Integer, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CGame_OrdenProduccionGet") With SqlAdapter.SelectCommand.Parameters @@ -503,6 +504,7 @@ Public Class ClsCGame .Add("@FEntregaI", SqlDbType.Date).Value = FEntregaI .Add("@FEntregaF", SqlDbType.Date).Value = FEntregaF .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) @@ -1039,7 +1041,9 @@ Public Class ClsCGame #End Region #Region "PRODUCCION" - Public Function GetProduccion(CveEmpresa As Integer, Optional Folio As String = "-1", Optional CveProduccion As Integer = -1, Optional CveHuerta As Integer = -1, Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional Opcion As Integer = -1, Optional Modalidad As Integer = -1) As Boolean + Public Function GetProduccion(CveEmpresa As Integer, Optional Folio As String = "-1", Optional CveProduccion As Integer = -1, Optional CveHuerta As Integer = -1, + Optional FechaI As Date = MinFecha, Optional FechaF As Date = MaxFecha, Optional Opcion As Integer = -1, Optional Modalidad As Integer = -1, + Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CGame_ProduccionGet") With SqlAdapter.SelectCommand.Parameters @@ -1051,6 +1055,7 @@ Public Class ClsCGame .Add("@FechaF", SqlDbType.Date).Value = FechaF .Add("@Opcion", SqlDbType.Int).Value = Opcion .Add("@Modalidad", SqlDbType.Int).Value = Modalidad + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb index b4a4f540e..a07d2a7d3 100644 --- a/App_Code/ClsCRM.vb +++ b/App_Code/ClsCRM.vb @@ -651,7 +651,7 @@ Public Class ClsCRM Public Function GetAcercamiento(CveEmpresa As Integer, Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamiento As Integer = -1, Optional CveTipoProceso As Integer = -1, Optional CveVendedor As Integer = -1, Optional FechaInicio As String = "-1", Optional FechaFin As String = "-1", Optional NombreAcercamiento As String = "-1", Optional CveMedioCaptacion As Integer = -1, Optional CveRechazoMotivo As Integer = -1, Optional CveProbabilidad As Integer = -1, - Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1") As Boolean + Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1", Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_AcercamientoGet") With SqlAdapter.SelectCommand.Parameters @@ -673,6 +673,8 @@ Public Class ClsCRM .Add("@FechaFin", SqlDbType.VarChar).Value = FechaFin .Add("@FechaApertura", SqlDbType.VarChar).Value = FechaApertura .Add("@FechaCierre", SqlDbType.VarChar).Value = FechaCierre + + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 8d0ca08f7..3da032b9a 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -1880,7 +1880,8 @@ Public Class ClsContratos #Region " REPORTE BUSQUEDA" Public Function GetContratosBusquedaRep(TipoVenta As Integer, CveContratoTipo As Integer, NumeroContrato As String, DescripcionContrato As String, Ubicacion As String, Responsable As String, - EstatusContrato As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveCliente As Integer, CveProveedor As Integer) As Boolean + EstatusContrato As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveCliente As Integer, CveProveedor As Integer, + Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosBusquedaRepGet") @@ -1898,6 +1899,7 @@ Public Class ClsContratos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 6f2ebaad9..e74ffebca 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -732,7 +732,8 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetMovimientosRep(CveAlmacen As Integer, CveTipoMovimiento As Integer, Folio As Integer, FechaIngI As Date, FechaIngF As Date, FechaInicio As Date, FechaFin As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function GetMovimientosRep(CveAlmacen As Integer, CveTipoMovimiento As Integer, Folio As Integer, FechaIngI As Date, FechaIngF As Date, FechaInicio As Date, + FechaFin As Date, CveUsuario As Integer, CveEmpresa As Integer, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_MovimientosRep") @@ -746,6 +747,7 @@ Public Class ClsInventarios .Add("@FechaFin ", SqlDbType.DateTime).Value = FechaFin .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) @@ -1824,7 +1826,7 @@ Public Class ClsInventarios Optional FechaMovto As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional Caducidad As Date = MinFecha, Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, - Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Boolean + Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ExistenciasGet") @@ -1845,6 +1847,7 @@ Public Class ClsInventarios .Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir .Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados .Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect .Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output End With diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index cf460fdab..2aa435c09 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -1728,7 +1728,7 @@ Public Class ClsOC Public Function GetOrdenesCompraRep(Tipo As String, CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CveEstatus As Integer, FechaInicio As Date, FechaFin As Date, CveOrdenCompra As Integer, CveProveedor As Integer, Folio As Integer, CveUsuarioRegistro As Integer, CveUsuario As Integer, CveEmpresa As Integer, CvePS As Integer, Optional PendientePorSurtir As Boolean = False, Optional CveCliente As Integer = -1, Optional Guia As String = "-1", Optional CveActivoFijo As Integer = -1, - Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1) As Boolean + Optional SoloSubProyectosConPermiso As Boolean = False, Optional CveUsuarioAutorizo As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraRep") @@ -1754,6 +1754,7 @@ Public Class ClsOC .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@SoloSubProyectosConPermiso", SqlDbType.Bit).Value = SoloSubProyectosConPermiso .Add("@CveUsuarioAutorizo", SqlDbType.Int).Value = CveUsuarioAutorizo + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 565017490..431ef2037 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -470,7 +470,8 @@ Public Class ClsOS Return Retorno End Function - Public Function GetOrdenesServicios(CveOS As Integer, CveCliente As Integer, Folio As Integer, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1) As Boolean + Public Function GetOrdenesServicios(CveOS As Integer, CveCliente As Integer, Folio As Integer, CveUsuarioRecibio As Integer, CveEstatusOrdenServicio As Integer, + CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_OrdenesServiciosGet") @@ -482,6 +483,7 @@ Public Class ClsOS .Add("@CveUsuarioRecibio", SqlDbType.Int).Value = CveUsuarioRecibio .Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatusOrdenServicio .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@TopSelect", SqlDbType.Int).Value = TopSelect End With Try SqlAdapter.Fill(Data) diff --git a/CGame/PopUpBuscarEmpaque.aspx.cs b/CGame/PopUpBuscarEmpaque.aspx.cs index ce4a09ed2..e6e304158 100644 --- a/CGame/PopUpBuscarEmpaque.aspx.cs +++ b/CGame/PopUpBuscarEmpaque.aspx.cs @@ -31,7 +31,7 @@ public partial class CGame_PopUpBuscarProduccion :ClsPaginas String Folio; if (TxtFolio.Text != "") { Folio = TxtFolio.Text; } else { Folio = "-1"; } ClsCGame ObjCGame = new ClsCGame(); - if (ObjCGame.GetProduccion(UsuarioActual.CveEmpresa, Folio, -1, DdlHuerta.SelectedValue.ToEntero(), TxtFechaEntregaI.Text.ToDate(), TxtFechaEntregaF.Text.ToDate())) + if (ObjCGame.GetProduccion(UsuarioActual.CveEmpresa, Folio, -1, DdlHuerta.SelectedValue.ToEntero(), TxtFechaEntregaI.Text.ToDate(), TxtFechaEntregaF.Text.ToDate(),TopSelect:100)) { GvDatos.DataSource = ObjCGame.DtResultados; GvDatos.DataBind(); diff --git a/CGame/PopUpBuscarOrdenProduccion.aspx.vb b/CGame/PopUpBuscarOrdenProduccion.aspx.vb index f2bc848fc..ce1cd631e 100644 --- a/CGame/PopUpBuscarOrdenProduccion.aspx.vb +++ b/CGame/PopUpBuscarOrdenProduccion.aspx.vb @@ -39,7 +39,8 @@ Partial Class CGame_PopUpBuscarOrdenProduccion If TxtFolio.Text.Trim <> "" Then Folio = TxtFolio.Text Else Folio = "-1" If ValidarFiltrosSeleccionado() Then Dim ObjOP As New ClsCGame - If ObjOP.GetOrdenProduccion(-1, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, Folio, TxtFechaEntregaI.Text.ToDate, TxtFechaEntregaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero) Then + If ObjOP.GetOrdenProduccion(-1, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, Folio, TxtFechaEntregaI.Text.ToDate, TxtFechaEntregaF.Text.ToDate, + DdlCliente.SelectedValue.ToEntero, TopSelect:=100) Then GvOP.DataSource = ObjOP.DtResultados GvOP.DataBind() LtlTotalRegistros.Text = ObjOP.DtResultados.Rows.Count.ToString diff --git a/CRM/PopUpBuscarAcercamiento.aspx.cs b/CRM/PopUpBuscarAcercamiento.aspx.cs index 958a4cc7c..ecb41ae96 100644 --- a/CRM/PopUpBuscarAcercamiento.aspx.cs +++ b/CRM/PopUpBuscarAcercamiento.aspx.cs @@ -167,7 +167,8 @@ public partial class CRM_PopUpBuscarAcercamiento : ClsPaginas if (ValidarFiltrosSeleccionados()) { ClsCRM ObjCRM = new ClsCRM(); - if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM, -1, CveTipoProceso, CveVendedor, "-1", "-1", NombreAcercamiento, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidad, FechaApertura, FechaCierre)) + if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM, -1, CveTipoProceso, CveVendedor, "-1", "-1", NombreAcercamiento, CveMedioCaptacion, CveRechazoMotivo, + CveProbabilidad, FechaApertura, FechaCierre, TopSelect:100)) { GVDatos.DataSource = ObjCRM.DtResultados; GVDatos.DataBind(); diff --git a/Contratos/PopUpBuscarContrato.aspx.vb b/Contratos/PopUpBuscarContrato.aspx.vb index b25785ab2..b4daf97d0 100644 --- a/Contratos/PopUpBuscarContrato.aspx.vb +++ b/Contratos/PopUpBuscarContrato.aspx.vb @@ -145,7 +145,7 @@ Partial Class Contratos_PopUpBuscarContrato 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 + DdlProveedor.SelectedValue.ToEntero, TopSelect:=100)) Then GV.DataSource = objContratos.DtResultados LtlTotalRegistros.Text = objContratos.DtResultados.Rows.Count.ToString Else diff --git a/Inventarios/PopUpBuscarMovto.aspx.vb b/Inventarios/PopUpBuscarMovto.aspx.vb index 9f5c1dd38..3880f05ec 100644 --- a/Inventarios/PopUpBuscarMovto.aspx.vb +++ b/Inventarios/PopUpBuscarMovto.aspx.vb @@ -58,7 +58,7 @@ Partial Class PopUpBuscarFolio Dim FechaIngF = If(TxtFechaIngFin.Text.Trim <> "" AndAlso TxtFechaIngFin.Text <> "__/__/____", TxtFechaIngFin.Text.ToDate, MaxFecha) If Reporte.GetMovimientosRep(DdlAlmacen.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, If(TxtFolio.Text = "", "-1", TxtFolio.Text.Trim).ToEntero, - FechaIngI, FechaIngF, FechaInicial, FechaFinal, -1, UsuarioActual.CveEmpresa) Then + FechaIngI, FechaIngF, FechaInicial, FechaFinal, -1, UsuarioActual.CveEmpresa, TopSelect:=100) Then GvM.DataSource = Reporte.DtResultados LtlTotalRegistros.Text = Reporte.DtResultados.Rows.Count.ToString.FormatoNumero(0) Else diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb index c3bc4fc7c..a0b53ff50 100644 --- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb +++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb @@ -97,7 +97,8 @@ Partial Class Inventarios_Default If ValidarFiltrosSeleccionados() Then Dim ObjInventarios As New ClsInventarios() - If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then + If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), + ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, TopSelect:=100) Then Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") If dr IsNot Nothing Then diff --git a/OC/PopUpBuscarReq.aspx.vb b/OC/PopUpBuscarReq.aspx.vb index 043715c23..e10ef7db4 100644 --- a/OC/PopUpBuscarReq.aspx.vb +++ b/OC/PopUpBuscarReq.aspx.vb @@ -173,7 +173,7 @@ Partial Class OC_PopUpBuscarReq Dim ObjOC As New ClsOC ObjOC.GetOrdenesCompraRep(DdlTipo.SelectedValue, CveProyecto, CveSubProyecto, -1, DdlEstatus.SelectedValue.ToEntero, FI, MaxFecha, -1, DdlProveedor.SelectedValue.ToEntero, If(TxtFolio.Text.ToEntero <= 0, -1, TxtFolio.Text.ToEntero), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Guia:=guia, - SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False)) + SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), TopSelect:=100) Dim DtOC = ObjOC.DtResultados ' tipotermino, esattus inicial ObjOC.Dispose() diff --git a/Ventas/PopUpBuscarFolio.aspx.vb b/Ventas/PopUpBuscarFolio.aspx.vb index e2c6711cd..7ecfa5de0 100644 --- a/Ventas/PopUpBuscarFolio.aspx.vb +++ b/Ventas/PopUpBuscarFolio.aspx.vb @@ -280,12 +280,12 @@ Partial Class PopUpBuscarFolio End Sub Private Function ValidarUnFiltroSeleccionado() As Boolean - If DdlTipoDocto.SelectedValue.ToEntero > 0 Then Return True + If DdlTipoDocto.SelectedValue <> "-1" 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 TxtFolio.Text.Trim.Length > 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