Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -74,7 +74,7 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubTipoActivoFijo" EmptyDataText="No se encontraron SubTipos" CssClass="table table-striped table-advance table-hover Widthall" GridLines="None">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubTipoActivoFijo" EmptyDataText="No se encontraron SubTipos" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemStyle Width="206px" />
|
<ItemStyle Width="206px" />
|
||||||
|
|||||||
@@ -190,7 +190,6 @@ Public Class ClsContratos
|
|||||||
Public Property CveChofer2 As Integer
|
Public Property CveChofer2 As Integer
|
||||||
Public Property CveAF As Integer
|
Public Property CveAF As Integer
|
||||||
Public Property CantidadPasajeros As Integer
|
Public Property CantidadPasajeros As Integer
|
||||||
Public Property CveRuta As Integer
|
|
||||||
Public Property CvePartida As Integer
|
Public Property CvePartida As Integer
|
||||||
Public Property CveDestino As Integer
|
Public Property CveDestino As Integer
|
||||||
Public Property CveMasivo As Integer
|
Public Property CveMasivo As Integer
|
||||||
@@ -316,8 +315,7 @@ Public Class ClsContratos
|
|||||||
Me.CveChofer = Data.Rows(0)("CveChofer").ToString.ToEntero
|
Me.CveChofer = Data.Rows(0)("CveChofer").ToString.ToEntero
|
||||||
Me.CveChofer2 = Data.Rows(0)("CveChofer2").ToString.ToEntero
|
Me.CveChofer2 = Data.Rows(0)("CveChofer2").ToString.ToEntero
|
||||||
Me.CveAF = Data.Rows(0)("CveAF").ToString.ToEntero
|
Me.CveAF = Data.Rows(0)("CveAF").ToString.ToEntero
|
||||||
Me.CantidadPasajeros = Data.Rows(0)("CantidadPasajeros").ToString.ToEntero
|
Me.CantidadPasajeros = Data.Rows(0)("CantidadPasajeros").ToString.ToEntero
|
||||||
Me.CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero
|
|
||||||
Me.CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero
|
Me.CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero
|
||||||
Me.CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero
|
Me.CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero
|
||||||
Me.CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
Me.CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ Public Class ClsTransportes
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Destinos"
|
#Region "Destinos"
|
||||||
Public Function GetDestinos(Optional CveRuta As Integer = 0) As Boolean
|
Public Function GetDestinos(Optional CveSubProyecto As Integer = 0) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Trans_DestinosGet")
|
DataAdapter("PA_Trans_DestinosGet")
|
||||||
If CveRuta <> 0 Then
|
If CveRuta <> 0 Then
|
||||||
@@ -290,93 +290,95 @@ Public Class ClsTransportes
|
|||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Rutas"
|
'#Region "Rutas"
|
||||||
Public Function GetRutas(CveRuta As Integer, CveUsuario As Integer, CveEmpresa As Integer, Ruta As String, Estatus As Boolean, FechaIng As DateTime) As Boolean
|
' Public Function GetRutas(CveRuta As Integer, CveUsuario As Integer, CveEmpresa As Integer, Ruta As String, Estatus As Boolean, FechaIng As DateTime) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Trans_RutasGet")
|
' DataAdapter("PA_Trans_RutasGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
' .Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
' .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||||
|
|
||||||
End With
|
' End With
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
|
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
' End Function
|
||||||
Public Function AddRuta(Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
' Public Function AddRuta(Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
||||||
Dim Retorno As Integer = -1
|
' Dim Retorno As Integer = -1
|
||||||
|
|
||||||
DataAdapter("PA_Trans_RutasAdd")
|
' DataAdapter("PA_Trans_RutasAdd")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveRuta", SqlDbType.Int).Direction = ParameterDirection.Output
|
' .Add("@CveRuta", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
' .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
' End With
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveRuta").Value.ToString)
|
' Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveRuta").Value.ToString)
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al agregar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al agregar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
' End Function
|
||||||
Public Function UpdateRuta(CveRuta As Integer, Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
' Public Function UpdateRuta(CveRuta As Integer, Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Trans_RutasUpdate")
|
' DataAdapter("PA_Trans_RutasUpdate")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||||
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
' .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
' End With
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al actualizar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al actualizar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
' End Function
|
||||||
Public Function RemoveRuta(CveRuta As Integer) As Boolean
|
' Public Function RemoveRuta(CveRuta As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
DataAdapter("PA_Trans_RutasRemove")
|
' DataAdapter("PA_Trans_RutasRemove")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||||
End With
|
' End With
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al eliminar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al eliminar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
' End Function
|
||||||
#End Region
|
|
||||||
|
'#End Region
|
||||||
|
|
||||||
#Region "Importes"
|
#Region "Importes"
|
||||||
Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean
|
Public Function GetDestinosTarifas(CveSubProyecto As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Trans_DestinosTarifasGet")
|
DataAdapter("PA_Trans_DestinosTarifasGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
|
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
|
||||||
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
|
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
|
||||||
End With
|
End With
|
||||||
@@ -390,16 +392,16 @@ Public Class ClsTransportes
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddDestinosTarifas(CveRuta As String, CveDestinoOrigen As String, CveDestinoFinal As String, Importe As String) As Integer
|
Public Function AddDestinosTarifas(CveSubProyecto As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal) As Integer
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
|
|
||||||
DataAdapter("PA_Trans_DestinosTarifasAdd")
|
DataAdapter("PA_Trans_DestinosTarifasAdd")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
|
||||||
|
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
|
||||||
|
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe
|
||||||
.Add("@CveDestinoTarifa", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@CveDestinoTarifa", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta.ToEntero
|
|
||||||
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen.ToEntero
|
|
||||||
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal.ToEntero
|
|
||||||
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe.ToDecimal
|
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -410,15 +412,15 @@ Public Class ClsTransportes
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateDestinosTarifas(CveDestinoTarifa As Integer, CveRuta As String, CveDestinoOrigen As String, CveDestinoFinal As String, Importe As String) As Boolean
|
Public Function UpdateDestinosTarifas(CveDestinoTarifa As Integer, CveSubProyecto As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Trans_DestinosTarifasUpdate")
|
DataAdapter("PA_Trans_DestinosTarifasUpdate")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa
|
.Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa
|
||||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta.ToEntero
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen.ToEntero
|
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
|
||||||
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal.ToEntero
|
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
|
||||||
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe.ToDecimal
|
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel">
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
<%-- Boleto --%>
|
<%-- Boleto --%>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<%-- Datos del Cliente --%>
|
<%-- Datos del Cliente --%>
|
||||||
@@ -105,9 +106,7 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<asp:UpdatePanel runat="server" ID="UpTimer" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpTimer" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Label ID="lblTiempo" runat="server" Text="00:00:00"></asp:Label></p>
|
<asp:Label ID="lblTiempo" runat="server" Text="00:00:00"></asp:Label>
|
||||||
<asp:Timer ID="timerActualizar" runat="server" Interval="1000" OnTick="TimerActualizar_Tick" Enabled="False">
|
|
||||||
</asp:Timer>
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
@@ -191,10 +190,10 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlPartida" DataTextField="Destino"
|
<asp:DropDownList ID="DdlPartida" DataTextField="Partida"
|
||||||
AutoPostBack="true"
|
AutoPostBack="true"
|
||||||
DataValueField="CveDestino" Class="form-control input-sm select2me" Width="200px"
|
DataValueField="CveDestinoOrigen" Class="form-control input-sm select2me" Width="200px"
|
||||||
runat="server">
|
runat="server" OnSelectedIndexChanged="DdlPartida_SelectedIndexChanged" >
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVPartida" runat="server" ControlToValidate="DdlPartida"
|
<asp:RequiredFieldValidator ID="RFVPartida" runat="server" ControlToValidate="DdlPartida"
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Partida''</b> es necesario, por favor ingréselo."
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Partida''</b> es necesario, por favor ingréselo."
|
||||||
@@ -216,7 +215,7 @@
|
|||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlDestino" DataTextField="Destino"
|
<asp:DropDownList ID="DdlDestino" DataTextField="Destino"
|
||||||
AutoPostBack="true"
|
AutoPostBack="true"
|
||||||
DataValueField="CveDestino" Class="form-control input-sm select2me"
|
DataValueField="CveDestinoFinal" Class="form-control input-sm select2me"
|
||||||
Width="200px" runat="server">
|
Width="200px" runat="server">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="DdlDestino"
|
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="DdlDestino"
|
||||||
@@ -520,6 +519,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -527,16 +527,18 @@
|
|||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var tiempoTranscurrido = 0;
|
var tiempoTranscurrido = 0;
|
||||||
|
setInterval(actualizarTiempo, 1000);
|
||||||
function actualizarTiempo() {
|
function actualizarTiempo() {
|
||||||
tiempoTranscurrido++;
|
tiempoTranscurrido++;
|
||||||
var horas = Math.floor(tiempoTranscurrido / 3600);
|
var horas = Math.floor(tiempoTranscurrido / 3600);
|
||||||
var minutos = Math.floor((tiempoTranscurrido % 3600) / 60);
|
var minutos = Math.floor((tiempoTranscurrido % 3600) / 60);
|
||||||
var segundos = tiempoTranscurrido % 60;
|
var segundos = tiempoTranscurrido % 60;
|
||||||
|
//(horas < 10 ? "0" : "") + horas + " : " +
|
||||||
var tiempoFormateado = (horas < 10 ? "0" : "") + horas + " : " + (minutos < 10 ? "0" : "") + minutos + " : " + (segundos < 10 ? "0" : "") + segundos + " s";
|
var tiempoFormateado = (minutos < 10 ? "0" : "") + minutos + " : " + (segundos < 10 ? "0" : "") + segundos + " s";
|
||||||
document.getElementById('<%= lblTiempo.ClientID %>').innerText = tiempoFormateado;
|
document.getElementById('<%= lblTiempo.ClientID %>').innerText = tiempoFormateado;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,14 @@ Partial Class Boletos
|
|||||||
ViewState("Contrato") = value
|
ViewState("Contrato") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property DtDestinos As DataTable
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("DtDestinos"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtDestinos") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property DtPasajeros As DataTable
|
Private Property DtPasajeros As DataTable
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("DtPasajeros"), DataTable)
|
Return CType(ViewState("DtPasajeros"), DataTable)
|
||||||
@@ -73,7 +81,7 @@ Partial Class Boletos
|
|||||||
If ObjContratos.GetContratos(CveViaje, UsuarioActual.CveEmpresa) Then
|
If ObjContratos.GetContratos(CveViaje, UsuarioActual.CveEmpresa) Then
|
||||||
Contrato = ObjContratos.DtResultados
|
Contrato = ObjContratos.DtResultados
|
||||||
If ObjContratos.DtResultados IsNot Nothing AndAlso ObjContratos.DtResultados.Rows.Count > 0 Then
|
If ObjContratos.DtResultados IsNot Nothing AndAlso ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||||
TxtRuta.Text = Contrato.Rows(0)("Ruta").ToString
|
TxtRuta.Text = Contrato.Rows(0)("SubProyecto").ToString
|
||||||
TxtFecha.Text = Contrato.Rows(0)("FechaInicial").ToString.ToDate.ToShortDateString
|
TxtFecha.Text = Contrato.Rows(0)("FechaInicial").ToString.ToDate.ToShortDateString
|
||||||
DtPasajeros = New DataTable
|
DtPasajeros = New DataTable
|
||||||
DtPasajeros.Columns.Add("Numero", GetType(Integer))
|
DtPasajeros.Columns.Add("Numero", GetType(Integer))
|
||||||
@@ -122,22 +130,35 @@ Partial Class Boletos
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub InicializaCombos()
|
Protected Sub InicializaCombos()
|
||||||
Dim CveRuta As Integer = Contrato.Rows(0)("CveRuta").ToString.ToEntero
|
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
'Lista Destinos''carga específicos
|
'Lista Destinos''carga específicos
|
||||||
Dim ObjDestinos As New ClsTransportes()
|
Dim ObjDestinos As New ClsTransportes()
|
||||||
If ObjDestinos.GetDestinos(CveRuta:=CveRuta) Then
|
|
||||||
If ObjDestinos.DtResultados.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
DdlPartida.DataSource = ObjDestinos.DtResultados
|
If ObjDestinos.GetDestinosTarifas(CveSubProyecto, -1, -1) Then
|
||||||
|
If ObjDestinos.DtResultados.Rows.Count > 0 Then
|
||||||
|
DtDestinos = ObjDestinos.DtResultados
|
||||||
|
DdlPartida.DataSource = DtDestinos.FiltraParametros("", DistinctColumns:={"CveDestinoOrigen", "Partida"})
|
||||||
DdlPartida.DataBind()
|
DdlPartida.DataBind()
|
||||||
DdlPartida.Items.Insert(0, New ListItem("Seleccione Partida", "-1"))
|
DdlPartida.Items.Insert(0, New ListItem("Seleccione Partida", "-1"))
|
||||||
|
|
||||||
DdlDestino.DataSource = ObjDestinos.DtResultados
|
'DdlDestino.DataSource = DtDestinos
|
||||||
DdlDestino.DataBind()
|
'DdlDestino.DataBind()
|
||||||
DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
'DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'If ObjDestinos.GetDestinos(CveSubProyecto:=CveSubProyecto) Then
|
||||||
|
' If ObjDestinos.DtResultados.Rows.Count > 0 Then
|
||||||
|
' DdlPartida.DataSource = ObjDestinos.DtResultados
|
||||||
|
' DdlPartida.DataBind()
|
||||||
|
' DdlPartida.Items.Insert(0, New ListItem("Seleccione Partida", "-1"))
|
||||||
|
|
||||||
|
' DdlDestino.DataSource = ObjDestinos.DtResultados
|
||||||
|
' DdlDestino.DataBind()
|
||||||
|
' DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
ObjDestinos.Dispose()
|
ObjDestinos.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -145,12 +166,12 @@ Partial Class Boletos
|
|||||||
If DdlDestino.SelectedValue <> "-1" And DdlPartida.SelectedValue <> "-1" Then
|
If DdlDestino.SelectedValue <> "-1" And DdlPartida.SelectedValue <> "-1" Then
|
||||||
Dim ImporteR As Decimal = 0
|
Dim ImporteR As Decimal = 0
|
||||||
Dim ObjDestinos As New ClsTransportes()
|
Dim ObjDestinos As New ClsTransportes()
|
||||||
|
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
Try
|
If ObjDestinos.GetDestinosTarifas(CveSubProyecto, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then
|
||||||
If ObjDestinos.GetDestinosTarifas(DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then
|
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL
|
||||||
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL
|
End If
|
||||||
End If
|
If ImporteR > 0 Then
|
||||||
If ImporteR > 0 Then
|
|
||||||
ViewState("Importe") = ImporteR
|
ViewState("Importe") = ImporteR
|
||||||
LbCostos.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
LbCostos.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
||||||
LbCostos.Visible = True
|
LbCostos.Visible = True
|
||||||
@@ -161,12 +182,9 @@ Partial Class Boletos
|
|||||||
LbCostos.Visible = False
|
LbCostos.Visible = False
|
||||||
Alert("No se encontro una tarifa para estos destinos", TipoMensaje.MsgAdvertencia)
|
Alert("No se encontro una tarifa para estos destinos", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
|
||||||
Alert("No se encontro una tarifa para estos destinos", TipoMensaje.MsgAdvertencia)
|
ObjDestinos.Dispose()
|
||||||
ObjDestinos.RollBack()
|
|
||||||
Finally
|
|
||||||
ObjDestinos.Dispose()
|
|
||||||
End Try
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -276,8 +294,10 @@ Partial Class Boletos
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPartida.SelectedIndexChanged
|
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
CotizarTarifa()
|
DdlDestino.DataSource = DtDestinos.FiltraParametros($"CveDestinoOrigen = {DdlPartida.SelectedValue}")
|
||||||
|
DdlDestino.DataBind()
|
||||||
|
DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDestino.SelectedIndexChanged
|
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDestino.SelectedIndexChanged
|
||||||
@@ -393,8 +413,10 @@ Partial Class Boletos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Protected Sub TimerActualizar_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles timerActualizar.Tick
|
'Protected Sub TimerActualizar_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles timerActualizar.Tick
|
||||||
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "ActualizarTiempo", "actualizarTiempo();", True)
|
' ScriptManager.RegisterStartupScript(Me, Me.GetType(), "ActualizarTiempo", "actualizarTiempo();", True)
|
||||||
UpTimer.Update()
|
' UpTimer.Update()
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -26,55 +26,6 @@
|
|||||||
<asp:Panel ID="PnlGeneral" runat="server">
|
<asp:Panel ID="PnlGeneral" runat="server">
|
||||||
<%--Calendario Tab--%>
|
<%--Calendario Tab--%>
|
||||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||||
<%--Rutas Tab--%>
|
|
||||||
<ajax:TabPanel ID="TabRutas" runat="server" HeaderText="Rutas">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="spaced">
|
|
||||||
<div>
|
|
||||||
<asp:LinkButton ID="BtnAgregarRuta" runat="server" AlternateText="Agregar"
|
|
||||||
CssClass="btn bsuccesscle btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-add'>Agregar</i>"
|
|
||||||
ToolTip="Agregar" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvRutas.ClientID) %>"
|
|
||||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvRutas.ClientID) %>"
|
|
||||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
|
||||||
</i></a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<asp:GridView ID="GvRutas" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
|
||||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
|
||||||
data-sort="true" DataKeyNames="CveRuta, Ruta, Estatus, CveUsuario, FechaIng, CveEmpresa">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField HeaderText="Ruta">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlRuta" runat="server" Text='<%# Eval("Ruta") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Estatus">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("Estatus").ToString = "True", "Activo", "Inactivo") %>'
|
|
||||||
CssClass='<%# If(Eval("Estatus").ToString = "True", "text-success", "text-danger") %>'></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="BtnEditarRuta" runat="server" AlternateText="Editar"
|
|
||||||
CssClass="btn btn-circle btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-pencil'></i>" />
|
|
||||||
<asp:LinkButton ID="BtnEliminarRuta" runat="server" AlternateText="Eliminar"
|
|
||||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveRuta" Text="<i class='fa fa-trash'></i>"
|
|
||||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
|
||||||
data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</ContentTemplate>
|
|
||||||
</ajax:TabPanel>
|
|
||||||
<%--Destinos Tab--%>
|
<%--Destinos Tab--%>
|
||||||
<ajax:TabPanel ID="TabDestinos" runat="server" HeaderText="Destinos">
|
<ajax:TabPanel ID="TabDestinos" runat="server" HeaderText="Destinos">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -133,7 +84,7 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<%--Importes Tab--%>
|
<%--Importes Tab--%>
|
||||||
<ajax:TabPanel ID="TabImportes" runat="server" HeaderText="Importes">
|
<ajax:TabPanel ID="TabImportes" runat="server" HeaderText="Tarifas">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="spaced">
|
<div class="spaced">
|
||||||
<div>
|
<div>
|
||||||
@@ -152,29 +103,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:GridView ID="GvImportes" runat="server" AutoGenerateColumns="false" EmptyDataText="No
|
<asp:GridView ID="GvImportes" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||||
se Encontró Contrato Registrado"
|
|
||||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||||
data-sort="true" DataKeyNames="CveDestinoTarifa, CveRuta, CveDestinoOrigen, CveDestinoFinal, Importe, Destino, Salida">
|
data-sort="true" DataKeyNames="CveDestinoTarifa, CveSubProyecto, CveDestinoOrigen, CveDestinoFinal, Importe, Destino, Partida">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Ruta">
|
<asp:TemplateField HeaderText="Ruta">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlCveRuta" runat="server" Text='<%# Eval("Ruta")%>'></asp:Literal>
|
<asp:Literal ID="LtlCveRuta" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Destino">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino")%>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Salida">
|
<asp:TemplateField HeaderText="Salida">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlSalida" runat="server" Text='<%# Eval("Salida")%>'></asp:Literal>
|
<asp:Literal ID="LtlSalida" runat="server" Text='<%# Eval("Partida")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Destino">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Importe" ItemStyle-CssClass="text-right">
|
<asp:TemplateField HeaderText="Importe" ItemStyle-CssClass="text-right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Literal>
|
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Literal>
|
||||||
@@ -305,8 +253,8 @@
|
|||||||
<div class="row my-1">
|
<div class="row my-1">
|
||||||
<label class="col-md-4">Ruta:</label>
|
<label class="col-md-4">Ruta:</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="Ruta"
|
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="SubProyecto"
|
||||||
DataValueField="CveRuta" Class="form-control input-sm select2me"
|
DataValueField="CveSubProyecto" Class="form-control input-sm select2me"
|
||||||
Width="200px" runat="server">
|
Width="200px" runat="server">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVRutas" runat="server" ControlToValidate="DdlRutas"
|
<asp:RequiredFieldValidator ID="RFVRutas" runat="server" ControlToValidate="DdlRutas"
|
||||||
@@ -368,8 +316,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<asp:Button ID="BtnAddRuta" OnClick="AddRuta" runat="server" CssClass="btn btn-primary"
|
|
||||||
ValidationGroup="GrpGuardar" Visible="false"></asp:Button>
|
|
||||||
<asp:Button ID="BtnAddDestino" OnClick="AddDestino" runat="server" CssClass="btn btn-primary"
|
<asp:Button ID="BtnAddDestino" OnClick="AddDestino" runat="server" CssClass="btn btn-primary"
|
||||||
ValidationGroup="GrpGuardar" Visible="false"></asp:Button>
|
ValidationGroup="GrpGuardar" Visible="false"></asp:Button>
|
||||||
<asp:Button ID="BtnAddImporte" OnClick="AddImporte" runat="server" CssClass="btn btn-primary"
|
<asp:Button ID="BtnAddImporte" OnClick="AddImporte" runat="server" CssClass="btn btn-primary"
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Extensiones.ModExtensiones
|
|
||||||
|
|
||||||
Partial Class CatRutas
|
Partial Class CatRutas
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -25,14 +23,15 @@ Partial Class CatRutas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
'Lista Rutas'
|
'Lista Rutas'
|
||||||
Dim ObjRutas As New ClsTransportes()
|
|
||||||
If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
|
||||||
|
|
||||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
Dim ObjRutas As New ClsTransportes()
|
||||||
GvRutas.DataSource = ObjRutas.DtResultados
|
'If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||||
GvRutas.DataBind()
|
|
||||||
End If
|
' If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||||
End If
|
' GvRutas.DataSource = ObjRutas.DtResultados
|
||||||
|
' GvRutas.DataBind()
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
'Lista Destinos'
|
'Lista Destinos'
|
||||||
If ObjRutas.GetDestinos() Then
|
If ObjRutas.GetDestinos() Then
|
||||||
|
|
||||||
@@ -42,12 +41,13 @@ Partial Class CatRutas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
'Lista Importes'
|
'Lista Importes'
|
||||||
If ObjRutas.GetDestinosTarifas(-1, -1) Then
|
If ObjRutas.GetDestinosTarifas(-1, -1, -1) Then
|
||||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||||
GvImportes.DataSource = ObjRutas.DtResultados
|
GvImportes.DataSource = ObjRutas.DtResultados
|
||||||
GvImportes.DataBind()
|
GvImportes.DataBind()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
ObjRutas.Dispose()
|
||||||
|
|
||||||
UpPanel.Update()
|
UpPanel.Update()
|
||||||
|
|
||||||
@@ -71,16 +71,18 @@ Partial Class CatRutas
|
|||||||
End If
|
End If
|
||||||
ObjDestinos.Dispose()
|
ObjDestinos.Dispose()
|
||||||
|
|
||||||
|
DdlRutas.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveSubProyecto in (12699,12700)")
|
||||||
|
DdlRutas.DataBind()
|
||||||
|
DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||||
|
'Dim ObjRutas As New ClsTransportes()
|
||||||
|
'If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||||
|
|
||||||
Dim ObjRutas As New ClsTransportes()
|
' If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||||
If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
' DdlRutas.DataSource = ObjRutas.DtResultados
|
||||||
|
' DdlRutas.DataBind()
|
||||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
' DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||||
DdlRutas.DataSource = ObjRutas.DtResultados
|
' End If
|
||||||
DdlRutas.DataBind()
|
'End If
|
||||||
DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub MostrarModal(sender As Object, e As EventArgs)
|
Protected Sub MostrarModal(sender As Object, e As EventArgs)
|
||||||
@@ -92,7 +94,6 @@ Partial Class CatRutas
|
|||||||
DdlOrigen.SelectedValue = ""
|
DdlOrigen.SelectedValue = ""
|
||||||
DdlFinal.SelectedValue = ""
|
DdlFinal.SelectedValue = ""
|
||||||
TxtImporte.Text = ""
|
TxtImporte.Text = ""
|
||||||
BtnAddRuta.Visible = False
|
|
||||||
BtnAddDestino.Visible = False
|
BtnAddDestino.Visible = False
|
||||||
BtnAddImporte.Visible = False
|
BtnAddImporte.Visible = False
|
||||||
PnRuta.Visible = False
|
PnRuta.Visible = False
|
||||||
@@ -109,11 +110,8 @@ Partial Class CatRutas
|
|||||||
PnRuta.Visible = True
|
PnRuta.Visible = True
|
||||||
TxtRuta.Text = GvRow.DataKey("Ruta")
|
TxtRuta.Text = GvRow.DataKey("Ruta")
|
||||||
DdlRutaEstatus.SelectedValue = GvRow.DataKey("Estatus")
|
DdlRutaEstatus.SelectedValue = GvRow.DataKey("Estatus")
|
||||||
BtnAddRuta.Visible = True
|
|
||||||
BtnAddRuta.Text = "Editar"
|
|
||||||
ViewState("Cve") = GvRow.DataKey("CveRuta").ToEntero
|
ViewState("Cve") = GvRow.DataKey("CveRuta").ToEntero
|
||||||
|
|
||||||
|
|
||||||
Case "BtnEditarDestino"
|
Case "BtnEditarDestino"
|
||||||
ModalLabel.Text = "Editar Destino"
|
ModalLabel.Text = "Editar Destino"
|
||||||
TxtDestino.Text = GvRow.DataKey("Destino")
|
TxtDestino.Text = GvRow.DataKey("Destino")
|
||||||
@@ -124,10 +122,9 @@ Partial Class CatRutas
|
|||||||
BtnAddDestino.Text = "Editar"
|
BtnAddDestino.Text = "Editar"
|
||||||
ViewState("Cve") = GvRow.DataKey("CveDestino").ToEntero
|
ViewState("Cve") = GvRow.DataKey("CveDestino").ToEntero
|
||||||
|
|
||||||
|
|
||||||
Case "BtnEditarImporte"
|
Case "BtnEditarImporte"
|
||||||
ModalLabel.Text = "Editar Importe"
|
ModalLabel.Text = "Editar Importe"
|
||||||
DdlRutas.SelectedValue = GvRow.DataKey("CveRuta")
|
DdlRutas.SelectedValue = GvRow.DataKey("CveSubProyecto")
|
||||||
DdlOrigen.SelectedValue = GvRow.DataKey("CveDestinoOrigen")
|
DdlOrigen.SelectedValue = GvRow.DataKey("CveDestinoOrigen")
|
||||||
DdlFinal.SelectedValue = GvRow.DataKey("CveDestinoFinal")
|
DdlFinal.SelectedValue = GvRow.DataKey("CveDestinoFinal")
|
||||||
TxtImporte.Text = GvRow.DataKey("Importe")
|
TxtImporte.Text = GvRow.DataKey("Importe")
|
||||||
@@ -136,7 +133,6 @@ Partial Class CatRutas
|
|||||||
BtnAddImporte.Text = "Editar"
|
BtnAddImporte.Text = "Editar"
|
||||||
ViewState("Cve") = GvRow.DataKey("CveDestinoTarifa").ToEntero
|
ViewState("Cve") = GvRow.DataKey("CveDestinoTarifa").ToEntero
|
||||||
|
|
||||||
|
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -145,8 +141,6 @@ Partial Class CatRutas
|
|||||||
Case "BtnAgregarRuta"
|
Case "BtnAgregarRuta"
|
||||||
ModalLabel.Text = "Agregar Ruta"
|
ModalLabel.Text = "Agregar Ruta"
|
||||||
PnRuta.Visible = True
|
PnRuta.Visible = True
|
||||||
BtnAddRuta.Visible = True
|
|
||||||
BtnAddRuta.Text = "Guardar"
|
|
||||||
Case "BtnAgregarDestino"
|
Case "BtnAgregarDestino"
|
||||||
ModalLabel.Text = "Agregar Destino"
|
ModalLabel.Text = "Agregar Destino"
|
||||||
PnDestino.Visible = True
|
PnDestino.Visible = True
|
||||||
@@ -165,46 +159,46 @@ Partial Class CatRutas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region "Rutas"
|
'#Region "Rutas"
|
||||||
Protected Sub AddRuta(sender As Object, e As EventArgs)
|
' Protected Sub AddRuta(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim ObjRuta As New ClsTransportes
|
' Dim ObjRuta As New ClsTransportes
|
||||||
ObjRuta.IniciaTransacSQL()
|
' ObjRuta.IniciaTransacSQL()
|
||||||
Try
|
' Try
|
||||||
If BtnAddRuta.Text = "Guardar" Then
|
' If BtnAddRuta.Text = "Guardar" Then
|
||||||
If ObjRuta.AddRuta(TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then
|
' If ObjRuta.AddRuta(TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then
|
||||||
ObjRuta.Commit()
|
' ObjRuta.Commit()
|
||||||
Alert("Ruta Agregada Correctamente.")
|
' Alert("Ruta Agregada Correctamente.")
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If BtnAddRuta.Text = "Editar" Then
|
' If BtnAddRuta.Text = "Editar" Then
|
||||||
If ObjRuta.UpdateRuta(Cve, TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
' If ObjRuta.UpdateRuta(Cve, TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
ObjRuta.Commit()
|
' ObjRuta.Commit()
|
||||||
Alert("Ruta Actualizada Correctamente.")
|
' Alert("Ruta Actualizada Correctamente.")
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
ObjRuta.RollBack()
|
' ObjRuta.RollBack()
|
||||||
Finally
|
' Finally
|
||||||
CargaDatos()
|
' CargaDatos()
|
||||||
ObjRuta.Dispose()
|
' ObjRuta.Dispose()
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
' End Sub
|
||||||
Protected Sub RemoveRuta(sender As Object, e As EventArgs)
|
' Protected Sub RemoveRuta(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
' Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
Dim ObjRuta As New ClsTransportes
|
' Dim ObjRuta As New ClsTransportes
|
||||||
|
|
||||||
If ObjRuta.RemoveRuta(GvRow.DataKey("CveRuta").ToEntero) Then
|
' If ObjRuta.RemoveRuta(GvRow.DataKey("CveRuta").ToEntero) Then
|
||||||
Alert("Ruta eliminada correctamente")
|
' Alert("Ruta eliminada correctamente")
|
||||||
CargaDatos()
|
' CargaDatos()
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
ObjRuta.Dispose()
|
' ObjRuta.Dispose()
|
||||||
End Sub
|
' End Sub
|
||||||
#End Region
|
'#End Region
|
||||||
|
|
||||||
#Region "Destinos"
|
#Region "Destinos"
|
||||||
Protected Sub AddDestino(sender As Object, e As EventArgs)
|
Protected Sub AddDestino(sender As Object, e As EventArgs)
|
||||||
@@ -252,27 +246,22 @@ Partial Class CatRutas
|
|||||||
|
|
||||||
Dim ObjImporte As New ClsTransportes
|
Dim ObjImporte As New ClsTransportes
|
||||||
ObjImporte.IniciaTransacSQL()
|
ObjImporte.IniciaTransacSQL()
|
||||||
Try
|
|
||||||
If BtnAddImporte.Text = "Guardar" Then
|
|
||||||
If ObjImporte.AddDestinosTarifas(DdlRutas.SelectedValue, DdlOrigen.SelectedValue, DdlFinal.SelectedValue, TxtImporte.Text) > 1 Then
|
|
||||||
ObjImporte.Commit()
|
|
||||||
Alert("Importe agregado correctamente.")
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If BtnAddImporte.Text = "Editar" Then
|
If BtnAddImporte.Text = "Guardar" Then
|
||||||
If ObjImporte.UpdateDestinosTarifas(Cve, DdlRutas.SelectedValue, DdlOrigen.SelectedValue, DdlFinal.SelectedValue, TxtImporte.Text) Then
|
If ObjImporte.AddDestinosTarifas(DdlRutas.SelectedValue.ToEntero, DdlOrigen.SelectedValue.ToEntero, DdlFinal.SelectedValue.ToEntero, TxtImporte.Text.ToDecimal) > 1 Then
|
||||||
ObjImporte.Commit()
|
ObjImporte.Commit()
|
||||||
Alert("Importe actualizado correctamente.")
|
Alert("Importe agregado correctamente.")
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
End If
|
||||||
ObjImporte.RollBack()
|
|
||||||
Finally
|
|
||||||
CargaDatos()
|
|
||||||
ObjImporte.Dispose()
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
If BtnAddImporte.Text = "Editar" Then
|
||||||
|
If ObjImporte.UpdateDestinosTarifas(Cve, DdlRutas.SelectedValue.ToEntero, DdlOrigen.SelectedValue.ToEntero, DdlFinal.SelectedValue.ToEntero, TxtImporte.Text.ToDecimal) Then
|
||||||
|
ObjImporte.Commit()
|
||||||
|
Alert("Importe actualizado correctamente.")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjImporte.Dispose()
|
||||||
|
CargaDatos()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub RemoveImporte(sender As Object, e As EventArgs)
|
Protected Sub RemoveImporte(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@@ -48,35 +48,36 @@ Partial Class RepContratoDetalle
|
|||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||||
Contrato = ObjContratos.DtResultados
|
Contrato = ObjContratos.DtResultados
|
||||||
|
If Contrato IsNot Nothing AndAlso Contrato.Rows.Count > 0 Then
|
||||||
|
LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString
|
||||||
|
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
|
||||||
|
DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString
|
||||||
|
TxtDescripcion.Text = Contrato.Rows(0)("DescripcionContrato").ToString
|
||||||
|
TxtObservaciones.Text = Contrato.Rows(0)("Observaciones").ToString
|
||||||
|
TxtUbicacion.Text = Contrato.Rows(0)("Ubicacion").ToString
|
||||||
|
TxtFechaSalida.Text = Contrato.Rows(0)("FechaInicial").ToString
|
||||||
|
TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString
|
||||||
|
TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString
|
||||||
|
DdlTipoAF.SelectedValue = Contrato.Rows(0)("CveTipoAF").ToString
|
||||||
|
TxtDolares.Text = Contrato.Rows(0)("Importe").ToString
|
||||||
|
TxtPesos.Text = Contrato.Rows(0)("ImporteMax").ToString
|
||||||
|
TxtAnticipo.Text = Contrato.Rows(0)("ImporteMin").ToString
|
||||||
|
'Boletos Vendidos
|
||||||
|
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
|
||||||
|
TabBoletos.Visible = True
|
||||||
|
Dim ObjTransportes As New ClsTransportes
|
||||||
|
If ObjTransportes.GetViajesPasajeros(CveContrato) Then
|
||||||
|
GvViajesPasajeros.DataSource = ObjTransportes.DtResultados
|
||||||
|
End If
|
||||||
|
ObjTransportes.Dispose()
|
||||||
|
GvViajesPasajeros.DataBind()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
|
ObjContratos.Dispose()
|
||||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||||
End If
|
End If
|
||||||
|
ObjContratos.Dispose()
|
||||||
|
|
||||||
LbFolio.Text = Contrato.Rows(0)("NumeroContrato").ToString
|
|
||||||
DdlClientes.SelectedText = Contrato.Rows(0)("NombreComercial").ToString
|
|
||||||
DdlClientes.SelectedValue = Contrato.Rows(0)("CveCliente").ToString
|
|
||||||
TxtDescripcion.Text = Contrato.Rows(0)("DescripcionContrato").ToString
|
|
||||||
TxtObservaciones.Text = Contrato.Rows(0)("Observaciones").ToString
|
|
||||||
TxtUbicacion.Text = Contrato.Rows(0)("Ubicacion").ToString
|
|
||||||
TxtFechaSalida.Text = Contrato.Rows(0)("FechaInicial").ToString
|
|
||||||
TxtFechaRegreso.Text = Contrato.Rows(0)("FechaFinal").ToString
|
|
||||||
TxtCantidadPasajeros.Text = Contrato.Rows(0)("CantidadPasajeros").ToString
|
|
||||||
DdlTipoAF.SelectedValue = Contrato.Rows(0)("CveTipoAF").ToString
|
|
||||||
TxtDolares.Text = Contrato.Rows(0)("Importe").ToString
|
|
||||||
TxtPesos.Text = Contrato.Rows(0)("ImporteMax").ToString
|
|
||||||
TxtAnticipo.Text = Contrato.Rows(0)("ImporteMin").ToString
|
|
||||||
'Boletos Vendidos
|
|
||||||
If Contrato.Rows(0)("CveContratoTipo").ToString() = "35" Then
|
|
||||||
TabBoletos.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim ObjTransportes As New ClsTransportes
|
|
||||||
If ObjTransportes.GetViajesPasajeros(CveContrato) Then
|
|
||||||
GvViajesPasajeros.DataSource = ObjTransportes.DtResultados
|
|
||||||
GvViajesPasajeros.DataBind()
|
|
||||||
ObjTransportes.Dispose()
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Contrato">
|
<asp:TemplateField HeaderText="Contrato">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" NavigateUrl='<%# "~/Transportes/RepContratoDetalle.aspx?CveContrato=" + If(Eval("CveContrato") IsNot DBNull.Value, Eval("CveContrato").ToString(), String.Empty) %>'
|
<asp:HyperLink runat="server" NavigateUrl='<%# Eval("CveContrato", "/Transportes/RepContratoDetalle.aspx?CveContrato={0}") %>'
|
||||||
Text='<%# Eval("NumeroContrato") %>'></asp:HyperLink>
|
Text='<%# Eval("NumeroContrato") %>'></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ Partial Class ListadoContratos
|
|||||||
'Lista de Monedas
|
'Lista de Monedas
|
||||||
DdlMoneda.DataSource = GlobalDTMonedas
|
DdlMoneda.DataSource = GlobalDTMonedas
|
||||||
DdlMoneda.DataBind()
|
DdlMoneda.DataBind()
|
||||||
|
|
||||||
|
DdlEstatus.DataSource = GlobalDTContratosEstatus(UsuarioActual.CveEmpresa)
|
||||||
|
DdlEstatus.DataBind()
|
||||||
|
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
@@ -52,11 +57,6 @@ Partial Class ListadoContratos
|
|||||||
GvContratos.DataBind()
|
GvContratos.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
|
||||||
DdlEstatus.DataSource = ObjContratos.DtResultados
|
|
||||||
DdlEstatus.DataBind()
|
|
||||||
DdlEstatus.Items.Insert(0, New ListItem("-", ""))
|
|
||||||
End If
|
|
||||||
'Generamos Folio - NumeroContrato
|
'Generamos Folio - NumeroContrato
|
||||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||||
Dim ObjFolio As New ClsGralFolios
|
Dim ObjFolio As New ClsGralFolios
|
||||||
|
|||||||
@@ -49,12 +49,11 @@ Partial Class RepContratosCalendario
|
|||||||
|
|
||||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, CveEstatus:=DdlEstatusConsulta.SelectedValue.ToEntero, CveTipoContrato:=34) Then
|
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, CveEstatus:=DdlEstatusConsulta.SelectedValue.ToEntero, CveTipoContrato:=34) Then
|
||||||
GvContratos.DataSource = ObjContratos.DtResultados
|
GvContratos.DataSource = ObjContratos.DtResultados
|
||||||
GvContratos.DataBind()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DtAvance = ObjContratos.DtResultados
|
DtAvance = ObjContratos.DtResultados
|
||||||
|
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
|
GvContratos.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub InicializaCalendar()
|
Private Sub InicializaCalendar()
|
||||||
|
|
||||||
|
|||||||
@@ -49,13 +49,13 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Contrato">
|
<asp:TemplateField HeaderText="Contrato">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton runat="server" Text='<%# Eval("NumeroContrato") %>' OnClick="GoContratoDetalle"></asp:LinkButton>
|
<asp:HyperLink runat="server" Text='<%# Eval("NumeroContrato") %>' NavigateUrl='<%# Eval("CveContrato", "/Transportes/RepContratoDetalle.aspx?CveContrato={0}") %>' ></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Ruta">
|
<asp:TemplateField HeaderText="Ruta">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlRuta" runat="server" Text='<%# Eval("Ruta") %>'></asp:Literal>
|
<asp:Literal ID="LtlRuta" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
@@ -115,8 +115,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-4">Ruta</label>
|
<label class="col-md-4">Ruta</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="Ruta"
|
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="SubProyecto"
|
||||||
DataValueField="CveRuta" Class="form-control input-sm select2me"
|
DataValueField="CveSubProyecto" Class="form-control input-sm select2me"
|
||||||
Width="100%" runat="server">
|
Width="100%" runat="server">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVRutas" runat="server" ControlToValidate="DdlRutas"
|
<asp:RequiredFieldValidator ID="RFVRutas" runat="server" ControlToValidate="DdlRutas"
|
||||||
|
|||||||
@@ -34,15 +34,21 @@ Partial Class ListadoViajes
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub InicializaCombos()
|
Private Sub InicializaCombos()
|
||||||
'Lista Rutas'
|
'Lista Rutas'
|
||||||
Dim ObjRutas As New ClsTransportes()
|
DdlRutas.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveSubProyecto in (12699,12700)")
|
||||||
If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
DdlRutas.DataBind()
|
||||||
|
|
||||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
Dim ObjRutas As New ClsTransportes()
|
||||||
DdlRutas.DataSource = ObjRutas.DtResultados
|
'If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||||
DdlRutas.DataBind()
|
|
||||||
DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
' If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||||
End If
|
' DdlRutas.DataSource = ObjRutas.DtResultados
|
||||||
End If
|
' DdlRutas.DataBind()
|
||||||
|
' DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
'DdlRutas.DataSource = ObjRutas.DtResultados
|
||||||
|
' DdlRutas.DataBind()
|
||||||
|
' DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||||
'Lista Destinos'
|
'Lista Destinos'
|
||||||
If ObjRutas.GetDestinos() Then
|
If ObjRutas.GetDestinos() Then
|
||||||
|
|
||||||
@@ -62,11 +68,15 @@ Partial Class ListadoViajes
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
'Carga Viajes
|
'Carga Viajes
|
||||||
Dim ObjContratos As New ClsContratos
|
Dim ObjContratos As New ClsContratos
|
||||||
|
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, -1, CveEstatus:=-1, CveTipoContrato:=35) Then
|
||||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=35) Then
|
|
||||||
GvContratos.DataSource = ObjContratos.DtResultados
|
GvContratos.DataSource = ObjContratos.DtResultados
|
||||||
GvContratos.DataBind()
|
|
||||||
End If
|
End If
|
||||||
|
ObjContratos.Dispose()
|
||||||
|
GvContratos.DataBind()
|
||||||
|
'If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=35) Then
|
||||||
|
' GvContratos.DataSource = ObjContratos.DtResultados
|
||||||
|
' GvContratos.DataBind()
|
||||||
|
'End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -86,7 +96,6 @@ Partial Class ListadoViajes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
IsMasivo.Visible = True
|
IsMasivo.Visible = True
|
||||||
DdlRutas.Text = ""
|
|
||||||
TxtFechaViaje.Text = ""
|
TxtFechaViaje.Text = ""
|
||||||
DdlPartida.Text = ""
|
DdlPartida.Text = ""
|
||||||
DdlDestino.SelectedValue = ""
|
DdlDestino.SelectedValue = ""
|
||||||
@@ -141,13 +150,11 @@ Partial Class ListadoViajes
|
|||||||
ObjContratos.RollBack()
|
ObjContratos.RollBack()
|
||||||
Alert("Ocurrió un error al generar viajes masivo", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al generar viajes masivo", TipoMensaje.MsgError)
|
||||||
Finally
|
Finally
|
||||||
DdlRutas.Text = ""
|
|
||||||
TxtFechaViaje.Text = ""
|
TxtFechaViaje.Text = ""
|
||||||
DdlPartida.Text = ""
|
DdlPartida.Text = ""
|
||||||
DdlDestino.SelectedValue = ""
|
DdlDestino.SelectedValue = ""
|
||||||
|
|
||||||
Dim ObjContratos As New ClsContratos
|
|
||||||
ObjContratos.Dispose()
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End Try
|
End Try
|
||||||
Else
|
Else
|
||||||
@@ -157,13 +164,13 @@ Partial Class ListadoViajes
|
|||||||
Try
|
Try
|
||||||
'Agregamos Viaje
|
'Agregamos Viaje
|
||||||
If BtnGuardar.Text = "Agregar" Then
|
If BtnGuardar.Text = "Agregar" Then
|
||||||
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaViaje.Text.ToDate, TxtFechaViaje.Text.ToDate, "", "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CveRuta:=DdlRutas.Text.ToEntero, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) > 0 Then
|
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaViaje.Text.ToDate, TxtFechaViaje.Text.ToDate, "", "", -1, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, 0, 0, 0, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) > 0 Then
|
||||||
ObjContratos.Commit()
|
ObjContratos.Commit()
|
||||||
Alert("Viaje agregado correctamente.")
|
Alert("Viaje agregado correctamente.")
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
'Actualizamos Viaje
|
'Actualizamos Viaje
|
||||||
If ObjContratos.UpdateContratos(CveContrato.ToEntero, LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaInicial.Text.ToDate, TxtFechaInicial.Text.ToDate, "", "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CveRuta:=DdlRutas.Text.ToEntero, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) = True Then
|
If ObjContratos.UpdateContratos(CveContrato.ToEntero, LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaInicial.Text.ToDate, TxtFechaInicial.Text.ToDate, "", "", DdlRutas.SelectedValue.ToEntero, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, 2, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) = True Then
|
||||||
ObjContratos.Commit()
|
ObjContratos.Commit()
|
||||||
Alert("El viaje se actualizó correctamente.")
|
Alert("El viaje se actualizó correctamente.")
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user