739 lines
55 KiB
Plaintext
739 lines
55 KiB
Plaintext
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Shipments.aspx.cs" EnableEventValidation="false" Inherits="GPS_Shipments" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
.v-center {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
|
Catálogo de Shipments
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
<li>
|
|
<asp:UpdatePanel runat="server" UpdateMode="conditional">
|
|
<ContentTemplate>
|
|
<asp:LinkButton runat="server" ID="LnkAgregar" OnClick="LnkAgregar_Click"><i class="fa fa-plus"></i>Crear Shipment</asp:LinkButton>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</li>
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet light smmallpadding traspasorow bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<span class="caption-subject bold uppercase" style="line-height: 2;">Shipments</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">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<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="TxtBusquedaEva" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaEva','{0}')", GvShipments.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvShipments.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
</div>
|
|
</div>
|
|
<asp:GridView ID="GvShipments" runat="server" OnRowDeleting="GvShipments_RowDeleting" OnRowDataBound="GvShipments_RowDataBound" GridLines="None" DataKeyNames="CveShipment,ShipmentID" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-heighterror="800" EmptyDataText="No se encontraron registros">
|
|
<Columns>
|
|
<asp:BoundField DataField="ShipmentID" HeaderText="ShipmentID" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="NoEconomico" HeaderText="Vehículo" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="CustomerText" HeaderText="Customer" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="AssetID" HeaderText="AssetID" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="RouteID" HeaderText="RouteID" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField DataField="TrailerID" HeaderText="TrailerID" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:TemplateField HeaderText="Transmitiendo" ItemStyle-HorizontalAlign="Center">
|
|
<ItemTemplate>
|
|
<asp:CheckBox ID="ChkTransmitir" runat="server" AutoPostBack="true" CssClass="chksino" Text=" " OnCheckedChanged="ChkTransmitir_CheckedChanged" />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:BoundField DataField="FechaIng" HeaderText="Fecha Ingreso" DataFormatString="{0:dd/MM/yyyy HH:mm:ss}" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="LnkAddEvent" runat="server" Text="Crear Evento" OnClick="LnkAddEvent_Click" />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Desea eliminar el shipment?" data-btn-ok-label="si" />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
<div id="DivShipment" class="modal ADS fade" role="dialog">
|
|
<div class="modal-dialog" style="width: 900px; margin: auto;">
|
|
<asp:UpdatePanel ID="UpShipment" 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">Crear Shipment</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="portlet light smmallpadding traspasorow bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<span class="caption-subject bold uppercase" style="line-height: 2;">Datos de Shipment</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">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtShipment" CssClass="form-control " runat="server"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVShipment" runat="server" ControlToValidate="TxtShipment" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Shipment ID''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<label for="<%= TxtShipment.ClientID.ToString()%>">Shipment ID (Numero de viaje):</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:DropDownList ID="DdlCustomer" runat="server" Width="100%" CssClass="form-control input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="General Motors" Value="GMHQ"></asp:ListItem>
|
|
<asp:ListItem Text="Ford Motor Company" Value="FORD"></asp:ListItem>
|
|
<asp:ListItem Text="Ford Customer Service Division" Value="FCSD"></asp:ListItem>
|
|
<asp:ListItem Text="Goodyear Tire & Rubber Company" Value="FV0219415A"></asp:ListItem>
|
|
<asp:ListItem Text="FCA" Value="FCA"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RFVCustomer" runat="server" ControlToValidate="DdlCustomer" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Customer/Shipper''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<label for="<%= DdlCustomer.ClientID.ToString()%>">Customer/Shipper:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:DropDownList ID="DdlDispositivo" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlDispositivo_SelectedIndexChanged" Width="100%" CssClass="form-control input-sm select2me" DataValueField="CveDispositivo" DataTextField="NoEconomico">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RFVDispositivo" runat="server" ControlToValidate="DdlDispositivo" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Vehículo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<label for="<%= DdlDispositivo.ClientID.ToString()%>">Vehículo:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtAsset" CssClass="form-control " runat="server"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVAsset" runat="server" ControlToValidate="TxtAsset" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Asset ID''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<label for="<%= TxtAsset.ClientID.ToString()%>">Asset ID (ID DEL GPS):</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtRoute" CssClass="form-control " runat="server"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVRoute" runat="server" ControlToValidate="TxtRoute" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Route ID''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<label for="<%= TxtRoute.ClientID.ToString()%>">Route ID (Numero de ruta):</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtTrailer" CssClass="form-control " runat="server"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVTrailer" runat="server" ControlToValidate="TxtTrailer" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Trailer ID''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<label for="<%= TxtTrailer.ClientID.ToString()%>">Trailer ID (Numero de caja):</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<table border="0" width="100%">
|
|
<tr align="left">
|
|
<div class="row v-center">
|
|
<label class="col-md-12" style="color: gray">Observaciones Generales:</label>
|
|
</div>
|
|
</tr>
|
|
<tr align="left">
|
|
<td>
|
|
<div class="row v-center">
|
|
<asp:TextBox ID="TxtObs" runat="server" Rows="6" TextMode="MultiLine" Width="95%" MaxLength="200" CssClass="col-md-12 form-control input-sm"></asp:TextBox>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="portlet light smmallpadding traspasorow bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<span class="caption-subject bold uppercase" style="line-height: 2;">Stops (Paradas)</span>
|
|
</div>
|
|
<div class="actions">
|
|
</div>
|
|
<div class="tools">
|
|
<div class="btn-group">
|
|
<asp:LinkButton ID="LnkAddNewStop" runat="server" OnClick="LnkAddNewStop_Click" Text="<i class='fa fa-plus' style=' color: white;'></i> Agregar" class="btn btn-sm btn-primary"></asp:LinkButton>
|
|
</div>
|
|
<a href="javascript:;" class="collapse"></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body rowpadding">
|
|
<div class="row">
|
|
<asp:UpdatePanel ID="UpStops" runat="server" ClientIDMode="Static">
|
|
<ContentTemplate>
|
|
<asp:GridView ID="GvStops" runat="server" GridLines="None" DataKeyNames="StopSequence" OnRowDeleting="GvStops_RowDeleting" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-heighterror="800" EmptyDataText="No se encontraron registros">
|
|
<Columns>
|
|
<asp:BoundField DataField="StopSequence" HeaderText="Stop Sequence" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="Name" HeaderText="Name" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="LocationID" HeaderText="LocationID" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="StopType" HeaderText="Stop Type" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="StopRole" HeaderText="Stop Role" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="EarlyArrivalTime" HeaderText="Early Arrival Time" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:BoundField DataField="LateArrivalTime" HeaderText="Late Arrival Time" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Desea eliminar el stop?" data-btn-ok-label="si" />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<asp:LinkButton ID="BtnAgregarShipment" runat="server" OnClick="BtnAgregarShipment_Click" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="GrpGuardar"></asp:LinkButton>
|
|
<button data-dismiss="modal" class="btn btn-default">Cancelar</button>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
<div id="DivStop" class="modal ADS fade" role="dialog">
|
|
<div class="modal-dialog" style="width: 900px; margin: auto;">
|
|
<asp:UpdatePanel ID="UpStop" 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">Agregar Stop(Parada)</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="portlet light smmallpadding traspasorow bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<span class="caption-subject bold uppercase" style="line-height: 2;">Stops (Paradas)</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">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtLocName" CssClass="form-control " runat="server" Text=""></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVName" runat="server" ControlToValidate="TxtLocName" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Name''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
|
<label for="<%= TxtLocName.ClientID.ToString()%>">Name:</label>
|
|
</div>
|
|
<form method="post">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtLocID" CssClass="form-control " runat="server"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtLocID" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Location''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
|
<label for="<%= TxtLocID.ClientID.ToString()%>">Location ID:</label>
|
|
</div>
|
|
</form>
|
|
<div class="portlet light smmallpadding traspasorow bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<span class="caption-subject bold uppercase" style="line-height: 2;">Dirección</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">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtAddress" CssClass="form-control " runat="server" Text=""></asp:TextBox>
|
|
<label for="<%= TxtAddress.ClientID.ToString()%>">Address:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtCity" CssClass="form-control " runat="server" Text=""></asp:TextBox>
|
|
<label for="<%= TxtCity.ClientID.ToString()%>">City:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtState" CssClass="form-control " runat="server" Text=""></asp:TextBox>
|
|
<label for="<%= TxtState.ClientID.ToString()%>">State:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtPostalCode" CssClass="form-control " runat="server" Text=""></asp:TextBox>
|
|
<label for="<%= TxtPostalCode.ClientID.ToString()%>">Postal Code:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtContry" CssClass="form-control " runat="server" Text=""></asp:TextBox>
|
|
<label for="<%= TxtContry.ClientID.ToString()%>">Contry:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtLatLong" CssClass="form-control " runat="server" Text="" Enabled="false"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVLatLon" runat="server" ControlToValidate="TxtLatLong" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Latitude/Longitude''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
|
<label for="<%= TxtLatLong.ClientID.ToString()%>">Latitude/Longitude:</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row v-center">
|
|
<label class="col-md-12" style="color: gray">Early Arrival Time:</label>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
|
<asp:TextBox ID="TxtFechaStopI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVFechaIStop" runat="server" ControlToValidate="TxtFechaStopI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Early Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaIStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br />
|
|
<div class="row v-center">
|
|
<label class="col-md-12" style="color: gray">Late Arrival Time:</label>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
|
<asp:TextBox ID="TxtFechaStopF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVFechaFStop" runat="server" ControlToValidate="TxtFechaStopF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Late Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCEF" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:DropDownList ID="DdlStopType" runat="server" Width="100%" CssClass="form-control input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Load" Value="load"></asp:ListItem>
|
|
<asp:ListItem Text="Unload" Value="unload"></asp:ListItem>
|
|
<asp:ListItem Text="Drop" Value="drop"></asp:ListItem>
|
|
<asp:ListItem Text="Hook" Value="hook"></asp:ListItem>
|
|
<asp:ListItem Text="Relay" Value="relay"></asp:ListItem>
|
|
<asp:ListItem Text="Other" Value="other"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RFVStopType" runat="server" ControlToValidate="DdlStopType" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop Type''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
|
<label for="<%= DdlStopType.ClientID.ToString()%>">StopType:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:DropDownList ID="DdlStopRole" runat="server" Width="100%" CssClass="form-control input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Ship From" Value="ship_from"></asp:ListItem>
|
|
<asp:ListItem Text="Ship To" Value="ship_to"></asp:ListItem>
|
|
<asp:ListItem Text="Border" Value="border"></asp:ListItem>
|
|
<asp:ListItem Text="Terminal" Value="terminal"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RFVStopRole" runat="server" ControlToValidate="DdlStopRole" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop Role''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
|
<label for="<%= DdlStopRole.ClientID.ToString()%>">Stop Role:</label>
|
|
</div>
|
|
<div class="row v-center">
|
|
<div class="col-md-9">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtLoc" CssClass="form-control" runat="server"></asp:TextBox>
|
|
<label for="<%= TxtLoc.ClientID.ToString()%>">Search Location:</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-3 v-center">
|
|
<button type="button" class="btn btn-primary" onclick="BtnBuscar();">Buscar</button>
|
|
</div>
|
|
</div>
|
|
<div class="portlet light smmallpadding traspasorow bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<span class="caption-subject bold uppercase" style="line-height: 2;">Position</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">
|
|
<div id="map" class="gmaps" style="position: relative; overflow: hidden;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<asp:LinkButton ID="LnkAddStop" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GrpStop" OnClick="LnkAddStop_Click"></asp:LinkButton>
|
|
<button data-dismiss="modal" class="btn btn-default">Cancelar</button>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
<div id="DivEvent" class="modal ADS fade" role="dialog">
|
|
<div class="modal-dialog" style="width: 900px; margin: auto;">
|
|
<asp:UpdatePanel ID="UpEvent" 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">Crear Evento</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="portlet light smmallpadding traspasorow bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<span class="caption-subject bold uppercase" style="line-height: 2;">Evento</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">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:DropDownList ID="DdlStops" runat="server" Width="100%" CssClass="form-control input-sm select2me" OnSelectedIndexChanged="DdlStops_SelectedIndexChanged" AutoPostBack="true" DataTextField="Name" DataValueField="CveStop">
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RFVStops" runat="server" ControlToValidate="DdlStops" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEvent"></asp:RequiredFieldValidator>
|
|
<label for="<%= DdlStops.ClientID.ToString()%>">Stops:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:DropDownList ID="DdlEvent" runat="server" Width="100%" CssClass="form-control input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Assign Asset for tracking" Value="XB"></asp:ListItem>
|
|
<asp:ListItem Text="Unassign Asset" Value="XX"></asp:ListItem>
|
|
<asp:ListItem Text="Location Update" Value="LO"></asp:ListItem>
|
|
<asp:ListItem Text="Pick up: Arrival" Value="X3"></asp:ListItem>
|
|
<asp:ListItem Text="Pick up: Complete loading or hook" Value="CP"></asp:ListItem>
|
|
<asp:ListItem Text="Pick up: Departure" Value="AF"></asp:ListItem>
|
|
<asp:ListItem Text="Drop off: Arrival" Value="X1"></asp:ListItem>
|
|
<asp:ListItem Text="Drop off: Complete unloading or unhook" Value="D1"></asp:ListItem>
|
|
<asp:ListItem Text="Drop off: Departure" Value="CD"></asp:ListItem>
|
|
<asp:ListItem Text="Terminal: Arrival" Value="X4"></asp:ListItem>
|
|
<asp:ListItem Text="Terminal: Departed" Value="P1"></asp:ListItem>
|
|
<asp:ListItem Text="Estimated delivery" Value="AG"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="DdlEvent" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Event''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEvent"></asp:RequiredFieldValidator>
|
|
<label for="<%= DdlCustomer.ClientID.ToString()%>">Event:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:DropDownList ID="DdlReason" runat="server" Width="100%" CssClass="form-control input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
<asp:ListItem Text="Normal Status" Value="NS"></asp:ListItem>
|
|
<asp:ListItem Text="Accident" Value="AF"></asp:ListItem>
|
|
<asp:ListItem Text="Shipper Related" Value="AM"></asp:ListItem>
|
|
<asp:ListItem Text="Previous Stop" Value="AL"></asp:ListItem>
|
|
<asp:ListItem Text="Consignee Related" Value="AG"></asp:ListItem>
|
|
<asp:ListItem Text="Driver Related" Value="AH"></asp:ListItem>
|
|
<asp:ListItem Text="Mechanical Breakdown" Value="AI"></asp:ListItem>
|
|
<asp:ListItem Text="Other Carrier Related" Value="AJ"></asp:ListItem>
|
|
<asp:ListItem Text="Weather or Natural Disaster Related" Value="AO"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="DdlReason" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Reason''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEvent"></asp:RequiredFieldValidator>
|
|
<label for="<%= DdlCustomer.ClientID.ToString()%>">Reason:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtLatLongEvent" CssClass="form-control " runat="server" Text="" Enabled="false"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RFVLLEvent" runat="server" ControlToValidate="TxtLatLongEvent" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Latitude/Longitude''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEvent"></asp:RequiredFieldValidator>
|
|
<label for="<%= TxtLatLong.ClientID.ToString()%>">Latitude/Longitude:</label>
|
|
</div>
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtStopSec" CssClass="form-control " runat="server" Text="" Enabled="false"></asp:TextBox>
|
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtStopSec" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop Sequence''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEvent"></asp:RequiredFieldValidator>
|
|
<label for="<%= TxtStopSec.ClientID.ToString()%>">Stop Sequence:</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="form-group form-md-line-input input-iconright">
|
|
<asp:TextBox ID="TxtLoc2" CssClass="form-control " runat="server"></asp:TextBox>
|
|
<label for="<%= TxtLoc2.ClientID.ToString()%>">Search Location:</label>
|
|
</div>
|
|
<div class="portlet light smmallpadding traspasorow bordered">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<span class="caption-subject bold uppercase" style="line-height: 2;">Position</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">
|
|
<div id="mapEvent" class="gmaps" style="position: relative; overflow: hidden;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<asp:LinkButton ID="LnkAddNewEvent" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GrpEvent" OnClick="LnkAddNewEvent_Click"></asp:LinkButton>
|
|
<button data-dismiss="modal" class="btn btn-default">Cancelar</button>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
|
<script type="text/javascript">
|
|
var map;
|
|
var directionsService;
|
|
var directionsDisplay;
|
|
var markers = [];
|
|
var marker;
|
|
|
|
var mapEvent;
|
|
var directionsServiceEvent;
|
|
var directionsDisplayEvent;
|
|
var markersEvent = [];
|
|
var markerEvent;
|
|
|
|
var searchBox;
|
|
var searchBoxEvent;
|
|
|
|
$(document).ready(function () {
|
|
initMap();
|
|
Sys.Application.add_load(function (s, e) {
|
|
initMap();
|
|
});
|
|
});
|
|
|
|
|
|
//$("form").submit(function (event) {
|
|
// event.preventDefault();
|
|
//});
|
|
|
|
function initMap() {
|
|
|
|
var uluru = { lat: 29.0730, lng: -110.9559 }
|
|
map = new google.maps.Map(document.getElementById('map'), {
|
|
center: uluru,
|
|
zoom: 10
|
|
});
|
|
|
|
mapEvent = new google.maps.Map(document.getElementById('mapEvent'), {
|
|
center: uluru,
|
|
zoom: 10
|
|
});
|
|
|
|
directionsService = new google.maps.DirectionsService;
|
|
directionsDisplay = new google.maps.DirectionsRenderer;
|
|
directionsDisplay.setOptions({ suppressMarkers: true });
|
|
directionsDisplay.setMap(map);
|
|
|
|
directionsServiceEvent = new google.maps.DirectionsService;
|
|
directionsDisplayEvent = new google.maps.DirectionsRenderer;
|
|
directionsDisplayEvent.setOptions({ suppressMarkers: true });
|
|
directionsDisplayEvent.setMap(mapEvent);
|
|
|
|
searchBox = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc.ClientID%>"));
|
|
searchBoxEvent = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc2.ClientID%>"));
|
|
|
|
$("#<%= TxtLoc.ClientID%>").bind('keypress', function (e) {
|
|
if (e.keyCode == 13) {
|
|
return false;
|
|
}
|
|
});
|
|
$("#<%= TxtLoc2.ClientID%>").bind('keypress', function (e) {
|
|
if (e.keyCode == 13) {
|
|
return false;
|
|
}
|
|
});
|
|
|
|
searchBox.addListener('places_changed', function () {
|
|
var places = searchBox.getPlaces();
|
|
BuscarDireccion(places);
|
|
});
|
|
|
|
searchBoxEvent.addListener('places_changed', function () {
|
|
var places = searchBoxEvent.getPlaces();
|
|
if (places.length == 0) {
|
|
return;
|
|
}
|
|
var bounds = new google.maps.LatLngBounds();
|
|
places.forEach(function (place) {
|
|
if (!place.geometry) {
|
|
console.log("Returned place contains no geometry");
|
|
return;
|
|
}
|
|
var lat = place.geometry.location.lat();
|
|
var lng = place.geometry.location.lng();
|
|
|
|
SetMapPinEvent(lat, lng);
|
|
});
|
|
});
|
|
|
|
map.addListener('bounds_changed', function () {
|
|
searchBox.setBounds(map.getBounds());
|
|
});
|
|
|
|
mapEvent.addListener('bounds_changed', function () {
|
|
searchBoxEvent.setBounds(mapEvent.getBounds());
|
|
});
|
|
|
|
}
|
|
function BtnBuscar() {
|
|
var input = document.getElementById("<%= TxtLoc.ClientID%>");
|
|
|
|
google.maps.event.trigger(input, 'focus', {});
|
|
google.maps.event.trigger(input, 'keydown', { keyCode: 13 });
|
|
google.maps.event.trigger(this, 'focus', {});
|
|
}
|
|
function BuscarDireccion(places) {
|
|
if (places.length == 0) {
|
|
return;
|
|
}
|
|
var bounds = new google.maps.LatLngBounds();
|
|
places.forEach(function (place) {
|
|
if (!place.geometry) {
|
|
console.log("Returned place contains no geometry");
|
|
return;
|
|
}
|
|
var lat = place.geometry.location.lat();
|
|
var lng = place.geometry.location.lng();
|
|
|
|
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
|
|
|
getDirecciones(lat, lng);
|
|
|
|
var icon = {
|
|
url: 'http://maps.google.com/mapfiles/ms/micons/truck.png',
|
|
size: new google.maps.Size(71, 71),
|
|
origin: new google.maps.Point(0, 0),
|
|
anchor: new google.maps.Point(17, 34),
|
|
scaledSize: new google.maps.Size(25, 25)
|
|
};
|
|
|
|
marker = new google.maps.Marker({
|
|
map: map,
|
|
icon: icon,
|
|
title: place.name,
|
|
position: place.geometry.location,
|
|
draggable: true,
|
|
animation: google.maps.Animation.DROP
|
|
});
|
|
|
|
google.maps.event.addListener(marker, 'dragend', function () {
|
|
var pos = marker.getPosition();
|
|
getDirecciones(pos.lat(), pos.lng());
|
|
});
|
|
// Create a marker for each place.
|
|
deleteMarkers(markers);
|
|
markers.push(marker);
|
|
|
|
if (place.geometry.viewport) {
|
|
// Only geocodes have viewport.
|
|
bounds.union(place.geometry.viewport);
|
|
} else {
|
|
bounds.extend(place.geometry.location);
|
|
}
|
|
|
|
map.fitBounds(bounds);
|
|
map.setCenter(bounds.getCenter());
|
|
|
|
});
|
|
}
|
|
function cargapin(lat, lng) {
|
|
setTimeout(function () { SetMapPinEvent(lat, lng) }, 1000);
|
|
}
|
|
|
|
function SetMapPinEvent(lat, lng) {
|
|
$("#<%= TxtLatLongEvent.ClientID%>").val(lat + ',' + lng);
|
|
|
|
var icon = {
|
|
url: 'http://maps.google.com/mapfiles/ms/micons/truck.png',
|
|
size: new google.maps.Size(71, 71),
|
|
origin: new google.maps.Point(0, 0),
|
|
anchor: new google.maps.Point(17, 34),
|
|
scaledSize: new google.maps.Size(25, 25)
|
|
};
|
|
|
|
markerEvent = new google.maps.Marker({
|
|
map: mapEvent,
|
|
icon: icon,
|
|
position: new google.maps.LatLng(lat, lng),
|
|
draggable: true,
|
|
animation: google.maps.Animation.DROP
|
|
});
|
|
|
|
google.maps.event.addListener(markerEvent, 'dragend', function () {
|
|
var pos = markerEvent.getPosition();
|
|
$("#<%= TxtLatLongEvent.ClientID%>").val(pos.lat() + ',' + pos.lng());
|
|
var centerMaker = new google.maps.LatLng(pos.lat(), pos.lng());
|
|
mapEvent.panTo(centerMaker);
|
|
|
|
});
|
|
|
|
deleteMarkers(markersEvent);
|
|
// Create a marker for each place.
|
|
markersEvent.push(markerEvent);
|
|
|
|
var center = new google.maps.LatLng(lat, lng);
|
|
|
|
var bounds = new google.maps.LatLngBounds();
|
|
bounds.extend(center);
|
|
|
|
mapEvent.fitBounds(bounds);
|
|
mapEvent.setCenter(bounds.getCenter());
|
|
|
|
}
|
|
function deleteMarkers(markers) {
|
|
for (var i = 0; i < markers.length; i++) {
|
|
markers[i].setMap(null);
|
|
}
|
|
markers = [];
|
|
}
|
|
|
|
function getDirecciones(lat, lng) {
|
|
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&zoom=18&addressdetails=1&lat=' + lat + '&lon=' + lng;
|
|
$.getJSON(url, function (data) {
|
|
if (typeof (data.error) === 'undefined') {
|
|
|
|
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
|
$("#<%= TxtAddress.ClientID%>").val(data.display_name);
|
|
$("#<%= TxtCity.ClientID%>").val(data.address.city);
|
|
$("#<%= TxtState.ClientID%>").val(data.address.state);
|
|
$("#<%= TxtContry.ClientID%>").val(data.address.country);
|
|
$("#<%= TxtPostalCode.ClientID%>").val(data.address.postcode);
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
<script
|
|
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
</script>
|
|
</asp:Content>
|
|
|