Precio minimo anterior en actualizar precios y evitar cerrar ventana en shipments
This commit is contained in:
@@ -2370,6 +2370,12 @@ IIF(Parameters!Sucursal.Value="Aguascalientes","(449) 913 4418",""))))</Value>
|
|||||||
<AllowBlank>true</AllowBlank>
|
<AllowBlank>true</AllowBlank>
|
||||||
<Prompt>ReportParameter1</Prompt>
|
<Prompt>ReportParameter1</Prompt>
|
||||||
</ReportParameter>
|
</ReportParameter>
|
||||||
|
<ReportParameter Name="ClienteDiasCredito">
|
||||||
|
<DataType>String</DataType>
|
||||||
|
<Nullable>true</Nullable>
|
||||||
|
<AllowBlank>true</AllowBlank>
|
||||||
|
<Prompt>ReportParameter1</Prompt>
|
||||||
|
</ReportParameter>
|
||||||
</ReportParameters>
|
</ReportParameters>
|
||||||
<Code>Public Function PageNumber() as String
|
<Code>Public Function PageNumber() as String
|
||||||
Dim str as String
|
Dim str as String
|
||||||
|
|||||||
@@ -1,254 +0,0 @@
|
|||||||
Option Strict On
|
|
||||||
|
|
||||||
Imports System.Data
|
|
||||||
Imports Extensiones
|
|
||||||
Partial Class GPS_PruebaMaster
|
|
||||||
Inherits ClsPaginas
|
|
||||||
|
|
||||||
#Region "P R O P I E D A D E S"
|
|
||||||
Public Property Offset() As Integer
|
|
||||||
Get
|
|
||||||
Return DirectCast(IfNull(ViewState("Offset"), 0), Integer)
|
|
||||||
End Get
|
|
||||||
Set(ByVal value As Integer)
|
|
||||||
ViewState("Offset") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Public ReadOnly Property FechaCliente() As DateTime
|
|
||||||
Get
|
|
||||||
Return DateTime.UtcNow.AddMinutes(10).AddMinutes(Offset)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
Private Property DTEquipos As DataTable
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("DTEquipos"), DataTable)
|
|
||||||
End Get
|
|
||||||
Set(value As DataTable)
|
|
||||||
ViewState("DTEquipos") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
||||||
If Not Page.IsPostBack Then
|
|
||||||
If UsuarioActual.Contraseña = (ContraseñaPredeterminadaEncriptada) OrElse UsuarioActual.ActCambiarContraseña Then
|
|
||||||
Response.Redirect("/Sistemas/CatContrasenia.aspx")
|
|
||||||
Else
|
|
||||||
CargaDispositivos()
|
|
||||||
CargaZonasHorarias()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
Private Sub CargaZonasHorarias()
|
|
||||||
Using ObjGPS As New ClsGPS
|
|
||||||
Dim CveZonaHoraria As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveZonaHoraria", $"CveCliente = {UsuarioActual.CveCliente}").ToEntero()
|
|
||||||
If ObjGPS.GetZonasHorarias() Then
|
|
||||||
If ObjGPS.DtResultados.Rows.Count > 0 Then
|
|
||||||
Offset = ObjGPS.DtResultados.FiltroPrimeroValor("UTCOffset", $"CveZonaHoraria = {CveZonaHoraria}").ToEntero()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDispositivos()
|
|
||||||
DTEquipos = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("Estatus = 1")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function SQLToGmaps(CoordsSQL As String, Tipo As String) As String
|
|
||||||
Dim CoordsPoligono As String = CoordsSQL.Replace($"{Tipo}", "").Replace(")", "").Replace("(", "")
|
|
||||||
Dim CoordsPuntos() As String = CoordsPoligono.Split(","c)
|
|
||||||
Dim Var As String = ""
|
|
||||||
For Each coordenada As String In CoordsPuntos
|
|
||||||
If coordenada Is CoordsPuntos.Last Then
|
|
||||||
Dim latlng() As String = coordenada.Trim.Split(" "c)
|
|
||||||
Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }}"
|
|
||||||
Else
|
|
||||||
Dim latlng() As String = coordenada.Trim.Split(" "c)
|
|
||||||
Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }},"
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Return Var
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Protected Sub BtnCargar_Click(sender As Object, e As EventArgs) Handles BtnCargar.Click
|
|
||||||
Dim SBBody As New StringBuilder
|
|
||||||
Dim Info As String
|
|
||||||
Dim GPS As New ClsGPS
|
|
||||||
Dim Icono As String = ""
|
|
||||||
Dim SB = New StringBuilder()
|
|
||||||
For Each row As DataRow In DTEquipos.Rows
|
|
||||||
SB.Append($"{row("CveDispositivo")};")
|
|
||||||
Next
|
|
||||||
|
|
||||||
If GPS.UltimaPosicionEquipoGet(SB.ToString, UsuarioActual.CveCliente) Then
|
|
||||||
If GPS.DtResultados.Rows.Count > 0 Then
|
|
||||||
For Each row As DataRow In GPS.DtResultados.Rows
|
|
||||||
Dim Coord As String '= SQLToGmaps(row("Posicion").ToString, "POINT")
|
|
||||||
|
|
||||||
Try
|
|
||||||
Coord= SQLToGmaps(row("Posicion").ToString, "POINT")
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
GuardaLog($"{SB.ToString} {UsuarioActual.CveCliente}{ex.ToString()}")
|
|
||||||
End Tryy
|
|
||||||
Info = InfoWindowCombustible($"Vehículo: {row("Vehiculo").ToString}", "-1", row("CveDispositivo").ToString.ToEntero, row)
|
|
||||||
Dim Fecha = row("FechaTrama").ToString
|
|
||||||
Dim Diferencia As Long = DateDiff(DateInterval.Minute, Fecha.ToDateTime(), FechaCliente)
|
|
||||||
|
|
||||||
If Diferencia >= 30 AndAlso Diferencia < 120 Then
|
|
||||||
Icono = $"/Imagenes/rsz_11rsz_car_disconnected.png"
|
|
||||||
ElseIf Diferencia >= 120 Then
|
|
||||||
Icono = $"/Imagenes/rsz_11rsz_car_disable.png"
|
|
||||||
Else
|
|
||||||
If row("SPD").ToString.ToDouble > 1 Then
|
|
||||||
Icono = $"/Imagenes/{GlobalDTDispositivos(UsuarioActual.CveCliente).FiltroPrimeroValor("Icono", $"CveDispositivo = {row("CveDispositivo").ToString}")}green.png"
|
|
||||||
Else
|
|
||||||
Icono = $"/Imagenes/{GlobalDTDispositivos(UsuarioActual.CveCliente).FiltroPrimeroValor("Icono", $"CveDispositivo = {row("CveDispositivo").ToString}")}.png"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
SBBody.Append($"</table></div><div></div></div>")
|
|
||||||
RegistraScript($"CreaMarcador({Coord},'{row("Vehiculo").ToString}', '{Info}', '{Icono}');", row("CveDispositivo").ToString)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
RegistraScript("fitBoundsToVisibleMarkers();", "2")
|
|
||||||
GPS.Dispose()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
#Region "Herramientas - GPS"
|
|
||||||
|
|
||||||
Protected Sub BtnCargaComandos_Click(sender As Object, e As EventArgs) Handles BtnCargaComandos.Click
|
|
||||||
CargaComandos()
|
|
||||||
End Sub
|
|
||||||
Private Sub CargaComandos()
|
|
||||||
'Dim ObjGps As New ClsGPS
|
|
||||||
'If ObjGps.GetComandosModeloDispositivo(HdnCveDipositivo.Value.ToEntero) AndAlso ObjGps.DtResultados.Rows.Count > 0 Then
|
|
||||||
' GvComandos.DataSource = ObjGps.DtResultados.FiltraParametros("CveComando IN (6, 7, 32, 36, 8, 9)")
|
|
||||||
' GvComandos.DataBind()
|
|
||||||
' UpBodyTipoEquipo.Update()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'ObjGps.Dispose()
|
|
||||||
|
|
||||||
Dim ObjGps As New ClsGPS
|
|
||||||
If ObjGps.GetComandosModeloDispositivoUsuarios(HdnCveDipositivo.Value.ToEntero, UsuarioActual.CveUsuario, 1) Then
|
|
||||||
GvComandos.DataSource = ObjGps.DtResultados
|
|
||||||
End If
|
|
||||||
ObjGps.Dispose()
|
|
||||||
GvComandos.DataBind()
|
|
||||||
|
|
||||||
UpBodyTipoEquipo.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub GvComandos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvComandos.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
'Select Case e.Row.DBCampo("CveComando").ToEntero
|
|
||||||
' Case 6
|
|
||||||
' e.Row.Cells(1).Text = "Apagar Motor"
|
|
||||||
' Case 7
|
|
||||||
' e.Row.Cells(1).Text = "Encender Motor"
|
|
||||||
' Case 32
|
|
||||||
' e.Row.Cells(1).Text = "Reiniciar Dispositivo"
|
|
||||||
' Case 36
|
|
||||||
' e.Row.Cells(1).Text = "Telefono de Pánico"
|
|
||||||
' Case 8
|
|
||||||
' e.Row.Cells(1).Text = "Abrir Compuerta"
|
|
||||||
' Case 9
|
|
||||||
' e.Row.Cells(1).Text = "Cerrar Compuerta"
|
|
||||||
'End Select
|
|
||||||
|
|
||||||
If e.Row.DataKey("RequiereValor").ToEntero = 1 Then
|
|
||||||
e.Row.FCTextBox("TxtValor").Visible = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub GvComandos_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvComandos.RowCommand
|
|
||||||
If (e.CommandName = "EnviarComando") Then
|
|
||||||
|
|
||||||
Dim ObjHerramientas As New ClsGPSHerramientas
|
|
||||||
|
|
||||||
Dim index As Integer = Convert.ToInt32(e.CommandArgument)
|
|
||||||
Dim row As GridViewRow = GvComandos.Rows(index)
|
|
||||||
|
|
||||||
ObjHerramientas.EjecutarComandoGPRS(row.DataKey("CveComando").ToEntero, HdnCveDipositivo.Value.ToEntero, UsuarioActual.CveUsuario, row.FCTextBox("TxtValor").Text)
|
|
||||||
|
|
||||||
ObjHerramientas.Dispose()
|
|
||||||
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Private Sub BtnApagarMotor_Click(sender As Object, e As EventArgs) Handles BtnApagarMotor.Click
|
|
||||||
' 'Comando 6
|
|
||||||
' Dim ObjGPSHerramientas As New ClsGPSHerramientas
|
|
||||||
' ObjGPSHerramientas.EjecutarComandoGPRS(6, HdnCveDipositivo.Value.ToEntero, UsuarioActual.CveUsuario, "")
|
|
||||||
' ObjGPSHerramientas.Dispose()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Private Sub BtnEncenderMotor_Click(sender As Object, e As EventArgs) Handles BtnEncenderMotor.Click
|
|
||||||
' 'Comando 7
|
|
||||||
' Dim ObjGPSHerramientas As New ClsGPSHerramientas
|
|
||||||
' ObjGPSHerramientas.EjecutarComandoGPRS(7, HdnCveDipositivo.Value.ToEntero, UsuarioActual.CveUsuario, "")
|
|
||||||
' ObjGPSHerramientas.Dispose()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Private Sub BtnReinicio_Click(sender As Object, e As EventArgs) Handles BtnReinicio.Click
|
|
||||||
' 'Comando 32
|
|
||||||
' Dim ObjGPSHerramientas As New ClsGPSHerramientas
|
|
||||||
' ObjGPSHerramientas.EjecutarComandoGPRS(32, HdnCveDipositivo.Value.ToEntero, UsuarioActual.CveUsuario, "")
|
|
||||||
' ObjGPSHerramientas.Dispose()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Private Sub BtnTelefonoPanico_Click(sender As Object, e As EventArgs) Handles BtnTelefonoPanico.Click
|
|
||||||
' 'Comando 36
|
|
||||||
' Dim ObjGPSHerramientas As New ClsGPSHerramientas
|
|
||||||
' ObjGPSHerramientas.EjecutarComandoGPRS(36, HdnCveDipositivo.Value.ToEntero, UsuarioActual.CveUsuario, TxtTelefonoPanico.Text.Trim)
|
|
||||||
' ObjGPSHerramientas.Dispose()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Private Sub BtnProbarEncendido_Click(sender As Object, e As EventArgs) Handles BtnProbarEncendido.Click
|
|
||||||
' 'Comando 8 'Abrir Compuerta
|
|
||||||
' Dim ObjGPSHerramientas As New ClsGPSHerramientas
|
|
||||||
' ObjGPSHerramientas.EjecutarComandoGPRS(8, HdnCveDipositivo.Value.ToEntero, UsuarioActual.CveUsuario, "")
|
|
||||||
' ObjGPSHerramientas.Dispose()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Private Sub BtnInfoDispositivo_Click(sender As Object, e As EventArgs) Handles BtnInfoDispositivo.Click
|
|
||||||
' 'Comando 9 'Cerrar Compuerta
|
|
||||||
' Dim ObjGPSHerramientas As New ClsGPSHerramientas
|
|
||||||
' ObjGPSHerramientas.EjecutarComandoGPRS(9, HdnCveDipositivo.Value.ToEntero, UsuarioActual.CveUsuario, "")
|
|
||||||
' ObjGPSHerramientas.Dispose()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
'Private Sub BtnAhorroBateria_Click(sender As Object, e As EventArgs) Handles BtnAhorroBateria.Click
|
|
||||||
' 'Comando 40
|
|
||||||
' Dim ObjGPSHerramientas As New ClsGPSHerramientas
|
|
||||||
' ObjGPSHerramientas.EjecutarComandoGPRS(40, HdnCveDipositivo.Value.ToEntero, UsuarioActual.CveUsuario, DdlTipoBateria.SelectedValue)
|
|
||||||
' ObjGPSHerramientas.Dispose()
|
|
||||||
'End Sub
|
|
||||||
#End Region
|
|
||||||
Public Function InfoWindowCombustible(Header As String, ExtraBody As String, CveDispositivo As Integer, row As DataRow, Optional PermisoComandos As Boolean = True) As String
|
|
||||||
Dim SBuilder As New StringBuilder
|
|
||||||
SBuilder.Clear()
|
|
||||||
SBuilder.Append($"<div>")
|
|
||||||
SBuilder.Append($"<div><h5><a target=\'_blank\' href=\'/GPS/Vehiculos.aspx?CveDispositivo={CveDispositivo}\'><b>{Header}</b></a></h5></div>")
|
|
||||||
SBuilder.Append($"<div><table>")
|
|
||||||
SBuilder.Append($"<tr><td>Fecha : {row("FechaTrama")} </td></tr>")
|
|
||||||
SBuilder.Append($"<tr><td>Conductor : {row("Conductor").ToString}</td></tr>")
|
|
||||||
SBuilder.Append($"<tr><td>Combustible : {IfNull(row("Combustible"), "NO DISPONIBLE", $"{row("Combustible").ToString.FormatoNumero} lts").ToString}</td></tr>")
|
|
||||||
If row("SPD").ToString <> "-1" Then
|
|
||||||
SBuilder.Append($"<tr><td>Velocidad : {row("SPD").ToString} KM/H </td></tr>")
|
|
||||||
End If
|
|
||||||
If ExtraBody <> "" AndAlso ExtraBody <> "-1" Then
|
|
||||||
SBuilder.Append(ExtraBody)
|
|
||||||
End If
|
|
||||||
If PermisoComandos Then
|
|
||||||
SBuilder.Append($"<tr><td><a href=""javascript:;"" onclick=""CargaComandos(\'{row("Vehiculo").ToString}\',{CveDispositivo});"">Comandos</a></td></tr>")
|
|
||||||
End If
|
|
||||||
SBuilder.AppendFormat("<tr><td><a target=\'_blank\' href=\'https://www.google.com/maps/search/{0},{1}/\'>Ver en google maps</a></td></tr>", row("Lat").ToString, row("Lng").ToString)
|
|
||||||
SBuilder.Append($"</table></div><div></div></div>")
|
|
||||||
Return SBuilder.ToString
|
|
||||||
End Function
|
|
||||||
End Class
|
|
||||||
@@ -8,6 +8,14 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#DivShipment {
|
||||||
|
z-index: 1999;
|
||||||
|
}
|
||||||
|
|
||||||
|
#DivStop {
|
||||||
|
z-index: 2000;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
@@ -509,6 +517,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#DivShipment').on('hidden.bs.modal', function () {
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
function initMap() {
|
function initMap() {
|
||||||
|
|
||||||
var uluru = { lat: 29.0730, lng: -110.9559 }
|
var uluru = { lat: 29.0730, lng: -110.9559 }
|
||||||
@@ -535,6 +547,7 @@
|
|||||||
var searchBox = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc.ClientID%>"));
|
var searchBox = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc.ClientID%>"));
|
||||||
var searchBoxEvent = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc2.ClientID%>"));
|
var searchBoxEvent = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc2.ClientID%>"));
|
||||||
|
|
||||||
|
|
||||||
searchBox.addListener('places_changed', function () {
|
searchBox.addListener('places_changed', function () {
|
||||||
var places = searchBox.getPlaces();
|
var places = searchBox.getPlaces();
|
||||||
if (places.length == 0) {
|
if (places.length == 0) {
|
||||||
@@ -589,6 +602,7 @@
|
|||||||
map.setCenter(bounds.getCenter());
|
map.setCenter(bounds.getCenter());
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
searchBoxEvent.addListener('places_changed', function () {
|
searchBoxEvent.addListener('places_changed', function () {
|
||||||
@@ -672,12 +686,15 @@
|
|||||||
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&zoom=18&addressdetails=1&lat=' + lat + '&lon=' + lng;
|
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&zoom=18&addressdetails=1&lat=' + lat + '&lon=' + lng;
|
||||||
$.getJSON(url, function (data) {
|
$.getJSON(url, function (data) {
|
||||||
if (typeof (data.error) === 'undefined') {
|
if (typeof (data.error) === 'undefined') {
|
||||||
|
|
||||||
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
||||||
$("#<%= TxtAddress.ClientID%>").val(data.display_name);
|
$("#<%= TxtAddress.ClientID%>").val(data.display_name);
|
||||||
$("#<%= TxtCity.ClientID%>").val(data.address.city);
|
$("#<%= TxtCity.ClientID%>").val(data.address.city);
|
||||||
$("#<%= TxtState.ClientID%>").val(data.address.state);
|
$("#<%= TxtState.ClientID%>").val(data.address.state);
|
||||||
$("#<%= TxtContry.ClientID%>").val(data.address.country);
|
$("#<%= TxtContry.ClientID%>").val(data.address.country);
|
||||||
$("#<%= TxtPostalCode.ClientID%>").val(data.address.postcode);
|
$("#<%= TxtPostalCode.ClientID%>").val(data.address.postcode);
|
||||||
|
|
||||||
|
$('#DivShipment').modal({ backdrop: 'static', keyboard: false });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,34 +154,41 @@ public partial class GPS_Shipments : ClsPaginas
|
|||||||
}
|
}
|
||||||
protected void LnkAddStop_Click(object sender, EventArgs e)
|
protected void LnkAddStop_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (DtStops != null)
|
try
|
||||||
{
|
{
|
||||||
var Row = DtStops.NewRow();
|
if (DtStops != null)
|
||||||
Row["StopSequence"] = DtStops.Rows.Count + 1;
|
{
|
||||||
Row["Name"] = TxtLocName.Text.Trim();
|
var Row = DtStops.NewRow();
|
||||||
Row["LocationID"] = TxtLocID.Text.Trim();
|
Row["StopSequence"] = DtStops.Rows.Count + 1;
|
||||||
Row["StopType"] = DdlStopType.SelectedValue;
|
Row["Name"] = TxtLocName.Text.Trim();
|
||||||
Row["StopRole"] = DdlStopRole.SelectedValue;
|
Row["LocationID"] = TxtLocID.Text.Trim();
|
||||||
Row["EarlyArrivalTime"] = TxtFechaStopI.Text.ToDateTime();
|
Row["StopType"] = DdlStopType.SelectedValue;
|
||||||
Row["LateArrivalTime"] = TxtFechaStopF.Text.ToDateTime();
|
Row["StopRole"] = DdlStopRole.SelectedValue;
|
||||||
|
Row["EarlyArrivalTime"] = TxtFechaStopI.Text.ToDateTime();
|
||||||
|
Row["LateArrivalTime"] = TxtFechaStopF.Text.ToDateTime();
|
||||||
|
|
||||||
Row["Address"] = TxtAddress.Text.Trim();
|
Row["Address"] = TxtAddress.Text.Trim();
|
||||||
Row["City"] = TxtCity.Text.Trim();
|
Row["City"] = TxtCity.Text.Trim();
|
||||||
Row["State"] = TxtState.Text.Trim();
|
Row["State"] = TxtState.Text.Trim();
|
||||||
Row["PostalCode"] = TxtPostalCode.Text.Trim();
|
Row["PostalCode"] = TxtPostalCode.Text.Trim();
|
||||||
Row["Country"] = TxtContry.Text.Trim();
|
Row["Country"] = TxtContry.Text.Trim();
|
||||||
|
|
||||||
var latlon = TxtLatLong.Text.Trim().Split(',');
|
var latlon = TxtLatLong.Text.Trim().Split(',');
|
||||||
|
|
||||||
Row["Lat"] = latlon[0];
|
Row["Lat"] = latlon[0];
|
||||||
Row["Lon"] = latlon[1];
|
Row["Lon"] = latlon[1];
|
||||||
|
|
||||||
DtStops.Rows.Add(Row);
|
DtStops.Rows.Add(Row);
|
||||||
|
}
|
||||||
|
GvStops.DataSource = DtStops;
|
||||||
|
GvStops.DataBind();
|
||||||
|
|
||||||
|
UpShipment.Update();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.OnError("Ocurrió un error al registrar la parada (stop)", ex);
|
||||||
}
|
}
|
||||||
GvStops.DataSource = DtStops;
|
|
||||||
GvStops.DataBind();
|
|
||||||
|
|
||||||
UpShipment.Update();
|
|
||||||
|
|
||||||
this.RegistraScript("$('#DivStop').modal('hide');");
|
this.RegistraScript("$('#DivStop').modal('hide');");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ Partial Class GPS_PruebaMaster
|
|||||||
If UsuarioActual.Contraseña = (ContraseñaPredeterminadaEncriptada) OrElse UsuarioActual.ActCambiarContraseña Then
|
If UsuarioActual.Contraseña = (ContraseñaPredeterminadaEncriptada) OrElse UsuarioActual.ActCambiarContraseña Then
|
||||||
Response.Redirect("/Sistemas/CatContrasenia.aspx")
|
Response.Redirect("/Sistemas/CatContrasenia.aspx")
|
||||||
Else
|
Else
|
||||||
CargaDispositivos()
|
|
||||||
CargaZonasHorarias()
|
CargaZonasHorarias()
|
||||||
|
CargaDispositivos()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -160,7 +160,7 @@
|
|||||||
<asp:BoundField DataField="PrecioLista" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
|
<asp:BoundField DataField="PrecioLista" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||||
<asp:TemplateField HeaderText="">
|
<asp:TemplateField HeaderText="">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtPrecio" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="60px"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:N2}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecio" FilterType="Numbers,Custom" ValidChars="." />
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecio" FilterType="Numbers,Custom" ValidChars="." />
|
||||||
<asp:RegularExpressionValidator ID="REVTxtPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
|
<asp:RegularExpressionValidator ID="REVTxtPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
|
||||||
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="">
|
<asp:TemplateField HeaderText="">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtPrecioMinimo" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="60px"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecioMinimo" runat="server" Text='<%# Eval("PrecioMinimo", "{0:N2}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." />
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." />
|
||||||
<asp:RegularExpressionValidator ID="REVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
|
<asp:RegularExpressionValidator ID="REVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
|
||||||
<ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -186,7 +186,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<asp:BoundField DataField="ImporteAnterior" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
|
<asp:BoundField DataField="ImporteAnterior" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||||
<asp:BoundField DataField="FechaModificacion" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Fecha Modificación" />
|
<asp:BoundField DataField="PrecioMinimoAnterior" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Precio Mínimo Anterior" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
|
||||||
|
<asp:BoundField DataField="FechaModificacion" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}" ItemStyle-Width="10%" HeaderText="Fecha Modificación" />
|
||||||
<asp:BoundField DataField="UsuarioModifico" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Usuario Modificó" />
|
<asp:BoundField DataField="UsuarioModifico" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Usuario Modificó" />
|
||||||
<asp:BoundField DataField="Porcentaje" NullDisplayText="N/A" ItemStyle-Width="10%" DataFormatString="%{0}" HeaderText="Porcentaje" ItemStyle-HorizontalAlign="right" />
|
<asp:BoundField DataField="Porcentaje" NullDisplayText="N/A" ItemStyle-Width="10%" DataFormatString="%{0}" HeaderText="Porcentaje" ItemStyle-HorizontalAlign="right" />
|
||||||
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Fecha Ingreso" />
|
<asp:BoundField DataField="FechaIng" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" HeaderText="Fecha Ingreso" />
|
||||||
@@ -199,7 +200,7 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<div id="ModalActualizaPrecios" class="modal ADS fade" role="dialog">
|
<div id="ModalActualizaPrecios" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog" style="width: 900px; margin: auto;">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
@@ -216,21 +217,17 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<asp:UpdatePanel runat="server" ID="UpModalActualizaPrecios" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpModalActualizaPrecios" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3" style="text-align: left">
|
||||||
<div class="col-md-4" style="text-align: left">
|
<input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" /> Seleccionar Todos
|
||||||
<input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" />Seleccionar Todos
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8" style="text-align: right">
|
<div class="col-md-9" style="text-align: right">
|
||||||
<label>Aplicar precio mínimo</label>
|
<label>Aplicar precio mínimo</label>
|
||||||
<asp:TextBox ID="TxtAplicarPrecio" runat="server" Width="60px" MaxLength="39"></asp:TextBox>
|
<asp:TextBox ID="TxtAplicarPrecio" runat="server" Width="60px" MaxLength="39"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilTxtAplicarPrecio" TargetControlID="TxtAplicarPrecio" runat="server" FilterType="Numbers,Custom" ValidChars="." InvalidChars="-+" />
|
<ajax:FilteredTextBoxExtender ID="FilTxtAplicarPrecio" TargetControlID="TxtAplicarPrecio" runat="server" FilterType="Numbers,Custom" ValidChars="." InvalidChars="-+" />
|
||||||
<a id="lnkAplicarPrecioSucursales" runat="server" class="btn btn-default" onclick="CambiaPrecioModal();">Aplicar</a>
|
<a id="lnkAplicarPrecioSucursales" runat="server" class="btn btn-default" onclick="CambiaPrecioModal();">Aplicar</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:GridView ID="gvSucursal" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubProyecto" EmptyDataText="No se encontraron Sucursales" ToolTip="Listado de Sucursales habilitadas para Productos o Servicios"
|
<asp:GridView ID="gvSucursal" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubProyecto" EmptyDataText="No se encontraron Sucursales" ToolTip="Listado de Sucursales habilitadas para Productos o Servicios"
|
||||||
CssClass="table table-striped table-smallpadding table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
CssClass="table table-striped table-smallpadding table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -240,7 +237,7 @@
|
|||||||
<asp:HiddenField ID="hdnEnBD" runat="server" Value='<%# If (IsDBNull(Eval("CvePS")),0,1) %>' />
|
<asp:HiddenField ID="hdnEnBD" runat="server" Value='<%# If (IsDBNull(Eval("CvePS")),0,1) %>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Sucursal">
|
<asp:TemplateField HeaderText="Sucursal" ItemStyle-Width="30%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("SubProyecto", "{0}") %>'></asp:Literal>
|
<asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("SubProyecto", "{0}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -264,6 +261,9 @@
|
|||||||
<asp:TextBox ID="TxtMaximo" Style="text-align: right" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Maximo")%>' ValidationGroup="GrpEditGuardarO" Width="100px"></asp:TextBox>
|
<asp:TextBox ID="TxtMaximo" Style="text-align: right" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Maximo")%>' ValidationGroup="GrpEditGuardarO" Width="100px"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField HeaderText="Precio Mínimo Anterior" DataField="PrecioMinimoAnterior" DataFormatString="{0:N2}" />
|
||||||
|
<asp:BoundField HeaderText="Usuario Modificó" DataField="Usuario" />
|
||||||
|
<asp:BoundField HeaderText="Fecha Modificación" DataField="FechaModificacion" DataFormatString="{0:dd/MM/yyyy hh:mm:ss}" />
|
||||||
</Columns>
|
</Columns>
|
||||||
<RowStyle CssClass="Texto" />
|
<RowStyle CssClass="Texto" />
|
||||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||||
|
|||||||
Reference in New Issue
Block a user