694 lines
43 KiB
Plaintext
694 lines
43 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCombustible.aspx.vb" Inherits="GPS_RepCombustible" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<link href="/Metronic/assets/layouts/layout3/css/jquery.datetimepicker.css" rel="stylesheet" />
|
|
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
|
<style>
|
|
.amcharts-chart-div >svg {
|
|
padding-top: 20px;
|
|
}
|
|
.amcharts-chart-div >div {
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.circuloAmarillo {
|
|
width: 40%;
|
|
height: 400%;
|
|
border: 4px solid;
|
|
border-radius: 50% !important;
|
|
border-color: #c29d0b;
|
|
font-size: 30px;
|
|
color: #fff;
|
|
line-height: 405%;
|
|
text-align: center;
|
|
background-color: #FFFFFF;
|
|
margin-left: 30%;
|
|
margin-top: -10%;
|
|
}
|
|
|
|
.amarillo {
|
|
color: #c29d0b;
|
|
}
|
|
|
|
.contenedor {
|
|
margin: 0 auto;
|
|
text-align: left;
|
|
color: #989A8F;
|
|
width: 450px;
|
|
height: 200px;
|
|
}
|
|
|
|
.amcharts-chart-div a {
|
|
display: none !important;
|
|
}
|
|
|
|
svg:not(:root) {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.calificador {
|
|
height: 270px;
|
|
width: 75%;
|
|
text-align: center;
|
|
}
|
|
|
|
.toplistaAmarillo {
|
|
background-color: #c29d0b;
|
|
height: 33%;
|
|
width: 300px;
|
|
padding-top: 17%;
|
|
}
|
|
|
|
#chartdiv {
|
|
width: 100%;
|
|
height: 500px;
|
|
}
|
|
|
|
.tb > tbody > tr {
|
|
height: 30px !important;
|
|
}
|
|
|
|
#chartdiv > div > div > svg > g:nth-child(15) > g:nth-child(1) {
|
|
visibility: hidden;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
|
Reporte de Combustibles
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
<li>
|
|
<asp:LinkButton ID="LinkPDF" runat="server" OnClick="LinkPDF_Click"> <i class="fa fa-ad-pdf"></i> Imprimir</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:LinkButton ID="LnkHistorial" runat="server" OnClick="LnkHistorial_Click"> <i class="fa fa-ad-excel"></i> Historial</asp:LinkButton>
|
|
</li>
|
|
<li>
|
|
<asp:LinkButton ID="Lnkreportegral" runat="server" OnClick="Lnkreportegral_Click"> <i class="fa fa-ad-excel"></i> Reporte</asp:LinkButton>
|
|
</li>
|
|
</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" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
<a href="javascript:;" class="expand"></a>
|
|
</div>
|
|
<div class="titlefiltros caption">
|
|
<div class="row">
|
|
<div class="col-md-1 truncate">
|
|
Vehiculo:
|
|
</div>
|
|
<div class="col-md-3 ">
|
|
<asp:DropDownList ID="DdlDispositivo" runat="server" DataTextField="NombreVehiculo" DataValueField="CveDispositivo" CssClass="form-control input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
|
|
<div class="col-md-1 truncate">
|
|
Fecha Inicio:
|
|
</div>
|
|
<div class="col-md-2">
|
|
|
|
<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>
|
|
<asp:RequiredFieldValidator ID="RFVtxtFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpFechas"></asp:RequiredFieldValidator>
|
|
|
|
<%--<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999 00:00" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
|
|
<%-- <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
</div> <ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
|
</div>
|
|
<div class="col-md-1 truncate">
|
|
Fecha Fin:
|
|
</div>
|
|
<div class="col-md-2">
|
|
|
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
|
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVtxtFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpFechas"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVtxtFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<%--<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999 00:00" MaskType="DateTime" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>--%>
|
|
</div>
|
|
<%--<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
</div>
|
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body" style="display: none;">
|
|
<asp:HiddenField ID="HdfVGrafica" ClientIDMode="Static" runat="server" />
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<asp:UpdatePanel UpdateMode="Conditional" ID="UpReporte" runat="server">
|
|
<ContentTemplate>
|
|
<div runat="server" id="DvReporte" visible="false">
|
|
<asp:UpdatePanel runat="server" ID="UpDash" UpdateMode="conditional">
|
|
<ContentTemplate>
|
|
<div class="Row">
|
|
<div class="col-md-12">
|
|
<div class="portlet light">
|
|
<div class="portlet-title">
|
|
<div class="caption" style="font-size: 17px; width: 80%;">
|
|
<span style="font-size: 24px; font-weight: bold; text-align: center">Reporte de combustible de unidad:
|
|
<asp:Literal ID="LtlUnidad" runat="server"></asp:Literal></span>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="#" class="fullscreen" data-original-title="" title=""></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body">
|
|
<div class="col-md-3">
|
|
<a class="dashboard-stat dashboard-stat-v2 green" href="#">
|
|
<div class="visual">
|
|
<i class="fa fa-tachometer" aria-hidden="true"></i>
|
|
</div>
|
|
<div class="details">
|
|
<div class="number">
|
|
<span data-counter="counterup" data-value="549">
|
|
<asp:Literal runat="server" ID="lblVelocidad"></asp:Literal></span> KM/H
|
|
</div>
|
|
<div class="desc">Velocidad Máxima</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<a class="dashboard-stat dashboard-stat-v2 blue" href="#">
|
|
<div class="visual">
|
|
<i class="material-icons">local_gas_station</i>
|
|
</div>
|
|
<div class="details">
|
|
<div class="number">
|
|
<span data-counter="counterup" data-value="1349">
|
|
<asp:Literal runat="server" ID="lblRendBruto"></asp:Literal></span> KM/L
|
|
</div>
|
|
<div class="desc">Rendimiento</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<a class="dashboard-stat dashboard-stat-v2 yellow" href="#">
|
|
<div class="visual">
|
|
<i class="fa fa-line-chart"></i>
|
|
</div>
|
|
<div class="details">
|
|
<div class="number">
|
|
<span data-counter="counterup" data-value="549">
|
|
<asp:Literal runat="server" ID="LtlDistanciaR"></asp:Literal></span>
|
|
</div>
|
|
<div class="desc">KM Recorridos</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<a class="dashboard-stat dashboard-stat-v2 red" href="#">
|
|
<div class="visual">
|
|
<i class="glyphicon glyphicon-tint" aria-hidden="true"></i>
|
|
</div>
|
|
<div class="details">
|
|
<div class="number">
|
|
<span data-counter="counterup" data-value="12.5">
|
|
<asp:Literal runat="server" ID="LtlCombustibleConsumido"></asp:Literal></span> Lts
|
|
</div>
|
|
<div class="desc">Combustible Consumido</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<asp:UpdatePanel ID="UPTabla" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<!-- BEGIN SAMPLE TABLE PORTLET-->
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="portlet light smmallpadding traspasorow bordered" style="margin-top: 48px">
|
|
<div class="portlet-title">
|
|
<div class="caption">
|
|
<i class="fa fa-list"></i>Desglose
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body">
|
|
<div class="table-scrollable">
|
|
<table class="table table-striped table-bordered table-advance table-hover tb">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Valor</th>
|
|
<th>
|
|
<i class="fa fa-flask"></i>Combustible (Lts) </th>
|
|
<th>
|
|
<i class="fa fa-usd"></i>Total (MXN)</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="highlight">
|
|
<div class="success"></div>
|
|
<a style="pointer-events: none; font-weight: bold; color: black">Combustible Inicial</a>
|
|
</td>
|
|
<td></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlCombustibleInicial" runat="server" /></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlCostoInicial" runat="server" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="highlight">
|
|
<div class="info"></div>
|
|
<asp:LinkButton Style="font-weight: bold" Text="Cargas" runat="server" ID="lbCargas"></asp:LinkButton>
|
|
</td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlNoCargas" runat="server" /></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="SumaCargas" runat="server" /></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlCostoCargas" runat="server" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="highlight">
|
|
<div class="warning"></div>
|
|
<asp:LinkButton Style="font-weight: bold" Text="Descargas" runat="server" ID="lbDescargas"></asp:LinkButton>
|
|
</td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlNoDescargas" runat="server" /></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="SumaDescargas" runat="server" /></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlCostoDescargas" runat="server" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="highlight">
|
|
<div class="info"></div>
|
|
<a style="pointer-events: none; font-weight: bold; color: black">Recorrido</a>
|
|
</td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlDistancia" runat="server" /></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="lCombustibleConsumido" runat="server" /></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlCostoConsumo" runat="server" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="highlight">
|
|
<div class="success"></div>
|
|
<a style="pointer-events: none; font-weight: bold; color: black">Combustible Final</a>
|
|
</td>
|
|
<td></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlCombustibleFinal" runat="server" /></td>
|
|
<td style="text-align: right">
|
|
<asp:Literal ID="LtlCostoCombustibleF" runat="server" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="portlet-title">
|
|
</div>
|
|
<div class="portlet light smmallpadding traspasorow bordered" style="margin-top: 48px">
|
|
<div class="portlet-title">
|
|
<div class="caption font-red">
|
|
<i class="fa fa-clock-o font-red"></i>
|
|
<span class="caption-subject bold uppercase">TIEMPOS OPERATIVOS</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div runat="server" id="bodyreportes" class="portlet-body rowpadding">
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<label style="font-weight: bold;">Ralentí: </label>
|
|
<br />
|
|
<asp:Literal runat="server" ID="LtlRalenti"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label style="font-weight: bold;">Tiempo Movimiento: </label>
|
|
<br />
|
|
<asp:Literal runat="server" ID="lblMovimiento"></asp:Literal>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label style="font-weight: bold;">Tiempo Muerto: </label>
|
|
<br />
|
|
<asp:Literal runat="server" ID="lblMuerto"></asp:Literal>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- END SAMPLE TABLE PORTLET-->
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<asp:UpdatePanel runat="server" UpdateMode="conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet ">
|
|
<div class="portlet-title">
|
|
<div class="caption">
|
|
<i class="fa fa-area-chart"></i>Historico
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
|
<a href="javascript:;" class="fullscreen " style="visibility: hidden;"></a>
|
|
<a href="javascript:;" class="fullscreen " style="visibility: hidden;"></a>
|
|
</div>
|
|
<div class="actions">
|
|
<div style="text-align: left;">
|
|
<b>Mostrar(Encendido/Apagado)</b>
|
|
<asp:CheckBox ID="ChkEncendido" ClientIDMode="Static" Checked="true" Text=" " CssClass="chksino ChkSinFuncion" runat="server" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body">
|
|
<asp:HiddenField ID="HdnChartBase64" runat="server" ClientIDMode="Static" Value="" />
|
|
<div id="chartdiv"></div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
<asp:UpdatePanel ID="upDatosComb" runat ="server" UpdateMode="Conditional" Visible="false" >
|
|
<ContentTemplate>
|
|
<asp:GridView ID="GVCombustibleResumen" runat="server" GridLines="None" CssClass ="table table-hover table-striped ScrollAD" AutoGenerateColumns="False"
|
|
datakeynames="CveTrama,Fecha,Combustible,Encendido,SPD,Detenido,Latitud,Longitud,Suavizado,Grupo">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="Fecha">
|
|
<ItemTemplate>
|
|
<asp:Label ID="lblfecha" runat="server" Text='<%# Eval("Fecha")%>'> </asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Encendido">
|
|
<ItemTemplate>
|
|
<asp:Label ID="lblencendido" runat="server" Text='<%#If(Eval("Encendido").ToString() = "1", "SI", "NO")%>'> </asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Velocidad">
|
|
<ItemTemplate>
|
|
<asp:Label ID="lblsPD" runat="server" Text='<%# Eval("SPD")%>'> </asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Detenido">
|
|
<ItemTemplate>
|
|
<asp:Label ID="lbldetenido" runat="server" Text='<%#If(Eval("Detenido").ToString() = "1", "SI", "NO")%>'> </asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Grupo" Visible="false">
|
|
<ItemTemplate>
|
|
<asp:Label ID="lblgrupo" runat="server" Text='<%# Eval("Grupo")%>'> </asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Combustible">
|
|
<ItemTemplate>
|
|
<asp:Label ID="lblcombustible" runat="server" Text='<%# Eval("Combustible")%>'> </asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Suavizado">
|
|
<ItemTemplate>
|
|
<asp:Label ID="lblsuavizado" runat="server" Text='<%# Eval("Suavizado")%>'> </asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Ubicación">
|
|
<ItemTemplate><asp:Label runat="server" Text='<%#String.Format("http://maps.google.com/maps?q={0},{1}&ll={0},{1}&z=17", Eval("Latitud"), Eval("Longitud"))%>'> </asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:HyperLinkField Visible=" false " HeaderText="Mapa" DataNavigateUrlFields="Latitud,Longitud" DataNavigateUrlFormatString="http://maps.google.com/maps?q={0},{1}&ll={0},{1}&z=17" Text='mapa' />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
|
|
<!-- EMPIEZA MODAL CARGAS/DESCARGAS -->
|
|
<div id="dvHistorico" class="modal ADS fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
<asp:UpdatePanel ID="UpHistorico" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
<h4 class="modal-title" id="H2" runat="server"><i class="fa fa-bell-o"></i>
|
|
<asp:Literal runat="server" ID="LtlTituloCD" /></h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<asp:UpdatePanel runat="server" UpdateMode="conditional" ID="UpdatePanel3">
|
|
<ContentTemplate>
|
|
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
|
<div style="margin-right: 15px">
|
|
<input type="text" id="TxtBusquedaHist" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVHistorico.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVHistorico.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
</div>
|
|
</div>
|
|
<asp:GridView ID="GVHistorico" runat="server" GridLines="None" DataKeyNames="CveEvento" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-heightfijo="300" data-height="300" data-sort="false" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
|
<Columns>
|
|
<asp:BoundField DataField="Evento" ItemStyle-Width="20%" HeaderStyle-HorizontalAlign="center" HeaderText="Evento" ItemStyle-HorizontalAlign="left" />
|
|
<asp:BoundField DataField="FechaTrama" ItemStyle-Width="25%" HeaderStyle-HorizontalAlign="center" HeaderText="Fecha" ItemStyle-HorizontalAlign="center" />
|
|
<asp:BoundField DataField="Volumen" DataFormatString="{0:###,###.00} Lts" HeaderStyle-HorizontalAlign="center" HeaderText="Volumen (Lts)" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="center" />
|
|
<asp:BoundField DataField="Direccion" HeaderStyle-HorizontalAlign="center" HeaderText="Dirección" ItemStyle-Width="35%" ItemStyle-HorizontalAlign="left" />
|
|
<asp:HyperLinkField DataNavigateUrlFields="Lat,Lon" HeaderStyle-HorizontalAlign="center" Target="_blank" Text="Ver" HeaderText="Ver en mapa" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="center" DataNavigateUrlFormatString="https://www.google.com/maps/search/{0},{1}/" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
</asp:Content>
|
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
|
<script src="../Metronic/assets/layouts/layout3/scripts/jquery.datetimepicker.full.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
|
|
|
<script>
|
|
var geocoder;
|
|
var directionsService;
|
|
var directionsDisplay;
|
|
function stringtodate(dateString) {
|
|
return dateString;
|
|
}
|
|
function CargaHistorico() {
|
|
var data = [];
|
|
var Gcolor = $('#ChkEncendido').is(':checked') ? "lineColor" : null;
|
|
eval($("#HdfVGrafica").val());
|
|
var chart = AmCharts.makeChart("chartdiv", {
|
|
"type": "serial",
|
|
"theme": "light",
|
|
"marginRight": 40,
|
|
"marginLeft": 40,
|
|
"autoMarginOffset": 20,
|
|
"dataDateFormat": "YYYY-MM-DD HH:NN:SS",
|
|
"valueAxes": [{
|
|
"id": "v1",
|
|
"axisAlpha": 0,
|
|
"position": "left",
|
|
"ignoreAxisWidth": true
|
|
}],
|
|
"balloon": {
|
|
"borderThickness": 1,
|
|
"shadowAlpha": 0
|
|
},
|
|
"graphs": [{
|
|
"id": "g1",
|
|
"balloon": {
|
|
"drop": true,
|
|
"adjustBorderColor": false,
|
|
"color": "#ffffff",
|
|
"type": "smoothedLine"
|
|
},
|
|
"fillAlphas": 0.2,
|
|
"bullet": "round",
|
|
"bulletBorderAlpha": 1,
|
|
"bulletColor": "#FFFFFF",
|
|
"bulletSize": 5,
|
|
"hideBulletsCount": 50,
|
|
"lineThickness": 2,
|
|
"title": "red line",
|
|
//"useLineColorForBulletBorder": true,
|
|
"valueField": "value",
|
|
"lineColorField": Gcolor,
|
|
"fillColorsField": Gcolor,
|
|
"balloonText": "<span style='font-size:18px;'>[[value]]</span><br/>T1:[[valuet1]]<br/>T2:[[valuet2]]"
|
|
}],
|
|
"chartScrollbar": {},
|
|
"chartCursor": {
|
|
"valueLineEnabled": true,
|
|
"valueLineBalloonEnabled": true,
|
|
"cursorAlpha": 0,
|
|
"zoomable": false,
|
|
"valueZoomable": true,
|
|
"valueLineAlpha": 0.5
|
|
},
|
|
"categoryField": "date",
|
|
"categoryAxis": {
|
|
|
|
"parseDates": false,
|
|
"dashLength": 1,
|
|
"minorGridEnabled": true,
|
|
},
|
|
"export": {
|
|
"enabled": true,
|
|
"menu": []
|
|
},
|
|
"dataProvider": data
|
|
});
|
|
exportChart(chart);
|
|
}
|
|
function exportChart(chart) {
|
|
chart["export"].capture({}, function () {
|
|
|
|
// SAVE TO PNG
|
|
this.toPNG({}, function (base64) {
|
|
$("#HdnChartBase64").val(base64);
|
|
});
|
|
});
|
|
}
|
|
function GetDireccionesGV(posicion, indice, index) {
|
|
setTimeout(function () {
|
|
var tr = $(indice)
|
|
var lat = posicion.lat;
|
|
var lng = posicion.lng;
|
|
if ($())
|
|
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&lat=' + lat + '&lon=' + lng;
|
|
$.getJSON(url, function (data) {
|
|
if (typeof (data.error) === 'undefined') {
|
|
tr.find("td").filter(':nth-child(4)').html(data.display_name);
|
|
} else {
|
|
tr.find("td").filter(':nth-child(4)').html("No se encontró la dirección");
|
|
}
|
|
});
|
|
}, 250 * index);
|
|
}
|
|
|
|
function CargaPickers() {
|
|
$.datetimepicker.setLocale('es');
|
|
$('input.ADDateTimePicker').each(function () {
|
|
var TThis = $(this);
|
|
TThis.datetimepicker({
|
|
dayOfWeekStart: 1,
|
|
lang: 'es',
|
|
format: 'd/m/Y H:i',
|
|
formatDate: 'd/m/Y H:i',
|
|
step: 30
|
|
});
|
|
var Div = TThis.parent()
|
|
var boton = document.createElement('span');
|
|
boton.className = "input-group-btn"
|
|
|
|
var subboton = document.createElement('a')
|
|
subboton.className = "btn default"
|
|
subboton.innerHTML = "<i class='fa fa-calendar'></i>"
|
|
subboton.addEventListener('click', function () {
|
|
TThis.datetimepicker('show')
|
|
});
|
|
boton.appendChild(subboton)
|
|
|
|
var agregar = true;
|
|
for (var i = 0; i < Div[0].children.length; i++) {
|
|
if (Div[0].children[i].isEqualNode(boton)) {
|
|
agregar = false;
|
|
}
|
|
}
|
|
if (agregar) {
|
|
Div[0].appendChild(boton);
|
|
}
|
|
//Div[0].appendChild(boton)
|
|
|
|
});
|
|
|
|
|
|
}
|
|
function loadchecked() {
|
|
$(".ChkSinFuncion").change(function () {
|
|
Metronic.blockUI({ animate: true });
|
|
setTimeout(function () {
|
|
try {
|
|
|
|
CargaHistorico();
|
|
} catch (e) {
|
|
|
|
}
|
|
Metronic.unblockUI();
|
|
}, 1);
|
|
});
|
|
$(".ChkSinFuncion").removeClass('ChkSinFuncion')
|
|
}
|
|
|
|
Sys.Application.add_load(function (s, e) {
|
|
CargaPickers();
|
|
loadchecked()
|
|
});
|
|
$(document).ready(function () {
|
|
geocoder = new google.maps.Geocoder();
|
|
CargaPickers();
|
|
loadchecked()
|
|
});
|
|
</script>
|
|
<script
|
|
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
</script>
|
|
</asp:Content>
|
|
|