Reporte de unidades
This commit is contained in:
@@ -1996,6 +1996,25 @@ Public Class ClsGPS
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "V E H I C U L O S"
|
#Region "V E H I C U L O S"
|
||||||
|
Public Function GetRepUnidades(CveEmpresa As Integer, CveCliente As Integer, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha, Optional CveEstatus As Integer = -1) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_GPS_RepUnidades")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||||
|
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el reporte de los vehículos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Public Function VehiculoAdd(Modelo As String, Color As String, Serie As String, Nombre As String, NoEconomico As String, CveUsuario As Integer, CveCliente As Integer) As Boolean
|
Public Function VehiculoAdd(Modelo As String, Color As String, Serie As String, Nombre As String, NoEconomico As String, CveUsuario As Integer, CveCliente As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_GPS_VehiculoAdd")
|
DataAdapter("PA_GPS_VehiculoAdd")
|
||||||
|
|||||||
@@ -4609,6 +4609,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685)
|
PaginaDict.Add("/GPS/RepGastos.aspx".ToUpper(), 685)
|
||||||
PaginaDict.Add("/GPS/RecursoConfiableTracking.aspx".ToUpper(), 692)
|
PaginaDict.Add("/GPS/RecursoConfiableTracking.aspx".ToUpper(), 692)
|
||||||
PaginaDict.Add("/GPS/KimberlyClarkTracking.aspx".ToUpper(), -1)
|
PaginaDict.Add("/GPS/KimberlyClarkTracking.aspx".ToUpper(), -1)
|
||||||
|
PaginaDict.Add("/GPS/RepUnidades.aspx".ToUpper(), 780)
|
||||||
#End Region
|
#End Region
|
||||||
'INVENTARIOS
|
'INVENTARIOS
|
||||||
#Region "Inventarios"
|
#Region "Inventarios"
|
||||||
@@ -5942,6 +5943,19 @@ Public Class ClsPaginas
|
|||||||
Dim TipoDocumentoRef As String = ""
|
Dim TipoDocumentoRef As String = ""
|
||||||
Dim AplicaPagare As String = "1"
|
Dim AplicaPagare As String = "1"
|
||||||
|
|
||||||
|
Dim RFCReceptor As String = ""
|
||||||
|
|
||||||
|
If String.IsNullOrEmpty(Vta.RFCReceptor) Then
|
||||||
|
RFCReceptor = Vta.Cliente.RFC
|
||||||
|
If Vta.FacturarSucursal Then
|
||||||
|
If Vta.ClienteSucursal IsNot Nothing Then
|
||||||
|
RFCReceptor = Vta.ClienteSucursal.RFC
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
RFCReceptor = Vta.RFCReceptor
|
||||||
|
End If
|
||||||
|
|
||||||
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
|
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
|
||||||
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
||||||
Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||||
@@ -6071,7 +6085,7 @@ Public Class ClsPaginas
|
|||||||
'Si no tiene CBB, SE GENERA
|
'Si no tiene CBB, SE GENERA
|
||||||
If Not ImagenCBB.Exists Then
|
If Not ImagenCBB.Exists Then
|
||||||
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||||
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
||||||
End If
|
End If
|
||||||
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||||
|
|
||||||
@@ -6086,7 +6100,7 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
'CLIENTE
|
'CLIENTE
|
||||||
params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo))
|
params.Add(New CrystalParametro("ClienteCodigo", Vta.Cliente.Codigo))
|
||||||
params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
|
params.Add(New CrystalParametro("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso RFCReceptor = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
|
||||||
params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion))
|
params.Add(New CrystalParametro("ClienteDireccion", ClienteDireccion))
|
||||||
params.Add(New CrystalParametro("ClienteLugar", ClienteLugar))
|
params.Add(New CrystalParametro("ClienteLugar", ClienteLugar))
|
||||||
|
|
||||||
@@ -6118,7 +6132,7 @@ Public Class ClsPaginas
|
|||||||
params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
|
params.Add(New CrystalParametro("SelloSAT", Vta.SelloSAT))
|
||||||
|
|
||||||
params.Add(New CrystalParametro("QR", ImgCBB))
|
params.Add(New CrystalParametro("QR", ImgCBB))
|
||||||
params.Add(New CrystalParametro("ClienteRFC", Vta.Cliente.RFC))
|
params.Add(New CrystalParametro("ClienteRFC", RFCReceptor))
|
||||||
params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText))
|
params.Add(New CrystalParametro("FormaPago", Vta.FormaPagoText))
|
||||||
params.Add(New CrystalParametro("Moneda", Vta.Moneda))
|
params.Add(New CrystalParametro("Moneda", Vta.Moneda))
|
||||||
params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
|
params.Add(New CrystalParametro("TipoCambio", Vta.TipoCambio.ToString))
|
||||||
@@ -6453,7 +6467,18 @@ Public Class ClsPaginas
|
|||||||
Dim NombreArchivoDescarga As String = ""
|
Dim NombreArchivoDescarga As String = ""
|
||||||
Dim TipoDocumento As String = ""
|
Dim TipoDocumento As String = ""
|
||||||
Dim TipoDocumentoRef As String = ""
|
Dim TipoDocumentoRef As String = ""
|
||||||
|
Dim RFCReceptor As String = ""
|
||||||
|
|
||||||
|
If String.IsNullOrEmpty(Vta.RFCReceptor) Then
|
||||||
|
RFCReceptor = Vta.Cliente.RFC
|
||||||
|
If Vta.FacturarSucursal Then
|
||||||
|
If Vta.ClienteSucursal IsNot Nothing Then
|
||||||
|
RFCReceptor = Vta.ClienteSucursal.RFC
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
RFCReceptor = Vta.RFCReceptor
|
||||||
|
End If
|
||||||
|
|
||||||
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
|
Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio)
|
||||||
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
||||||
@@ -6608,7 +6633,7 @@ Public Class ClsPaginas
|
|||||||
'Si no tiene CBB, SE GENERA
|
'Si no tiene CBB, SE GENERA
|
||||||
If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then
|
If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then
|
||||||
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||||
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, Vta.Cliente.RFC, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
|
||||||
End If
|
End If
|
||||||
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
|
||||||
|
|
||||||
@@ -6629,14 +6654,14 @@ Public Class ClsPaginas
|
|||||||
params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
|
params.Add(New ReportParameter("ClienteNombre", If(Vta.ClienteSucursal.ImprimeNombreSucursal = "True", If(Vta.CveClienteSucursal > 0, Vta.ClienteSucursal.Sucursal, Vta.Cliente.Nombre), If(Vta.AtencionA <> "" AndAlso Vta.TipoDocto.Contiene("Ing", "Rem") AndAlso Vta.Cliente.RFC = "XAXX010101000", $"{Vta.Cliente.Nombre}({Vta.AtencionA})", Vta.Cliente.Nombre))))
|
||||||
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
|
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
|
||||||
params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
|
params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
|
||||||
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
|
params.Add(New ReportParameter("ClienteRFC", RFCReceptor))
|
||||||
End If
|
End If
|
||||||
If Vta.CveEmpresaCRM.ToEntero > 0 Then
|
If Vta.CveEmpresaCRM.ToEntero > 0 Then
|
||||||
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
|
params.Add(New ReportParameter("ClienteCodigo", Vta.Cliente.Codigo))
|
||||||
params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre))
|
params.Add(New ReportParameter("ClienteNombre", Vta.Cliente.Nombre))
|
||||||
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
|
params.Add(New ReportParameter("ClienteDireccion", ClienteDireccion))
|
||||||
params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
|
params.Add(New ReportParameter("ClienteLugar", ClienteLugar))
|
||||||
params.Add(New ReportParameter("ClienteRFC", Vta.Cliente.RFC))
|
params.Add(New ReportParameter("ClienteRFC", RFCReceptor))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'TOTALES
|
'TOTALES
|
||||||
|
|||||||
@@ -1686,6 +1686,34 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetRepPSDiario(CveSubProyecto As Integer, CvePS As Integer, FechaConsulta As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
|
||||||
|
Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_RepPSDiarioGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@FechaConsulta", SqlDbType.Date).Value = FechaConsulta
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||||
|
.Add("@GPO", SqlDbType.Int).Value = GPO
|
||||||
|
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
|
.Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio
|
||||||
|
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dataset = New DataSet()
|
||||||
|
SqlAdapter.Fill(Dataset)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el Reporte diario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetRepNCxAplicar(CveClienteSucursal As Integer, CveSubProyecto As Integer, CveCliente As Integer, FechaInicio As DateTime, FechaFin As DateTime, ConSaldo As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetRepNCxAplicar(CveClienteSucursal As Integer, CveSubProyecto As Integer, CveCliente As Integer, FechaInicio As DateTime, FechaFin As DateTime, ConSaldo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|||||||
264
GPS/RepUnidades.aspx
Normal file
264
GPS/RepUnidades.aspx
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepUnidades.aspx.vb" Inherits="GPS_RepUnidades" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.select2-selection__rendered {
|
||||||
|
margin-top: 0px;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollBody table th {
|
||||||
|
padding: 0px !important;
|
||||||
|
padding-right: 4px !important;
|
||||||
|
padding-left: 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-scrollable {
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scrollFoot {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dataTables_scroll {
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table.dataTable {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table table-striped table-hover dataTable no-footer {
|
||||||
|
margin-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Excede {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psagregar > div.comboxes {
|
||||||
|
display: inline-block;
|
||||||
|
width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psagregar > div.codigo input {
|
||||||
|
width: 79px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psagregar > div.codigo {
|
||||||
|
display: inline-block;
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.psagregar > div.codigo > input[type="submit"] {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.widget-thumb {
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb.bordered {
|
||||||
|
border: 3px solid whitesmoke;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-heading {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #8e9daa;
|
||||||
|
margin: 0px 5px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-wrap {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-wrap .widget-thumb-icon {
|
||||||
|
float: left;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 41px;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-body {
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-body .widget-thumb-subtitle {
|
||||||
|
padding-top: 2px;
|
||||||
|
display: block;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #8e9daa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-thumb .widget-thumb-body .widget-thumb-body-stat {
|
||||||
|
display: block;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #3e4f5e;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte de Unidades
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" ValidationGroup="GrpGuardar" Text="Consultar" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption" style="margin-top: -8px;">
|
||||||
|
<ul class="list-inline" style="font-size: 12px;">
|
||||||
|
<li>Empresa:
|
||||||
|
<asp:DropDownList ID="DdlEmpresa" runat="server" OnSelectedIndexChanged="DdlEmpresa_SelectedIndexChanged" AutoPostBack="true" Width="200px" DataTextField="Empresa" DataValueField="CveEmpresa" CssClass="form-control input-sm select2me">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</li>
|
||||||
|
<li>Cliente:
|
||||||
|
<asp:DropDownList ID="DdlCliente" runat="server" Width="200px" DataTextField="Nombre" DataValueField="CveCliente" CssClass="form-control input-sm select2me">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</li>
|
||||||
|
<li>Fecha Inicio:
|
||||||
|
|
||||||
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
||||||
|
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>Fecha Fin:
|
||||||
|
|
||||||
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||||
|
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>Estatus:
|
||||||
|
<asp:DropDownList ID="DdlEstatus" runat="server" Width="100px" CssClass="form-control input-sm select2me">
|
||||||
|
<asp:ListItem Selected="True" Value="-1" Text="Todos"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="1" Text="Activo"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="0" Text="Inactivo"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">Total Unidades</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i class="widget-thumb-icon bg-blue fa fa-car"></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="LtlTotalUnidades" Text="0" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">Unidades Activas</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i class="widget-thumb-icon bg-green-jungle fa fa-car"></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="LtlActivas" Text="0" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||||
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
|
<h4 class="widget-thumb-heading">Unidades Inactivas</h4>
|
||||||
|
<div class="widget-thumb-wrap">
|
||||||
|
<i class="widget-thumb-icon bg-red fa fa-car"></i>
|
||||||
|
<div class="widget-thumb-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<span class="widget-thumb-body-stat">
|
||||||
|
<asp:Literal ID="LtlInactivas" Text="0" runat="server" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet light smmallpadding traspasorow bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Unidades</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body rowpadding">
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" GridLines="None" OnRowDataBound="GvDatos_RowDataBound" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-rows="1" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de unidades">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="NombreVehiculo" ItemStyle-Width="12.5%" HeaderText="Vehículo - NoEconomico" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="Empresa" ItemStyle-Width="12.5%" HeaderText="Empresa" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="Cliente" ItemStyle-Width="12.5%" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
<asp:BoundField DataField="SSID" ItemStyle-Width="12.5%" HeaderText="SSID" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField DataField="Telefono" ItemStyle-Width="12.5%" HeaderText="Telefono" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField DataField="IMEI" ItemStyle-Width="12.5%" HeaderText="IMEI" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="12.5%" HeaderText="Fecha Ingreso" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField DataField="FechaAlta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="12.5%" HeaderText="Fecha Alta" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:TemplateField ItemStyle-Width="12.5%" HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LblEstatus" runat="server" Text='<%# Eval("Estatus") %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
97
GPS/RepUnidades.aspx.vb
Normal file
97
GPS/RepUnidades.aspx.vb
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
Imports System.Data
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
Partial Class GPS_RepUnidades
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
CargaCombos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
If UsuarioActual.CveRol = 1 Then
|
||||||
|
DdlEmpresa.DataSource = GlobalDTEmpresas().FiltraParametros("CvePlataforma = 3")
|
||||||
|
DdlEmpresa.DataBind()
|
||||||
|
DdlEmpresa.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||||
|
|
||||||
|
DdlCliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
Else
|
||||||
|
DdlEmpresa.DataSource = GlobalDTEmpresas().FiltraParametros($"CvePlataforma = 3 AND CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||||
|
DdlEmpresa.DataBind()
|
||||||
|
|
||||||
|
CargaClientes()
|
||||||
|
End If
|
||||||
|
|
||||||
|
UPFiltros.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
Select Case e.Row.DBCampo("TipoFila")
|
||||||
|
Case "1"
|
||||||
|
e.Row.CssClass = "Totales"
|
||||||
|
Case "2"
|
||||||
|
e.Row.CssClass = "SubTotales"
|
||||||
|
Case "3"
|
||||||
|
If e.Row.DBCampo("CveEstatus") = "0" Then
|
||||||
|
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-danger"
|
||||||
|
Else
|
||||||
|
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-success"
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
Dim FechaI As DateTime = MinFecha, FechaF As DateTime = MaxFecha
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(txtFechaI.Text) Then
|
||||||
|
FechaI = txtFechaI.Text.ToDateTime()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(txtFechaF.Text) Then
|
||||||
|
FechaF = txtFechaF.Text.ToDateTime()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Using ObjGPS As New ClsGPS
|
||||||
|
If ObjGPS.GetRepUnidades(DdlEmpresa.SelectedValue.ToEntero(), DdlCliente.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF, CveEstatus:=DdlEstatus.SelectedValue.ToEntero()) Then
|
||||||
|
GvDatos.DataSource = ObjGPS.DtResultados
|
||||||
|
|
||||||
|
Dim DtUnidades As DataTable = ObjGPS.DtResultados.FiltraParametros("CveDispositivo > 0", DistinctColumns:={"CveDispositivo", "CveEstatus"})
|
||||||
|
|
||||||
|
LtlTotalUnidades.Text = DtUnidades.Rows.Count.ToString()
|
||||||
|
LtlActivas.Text = DtUnidades.COUNT("CveDispositivo", "CveEstatus = 1").ToString()
|
||||||
|
LtlInactivas.Text = DtUnidades.COUNT("CveDispositivo", "CveEstatus = 0").ToString()
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
GvDatos.DataBind()
|
||||||
|
|
||||||
|
UpDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlEmpresa_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
CargaClientes()
|
||||||
|
UpDatos.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaClientes()
|
||||||
|
If DdlEmpresa.SelectedValue.ToEntero() > 0 Then
|
||||||
|
DdlCliente.DataSource = GlobalDTCliente(DdlEmpresa.SelectedValue.ToEntero())
|
||||||
|
Else
|
||||||
|
DdlCliente.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
DdlCliente.DataBind()
|
||||||
|
DdlCliente.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
Reference in New Issue
Block a user