Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -259,6 +259,7 @@ paket-files/
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
*.sln
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
@@ -154,7 +154,7 @@ Public Class ClsContabilidad
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero
|
||||
Catch ex As Exception
|
||||
|
||||
If ex.Message.Contains("50005;") Then
|
||||
If ex.Message.Contains("50015;") Then
|
||||
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
@@ -500,7 +500,12 @@ Public Class ClsContabilidad
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
|
||||
If ex.Message.Contains("50015;") Then
|
||||
OnError("No se puede eliminar una póliza en un ejercicio Cerrado", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió un error al Guardar", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
@@ -962,7 +962,7 @@
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaIng") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="ConceptoHistorialBitacora" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Descripcion" HeaderText="Campo" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Anterior" HeaderText="Anterior" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Actual" HeaderText="Actual" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
@@ -424,6 +424,31 @@ Partial Class Bancos_IE
|
||||
|
||||
End Property
|
||||
|
||||
Private Property CuentaOld As String
|
||||
Get
|
||||
Return CType(ViewState("CuentaOld"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CuentaOld") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaOld As String
|
||||
Get
|
||||
Return CType(ViewState("FechaOld"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaOld") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property FolioOld As String
|
||||
Get
|
||||
Return CType(ViewState("FolioOld"), String)
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FolioOld") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
@@ -1086,6 +1111,10 @@ Partial Class Bancos_IE
|
||||
|
||||
End If
|
||||
|
||||
' DATOS PARA LA BITACORA
|
||||
CuentaOld = LblCuenta.Text
|
||||
FechaOld = TxtFechaDocumento.Text
|
||||
FolioOld = TxtFolio.Text
|
||||
|
||||
End If
|
||||
|
||||
@@ -3683,20 +3712,46 @@ Partial Class Bancos_IE
|
||||
Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
||||
|
||||
Dim IE As New ClsBancos
|
||||
IE.IniciaTransacSQL()
|
||||
Dim ObjGral As New ClsGenerales
|
||||
ObjGral.IniciaTransacSQL()
|
||||
Dim FechaAplicado As DateTime? = Nothing
|
||||
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
Dim CveCuentaDepositoUpdate As Integer = If(DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero = 0, -1, DdlCuentaDeposito.SelectedValue.ToEntero.ToEntero)
|
||||
|
||||
If IE.UpdateBancos_IE(TxtFechaDocumento.Text.ToDate, FechaAplicado, CveIE, TxtFolio.Text, CveCuentaDeposito:=CveCuentaDepositoUpdate, CveCuenta:=DdlCuenta.SelectedValue.ToEntero,
|
||||
Observaciones:=TxtObservaciones.Text) Then
|
||||
Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""")
|
||||
End If
|
||||
|
||||
Observaciones:=TxtObservaciones.Text) Then
|
||||
'Agrega a la Bitacora
|
||||
If CuentaOld <> DdlCuenta.SelectedItem.Text Then
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, DdlCuenta.SelectedItem.Text, CuentaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Cuenta", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
If FechaOld <> TxtFechaDocumento.Text.Trim Then
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFechaDocumento.Text.Trim, FechaOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Fecha", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
If FolioOld <> TxtFolio.Text.Trim Then
|
||||
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveIE, TxtFolio.Text.Trim, FolioOld, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "Número", "Banco", TxtFolio.Text + " / " + Cuenta) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If OcurrioError Then
|
||||
IE.RollBack()
|
||||
ObjGral.RollBack()
|
||||
Else
|
||||
IE.Commit()
|
||||
ObjGral.Commit()
|
||||
Alert("La Actualización del documento se realizó correctamente", TipoMensaje.MsgInformacion, $"document.location.href=""IE.aspx?CveIE={CveIE}""")
|
||||
End If
|
||||
IE.Dispose()
|
||||
|
||||
|
||||
|
||||
ObjGral.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgUpdateCuentaDeposito_Click(sender As Object, e As ImageClickEventArgs)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -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
|
||||
1127
GPS/Shipments.aspx
1127
GPS/Shipments.aspx
File diff suppressed because it is too large
Load Diff
@@ -154,34 +154,41 @@ public partial class GPS_Shipments : ClsPaginas
|
||||
}
|
||||
protected void LnkAddStop_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DtStops != null)
|
||||
{
|
||||
var Row = DtStops.NewRow();
|
||||
Row["StopSequence"] = DtStops.Rows.Count + 1;
|
||||
Row["Name"] = TxtLocName.Text.Trim();
|
||||
Row["LocationID"] = TxtLocID.Text.Trim();
|
||||
Row["StopType"] = DdlStopType.SelectedValue;
|
||||
Row["StopRole"] = DdlStopRole.SelectedValue;
|
||||
Row["EarlyArrivalTime"] = TxtFechaStopI.Text.ToDateTime();
|
||||
Row["LateArrivalTime"] = TxtFechaStopF.Text.ToDateTime();
|
||||
|
||||
Row["Address"] = TxtAddress.Text.Trim();
|
||||
Row["City"] = TxtCity.Text.Trim();
|
||||
Row["State"] = TxtState.Text.Trim();
|
||||
Row["PostalCode"] = TxtPostalCode.Text.Trim();
|
||||
Row["Country"] = TxtContry.Text.Trim();
|
||||
|
||||
var latlon = TxtLatLong.Text.Trim().Split(',');
|
||||
|
||||
Row["Lat"] = latlon[0];
|
||||
Row["Lon"] = latlon[1];
|
||||
|
||||
DtStops.Rows.Add(Row);
|
||||
try
|
||||
{
|
||||
if (DtStops != null)
|
||||
{
|
||||
var Row = DtStops.NewRow();
|
||||
Row["StopSequence"] = DtStops.Rows.Count + 1;
|
||||
Row["Name"] = TxtLocName.Text.Trim();
|
||||
Row["LocationID"] = TxtLocID.Text.Trim();
|
||||
Row["StopType"] = DdlStopType.SelectedValue;
|
||||
Row["StopRole"] = DdlStopRole.SelectedValue;
|
||||
Row["EarlyArrivalTime"] = TxtFechaStopI.Text.ToDateTime();
|
||||
Row["LateArrivalTime"] = TxtFechaStopF.Text.ToDateTime();
|
||||
|
||||
Row["Address"] = TxtAddress.Text.Trim();
|
||||
Row["City"] = TxtCity.Text.Trim();
|
||||
Row["State"] = TxtState.Text.Trim();
|
||||
Row["PostalCode"] = TxtPostalCode.Text.Trim();
|
||||
Row["Country"] = TxtContry.Text.Trim();
|
||||
|
||||
var latlon = TxtLatLong.Text.Trim().Split(',');
|
||||
|
||||
Row["Lat"] = latlon[0];
|
||||
Row["Lon"] = latlon[1];
|
||||
|
||||
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');");
|
||||
}
|
||||
|
||||
@@ -121,6 +121,20 @@ Partial Class General_SaldosIniciales
|
||||
Alert("El nombre de la treceava columna debe ser 'Plazo Cobranza'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If RblFormato.SelectedValue = "1" Then
|
||||
If Not dt.Columns(14).ColumnName = "Vendedor" Then
|
||||
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(15).ColumnName = "Clasificación" Then
|
||||
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
If Not dt.Columns(16).ColumnName = "Es distribuidor" Then
|
||||
Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Then
|
||||
If Not dt.Columns(0).ColumnName = "Sucursal" Then
|
||||
@@ -717,8 +731,14 @@ Partial Class General_SaldosIniciales
|
||||
Dim Telefono As String = Row("Teléfono").ToString
|
||||
Dim Contacto As String = Row("Contacto").ToString
|
||||
Dim CelularContacto As String = Row("Celular Contacto").ToString
|
||||
Dim Vendedor As String = Row("Vendedor").ToString
|
||||
Dim Clasificacion As String = Row("Clasificación").ToString
|
||||
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero
|
||||
|
||||
Dim CveVendedor As Integer = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"Vendedor = '{Vendedor}'").ToString.ToEntero
|
||||
Dim CveClasificación As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero
|
||||
Dim EsDistribuidor As Boolean = If(Row("Es distribuidor").ToString = "si", True, False)
|
||||
|
||||
If CveCliente > 0 Then
|
||||
ExisteCliente = True
|
||||
Contador = Contador + 1
|
||||
@@ -729,8 +749,8 @@ Partial Class General_SaldosIniciales
|
||||
' Exit For
|
||||
'End If
|
||||
Else
|
||||
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, -1,
|
||||
"-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1) Then
|
||||
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, -1, -1,
|
||||
"-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación) Then
|
||||
ErrorClientes = True
|
||||
RFC.GuardaLog
|
||||
Exit For
|
||||
@@ -769,11 +789,11 @@ Partial Class General_SaldosIniciales
|
||||
Dim Encontrados As Integer = 0
|
||||
DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
Dim RFC As String = ""
|
||||
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||
Dim CvePS As Integer = drr("CvePS").ToString.ToEntero
|
||||
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString.ToEntero
|
||||
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString.ToEntero
|
||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||
@@ -789,7 +809,7 @@ Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
||||
Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal
|
||||
Dim TipoDocto As String = Row("Tipo Documento").ToString
|
||||
Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero
|
||||
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString)
|
||||
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString)
|
||||
Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble
|
||||
Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble
|
||||
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
|
||||
|
||||
@@ -34,8 +34,8 @@ Partial Class GPS_PruebaMaster
|
||||
If UsuarioActual.Contraseña = (ContraseñaPredeterminadaEncriptada) OrElse UsuarioActual.ActCambiarContraseña Then
|
||||
Response.Redirect("/Sistemas/CatContrasenia.aspx")
|
||||
Else
|
||||
CargaZonasHorarias()
|
||||
CargaDispositivos()
|
||||
CargaZonasHorarias()
|
||||
End If
|
||||
End If
|
||||
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:TemplateField HeaderText="">
|
||||
<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="." />
|
||||
<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>
|
||||
@@ -173,7 +173,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="">
|
||||
<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="." />
|
||||
<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>
|
||||
@@ -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="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="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" />
|
||||
@@ -199,7 +200,7 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<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-header ">
|
||||
@@ -216,21 +217,17 @@
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalActualizaPrecios" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-4" style="text-align: left">
|
||||
<input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" />Seleccionar Todos
|
||||
<div class="col-md-3" style="text-align: left">
|
||||
<input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" /> Seleccionar Todos
|
||||
</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>
|
||||
<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="-+" />
|
||||
<a id="lnkAplicarPrecioSucursales" runat="server" class="btn btn-default" onclick="CambiaPrecioModal();">Aplicar</a>
|
||||
</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"
|
||||
CssClass="table table-striped table-smallpadding table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
@@ -240,7 +237,7 @@
|
||||
<asp:HiddenField ID="hdnEnBD" runat="server" Value='<%# If (IsDBNull(Eval("CvePS")),0,1) %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sucursal">
|
||||
<asp:TemplateField HeaderText="Sucursal" ItemStyle-Width="30%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("SubProyecto", "{0}") %>'></asp:Literal>
|
||||
</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>
|
||||
</ItemTemplate>
|
||||
</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>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
|
||||
Reference in New Issue
Block a user