--merge boletos
This commit is contained in:
@@ -661,6 +661,7 @@ Partial Class AF_AF
|
||||
|
||||
End Sub
|
||||
Private Sub CargaTipoActivoFijo()
|
||||
DdlTipoActivoFijo.Items.Clear()
|
||||
DdlTipoActivoFijo.DataSource = GlobalDTTipoActivoFijo(CveEmpresaActual).FiltraParametros("", "TipoActivoFijo")
|
||||
DdlTipoActivoFijo.DataBind()
|
||||
CargaSubTipoActivoFijo()
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatosCL" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatosCL" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaClasificacion" EmptyDataText="No se encontraron Clasificaciones" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvDatosCL" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaClasificacion" EmptyDataText="No se encontraron Clasificaciones" CssClass="table table-striped table-advance table-hover mysmallbtn" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<%--<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlTiposActivosFijosCL" runat="server" Text='<%# Eval("TipoActivoFijo", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
@@ -300,7 +300,7 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatosCA" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatosCA" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristica" EmptyDataText="No se encontraron Características" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvDatosCA" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristica" EmptyDataText="No se encontraron Características" CssClass="table table-striped table-advance table-hover mysmallbtn" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlTiposActivosFijosCA" runat="server" Text='<%# Eval("TipoActivoFijo", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
@@ -537,7 +537,7 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatosOpciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatosOpciones" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaOpcion" EmptyDataText="No se encontraron Opciones" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvDatosOpciones" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCaracteristicaOpcion" EmptyDataText="No se encontraron Opciones" CssClass="table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate> <asp:Literal ID="LtlTiposActivosFijosOpciones" runat="server" Text='<%# Eval("TipoActivoFijo", "{0}")%>'></asp:Literal></ItemTemplate>
|
||||
|
||||
@@ -52,7 +52,6 @@ Partial Class AF_CatClasificacionesCaracteristicas
|
||||
|
||||
'Carga Globals para DT
|
||||
CargaTiposActivosFijos()
|
||||
CargaSubTiposActivosFijos()
|
||||
''CargaCaracteristicasClasificaciones()
|
||||
'CargaCaracteristicas()
|
||||
End If
|
||||
@@ -66,17 +65,7 @@ Partial Class AF_CatClasificacionesCaracteristicas
|
||||
DdlTiposActivosFijosOpciones.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTiposActivosFijosOpciones.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaSubTiposActivosFijos()
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetSubTiposActivosFijos(UsuarioActual.CveEmpresa) Then
|
||||
GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa) = ObjAF.DtResultados
|
||||
Else
|
||||
Alert("Ocurrio un error al obtener los SubTipos de Activos Fijos", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
End Sub
|
||||
#Region "CLASIFICACIONES"
|
||||
Protected Sub LbAgregarCL_Click(sender As Object, e As System.EventArgs) Handles LbAgregarCL.Click
|
||||
Dim ObjCaracteristicaClasificacion As New ClsAF
|
||||
@@ -85,8 +74,7 @@ Partial Class AF_CatClasificacionesCaracteristicas
|
||||
TxtCaracteristicaClasificacionCL.Text = ""
|
||||
Alert("La Nueva Clasificación de Activo Fijo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulosCL.Update()
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
GlobalDTAFCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
If ViewState("OrdenCL").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCL").ToString(), 0)
|
||||
@@ -147,10 +135,7 @@ Partial Class AF_CatClasificacionesCaracteristicas
|
||||
Dim ObjCaracteristicaClasificacion As New ClsAF
|
||||
If ObjCaracteristicaClasificacion.RemoveClasificacionesCaracteristicas(GvDatosCL.DataKeys(e.RowIndex).Value.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvDatosCL.EditIndex = -1
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
'CargaCaracteristicasClasificaciones()
|
||||
|
||||
GlobalDTAFCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
@@ -183,9 +168,7 @@ Partial Class AF_CatClasificacionesCaracteristicas
|
||||
If ObjCaracteristicaClasificacion.UpdateClasificacionesCaracteristicas(CaracteristicaClasificacion, Estatus, CveCaracteristicaClasificacion, UsuarioActual.CveEmpresa) Then
|
||||
GvDatosCL.EditIndex = -1
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
'CargaCaracteristicasClasificaciones()
|
||||
|
||||
GlobalDTAFCaracteristicasClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
@@ -228,12 +211,10 @@ Partial Class AF_CatClasificacionesCaracteristicas
|
||||
TxtLongitudCA.Text = ""
|
||||
Alert("La Nueva Característica de Activo Fijo se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpTitulosCA.Update()
|
||||
ViewState("DTCatacteristica") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
''CargaCaracteristicasClasificaciones()
|
||||
'CargaCaracteristicas()
|
||||
GlobalDTAFCaracteristicas(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
|
||||
If ViewState("OrdenCA").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("OrdenCA").ToString(), 1)
|
||||
@@ -262,7 +243,7 @@ Partial Class AF_CatClasificacionesCaracteristicas
|
||||
End Sub
|
||||
Protected Sub DdlTiposActivosFijosCA_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTiposActivosFijosCA.SelectedIndexChanged
|
||||
DdlSubTiposActivosFijosCA.Items.Clear()
|
||||
DdlSubTiposActivosFijosCA.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveTipoActivoFijo = {0} AND CveEmpresa = {1}", DdlTiposActivosFijosCA.SelectedValue.ToEntero, UsuarioActual.CveEmpresa))
|
||||
DdlSubTiposActivosFijosCA.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa, DdlTiposActivosFijosCA.SelectedValue.ToEntero)
|
||||
DdlSubTiposActivosFijosCA.DataBind()
|
||||
DdlSubTiposActivosFijosCA.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
@@ -368,8 +349,6 @@ Partial Class AF_CatClasificacionesCaracteristicas
|
||||
GvDatosCA.EditIndex = -1
|
||||
GlobalDTAFCaracteristicas(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
@@ -596,8 +575,6 @@ Partial Class AF_CatClasificacionesCaracteristicas
|
||||
GvDatosOpciones.EditIndex = -1
|
||||
ViewState("DTCatacteristicaOpciones") = ObjCaracteristicas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
CargaSubTiposActivosFijos()
|
||||
|
||||
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<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>
|
||||
<asp:TemplateField>
|
||||
<ItemStyle Width="206px" />
|
||||
|
||||
@@ -72,7 +72,7 @@ public partial class AF_CatTiposServicios : ClsPaginas
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveTipoServicio = GvRow.DataKey("CveTipoServicio").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteTiposServicios(CveTipoServicio))
|
||||
if (ObjAF.DeleteTiposServicios(CveTipoServicio, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
@@ -87,7 +87,7 @@ public partial class AF_CatTiposServicios : ClsPaginas
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (BtnAgregarTipoServicio.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddTiposServicios(TxtNombre.Text,DdlTipoMantenimiento.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
if (ObjAF.AddTiposServicios(TxtNombre.Text,DdlTipoMantenimiento.SelectedValue.ToEntero(), 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
@@ -97,7 +97,7 @@ public partial class AF_CatTiposServicios : ClsPaginas
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateTiposServicios(CveTipoServicio, TxtNombre.Text, DdlTipoMantenimiento.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
if (ObjAF.UpdateTiposServicios(CveTipoServicio, TxtNombre.Text, DdlTipoMantenimiento.SelectedValue.ToEntero(), 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
|
||||
@@ -603,7 +603,7 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
If CveTipoServicio = -1 Then
|
||||
|
||||
If ObjAF.AddTiposServicios(TxtTipoServicio.Text.Trim, DdlTipoMantenimiento.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjAF.AddTiposServicios(TxtTipoServicio.Text.Trim, DdlTipoMantenimiento.SelectedValue.ToEntero, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
|
||||
CveTipoServicio = ObjAF.CveTipoServicio
|
||||
@@ -651,7 +651,7 @@ Partial Class AF_TipoOrdenTrabajo
|
||||
|
||||
Else
|
||||
|
||||
If Not ObjAF.UpdateTiposServicios(CveTipoServicio, TxtTipoServicio.Text.Trim, DdlTipoMantenimiento.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If Not ObjAF.UpdateTiposServicios(CveTipoServicio, TxtTipoServicio.Text.Trim, DdlTipoMantenimiento.SelectedValue.ToEntero, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -190,7 +190,6 @@ Public Class ClsContratos
|
||||
Public Property CveChofer2 As Integer
|
||||
Public Property CveAF As Integer
|
||||
Public Property CantidadPasajeros As Integer
|
||||
Public Property CveRuta As Integer
|
||||
Public Property CvePartida As Integer
|
||||
Public Property CveDestino As Integer
|
||||
Public Property CveMasivo As Integer
|
||||
@@ -316,8 +315,7 @@ Public Class ClsContratos
|
||||
Me.CveChofer = Data.Rows(0)("CveChofer").ToString.ToEntero
|
||||
Me.CveChofer2 = Data.Rows(0)("CveChofer2").ToString.ToEntero
|
||||
Me.CveAF = Data.Rows(0)("CveAF").ToString.ToEntero
|
||||
Me.CantidadPasajeros = Data.Rows(0)("CantidadPasajeros").ToString.ToEntero
|
||||
Me.CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero
|
||||
Me.CantidadPasajeros = Data.Rows(0)("CantidadPasajeros").ToString.ToEntero
|
||||
Me.CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero
|
||||
Me.CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero
|
||||
Me.CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
||||
|
||||
@@ -10836,6 +10836,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 601)
|
||||
PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603)
|
||||
PaginaDict.Add("/Transportes/CatRutas.aspx".ToUpper(), 604)
|
||||
PaginaDict.Add("/Transportes/RepViajesCalendario.aspx".ToUpper(), 605)
|
||||
#End Region
|
||||
'Antes de aquí.
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@ Public Class ClsTransportes
|
||||
#End Region
|
||||
|
||||
#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
|
||||
DataAdapter("PA_Trans_DestinosGet")
|
||||
If CveRuta <> 0 Then
|
||||
@@ -309,93 +309,95 @@ Public Class ClsTransportes
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#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
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Trans_RutasGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||
'#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
|
||||
' Dim Retorno As Boolean = False
|
||||
' DataAdapter("PA_Trans_RutasGet")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||
' .Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
' .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
' End With
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddRuta(Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
' Return Retorno
|
||||
' End Function
|
||||
' Public Function AddRuta(Ruta As String, Estatus As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
||||
' Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Trans_RutasAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveRuta", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveRuta").Value.ToString)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al agregar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
' DataAdapter("PA_Trans_RutasAdd")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveRuta", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||
' .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' End With
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveRuta").Value.ToString)
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al agregar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
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
|
||||
DataAdapter("PA_Trans_RutasUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
' Return Retorno
|
||||
' End Function
|
||||
' 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
|
||||
' DataAdapter("PA_Trans_RutasUpdate")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
' .Add("@Ruta", SqlDbType.VarChar).Value = Ruta
|
||||
' .Add("@Estatus", SqlDbType.Bit).Value = Convert.ToBoolean(Estatus)
|
||||
' .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' End With
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al actualizar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RemoveRuta(CveRuta As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
' Return Retorno
|
||||
' End Function
|
||||
' Public Function RemoveRuta(CveRuta As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
DataAdapter("PA_Trans_RutasRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
End With
|
||||
' DataAdapter("PA_Trans_RutasRemove")
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
' End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch ex As Exception
|
||||
' OnError("Ocurrió un error al eliminar la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
' Return Retorno
|
||||
' End Function
|
||||
|
||||
'#End Region
|
||||
|
||||
#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
|
||||
DataAdapter("PA_Trans_DestinosTarifasGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
|
||||
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
|
||||
End With
|
||||
@@ -409,16 +411,16 @@ Public Class ClsTransportes
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
DataAdapter("PA_Trans_DestinosTarifasAdd")
|
||||
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("@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
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -429,15 +431,15 @@ Public Class ClsTransportes
|
||||
|
||||
Return Retorno
|
||||
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
|
||||
DataAdapter("PA_Trans_DestinosTarifasUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa
|
||||
.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
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveDestinoOrigen", SqlDbType.Int).Value = CveDestinoOrigen
|
||||
.Add("@CveDestinoFinal", SqlDbType.Int).Value = CveDestinoFinal
|
||||
.Add("@Importe", SqlDbType.SmallMoney).Value = Importe
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
124
Contratos/RepContratosAvances.aspx
Normal file
124
Contratos/RepContratosAvances.aspx
Normal file
@@ -0,0 +1,124 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepContratosAvances.aspx.vb" Inherits="RepContratosAvances" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Contratos
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Panel ID="PnlFiltros" runat="server" DefaultButton="CmdConsultar">
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" id="TrProgramar" runat="server">
|
||||
<li>Cliente:
|
||||
<asp:DropDownList ID="DdlCliente" runat="server" AutoPostBack="true" DataTextField="NombreComercial" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Contratos:
|
||||
<asp:DropDownList ID="DdlContrato" runat="server" AutoPostBack="true" DataTextField="NumeroContrato" DataValueField="CveContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li style="display: none;">Sección:
|
||||
<asp:DropDownList ID="DdlSeccion" runat="server" AutoPostBack="false" DataTextField="Seccion" DataValueField="CveSeccion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Partida:
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
<li>Productos y Servicios:
|
||||
<asp:DropDownList ID="DdlPS" runat="server" AutoPostBack="true" DataTextField="PS" DataValueField="CvePS" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;"></asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="CmdConsultar" runat="server" Text="Consultar" class="btn btn-primary" CausesValidation="true" ValidationGroup="GrConsulta" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-advance table-hover">
|
||||
<thead>
|
||||
<tr class="Titulos">
|
||||
<th width="60px">#</th>
|
||||
<th width="300px">
|
||||
<asp:LinkButton ID="LbSubSeccion" runat="server" CausesValidation="false" Text="Cliente/ Contrato / Partida" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" Text="Contratado" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="false" Text="Actual" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton5" runat="server" CausesValidation="false" Text="Por Estimar" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" Text="Ejecutado" /></th>
|
||||
<th width="120px">
|
||||
<asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="false" Text="Obra Faltante" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Estimaciones con los Filtros seleccionados" DataKeyNames="CveContrato" ShowHeader="false" SelectedRowStyle-BackColor="#CCFF66" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitEst" runat="server" Text='<%# Eval("CveContrato")%>' />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplAgrupador" CssClass="Texto" runat="server" Text='<%# Eval("Agrupador") %>' NavigateUrl='<%# Eval("CveContrato", "ContratosDetalle.aspx?CveContrato={0}&Op=2")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplContratado" CssClass="Texto" runat="server" Text='<%# Eval("Contratado", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplActual" CssClass="Texto" runat="server" Text='<%# Eval("LoQueEstoyHaciendo", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HPlPorEstimar" CssClass="Texto" runat="server" Text='<%# Eval("PorEstimar", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplEjecutado" CssClass="Texto" runat="server" Text='<%# Eval("Ejecutado", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplOFA" CssClass="Texto" runat="server" Text='<%# Eval("OFA", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
<br />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
<tr>
|
||||
<td>Observaciones:</td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="1" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="DivTransitorio1" runat="server" visible="false">
|
||||
|
||||
@@ -672,6 +672,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso TipoDocto.Contiene("Ped", "Ing") Then
|
||||
TxtObservaciones.Text = $"Dr. {drE("Medico").ToString}{vbCrLf}Cx. {drE("Procedimiento").ToString}{vbCrLf}F. Cirugía {drE("FechaEjecucion").ToString.ToDateTime.ToString("dd/MM/yyyy HH:mm")}{vbCrLf}H. {drE("Sucursal").ToString}{vbCrLf}"
|
||||
TxtObservaciones.Rows = 4
|
||||
End If
|
||||
|
||||
LbCliente.Text = DtDatos.Rows(0)("Nombre").ToString()
|
||||
|
||||
@@ -7,84 +7,167 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.my-1 {
|
||||
margin-block: 1rem;
|
||||
}
|
||||
|
||||
.mx-1 {
|
||||
margin: 0 2rem;
|
||||
}
|
||||
|
||||
.disponible {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
border: 2px solid #45b6af;
|
||||
border-radius: 10px !important;
|
||||
margin: .1px;
|
||||
cursor: pointer;
|
||||
color: #45b6af;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.disponible:hover, .disponible.activo {
|
||||
background-color: #45b6af;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.nodisponible {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
background-color: #F3565D;
|
||||
border-radius: 10px !important;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nodisponible:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.seleccionado {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
background-color: #ff6a00;
|
||||
border-radius: 10px !important;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btnChofer {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
color: black
|
||||
}
|
||||
|
||||
.btnChofer a {
|
||||
color: #2C3E50;
|
||||
}
|
||||
|
||||
|
||||
.btnChofer:hover {
|
||||
background-color: #E1E5EC;
|
||||
}
|
||||
<style>
|
||||
.my-1 {
|
||||
margin-block: 1rem;
|
||||
}
|
||||
|
||||
.mx-1 {
|
||||
margin: 0 2rem;
|
||||
}
|
||||
|
||||
.disponible {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
border: 2px solid #45b6af;
|
||||
border-radius: 10px !important;
|
||||
margin: .1px;
|
||||
cursor: pointer;
|
||||
color: #45b6af;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.disponible:hover, .disponible.activo {
|
||||
background-color: #45b6af;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.nodisponible {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
background-color: #F3565D;
|
||||
border-radius: 10px !important;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nodisponible:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.seleccionado {
|
||||
display: inline-block;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
background-color: #C49F47;
|
||||
border-radius: 10px !important;
|
||||
margin: 5px;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.seleccionado:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btnChofer {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
color: black
|
||||
}
|
||||
|
||||
.btnChofer a {
|
||||
color: #2C3E50;
|
||||
}
|
||||
|
||||
|
||||
.btnChofer:hover {
|
||||
background-color: #E1E5EC;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel">
|
||||
<ContentTemplate>
|
||||
<%-- Datos de cliente y su viaje --%>
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<%-- Boleto --%>
|
||||
<div class="col-md-9">
|
||||
<%-- Datos del Cliente --%>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="row">
|
||||
<div class="caption font-green col-md-8">
|
||||
<i class="fa fa-users font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Pasajero
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<asp:UpdatePanel runat="server" ID="UpTimer" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label ID="lblTiempo" runat="server" Text=""></asp:Label>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconrigh">
|
||||
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
|
||||
ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
|
||||
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label>Nombre:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<label>Visa:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="Femenino" Value="0" />
|
||||
</asp:DropDownList>
|
||||
<label>Sexo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput"
|
||||
ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label>Celular:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200"
|
||||
ClientIDMode="Static"></asp:TextBox>
|
||||
<label>Observaciones:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- Datos del Viaje y Destinos --%>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered ">
|
||||
@@ -107,9 +190,10 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList ID="DdlPartida" DataTextField="Destino"
|
||||
<asp:DropDownList ID="DdlPartida" DataTextField="Partida"
|
||||
AutoPostBack="true"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me" Width="200px" runat="server">
|
||||
DataValueField="CveDestinoOrigen" Class="form-control input-sm select2me" Width="200px"
|
||||
runat="server" OnSelectedIndexChanged="DdlPartida_SelectedIndexChanged" >
|
||||
</asp:DropDownList>
|
||||
<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."
|
||||
@@ -131,7 +215,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlDestino" DataTextField="Destino"
|
||||
AutoPostBack="true"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me"
|
||||
DataValueField="CveDestinoFinal" Class="form-control input-sm select2me"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="DdlDestino"
|
||||
@@ -143,111 +227,46 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold mx-1"></asp:Label>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LbCostos" CssClass="text-success bold mx-1" Visible="False"></asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-users font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Datos del Pasajero
|
||||
<asp:Label ID="LblNum" runat="server" Text='<%# Eval("Numero") %>'></asp:Label>
|
||||
</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtNombre" CssClass="form-control" runat="server" MaxLength="200"
|
||||
ClientIDMode="Static"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtNombre" runat="server" ControlToValidate="TxtNombre"
|
||||
CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label>Nombre:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtVisa" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<label>Visa:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="RblSexo" CssClass="form-control input-sm select2me" runat="server">
|
||||
<asp:ListItem Text="Masculino" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="Femenino" Value="0" />
|
||||
</asp:DropDownList>
|
||||
<label>Sexo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" runat="server" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" CssClass="help-block errorimput"
|
||||
ControlToValidate="TxtCelular" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label>Celular:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:TextBox ID="TxtObservaciones" CssClass="form-control" runat="server" MaxLength="200"
|
||||
ClientIDMode="Static"></asp:TextBox>
|
||||
<label>Observaciones:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright ">
|
||||
<asp:Button ID="BtnAgregar" runat="server" Text="Agregar Pasajero" CssClass="btn btn-success " OnClick="BtnAgregar_Click" />
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- Botón para Agregar Pasajero(Oculto) --%>
|
||||
<div class="form-group form-md-line-input input-iconright text-right">
|
||||
<asp:Button ID="BtnAgregarPasajero" runat="server" CssClass="btn btn-success" Visible="false"
|
||||
Text="Agregar Pasajeros" OnClick="AgregarPasajero" />
|
||||
</div>
|
||||
<%-- Listado de Boletos --%>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvB" runat="server" Width="100%" AutoGenerateColumns="false" CssClass="table table-advance table-hover" GridLines="None" DataKeyNames="Nombre,Visa,Asiento">
|
||||
<asp:GridView ID="GvB" runat="server" Width="100%" AutoGenerateColumns="false" CssClass="table table-advance table-hover"
|
||||
GridLines="None" DataKeyNames="Nombre,Visa,Asiento">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Nombre" HeaderText="Nombre" />
|
||||
<asp:BoundField DataField="Visa" HeaderText="Visa" />
|
||||
<asp:BoundField DataField="Sexo" HeaderText="Sexo" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Celular" HeaderText="Celular" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Observaciones" HeaderText="Observaciones" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Asiento" HeaderText="Asiento" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="${0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Partida" HeaderText="Partida" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Destino" HeaderText="Destino" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="${0:N2}"
|
||||
ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5"></div>
|
||||
<div class="col-md-2">
|
||||
<asp:Button ID="BtnGuardar" Visible="False" OnClick="FinalizarVenta" runat="server" CssClass="btn btn-success "
|
||||
Text="Finalizar Compra"
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
</div>
|
||||
<div class="col-md-5"></div>
|
||||
<%--OnClick="FinalizarVenta"--%>
|
||||
<div class="form-group form-md-line-input input-iconright text-right">
|
||||
<asp:Button ID="BtnGuardar" runat="server" CssClass="btn btn-primary" Visible="false"
|
||||
Text="Finalizar Compra" OnClick="FinalizarVenta" />
|
||||
</div>
|
||||
</div>
|
||||
<%-- Asientos --%>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||
<table>
|
||||
<tbody>
|
||||
@@ -500,11 +519,26 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
var tiempoTranscurrido = 0;
|
||||
setInterval(actualizarTiempo, 1000);
|
||||
function actualizarTiempo() {
|
||||
tiempoTranscurrido++;
|
||||
var horas = Math.floor(tiempoTranscurrido / 3600);
|
||||
var minutos = Math.floor((tiempoTranscurrido % 3600) / 60);
|
||||
var segundos = tiempoTranscurrido % 60;
|
||||
//(horas < 10 ? "0" : "") + horas + " : " +
|
||||
var tiempoFormateado = (minutos < 10 ? "0" : "") + minutos + " : " + (segundos < 10 ? "0" : "") + segundos + " s";
|
||||
document.getElementById('<%= lblTiempo.ClientID %>').innerText = tiempoFormateado;
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,221 +1,242 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports Microsoft.Ajax.Utilities
|
||||
|
||||
Partial Class Boletos
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports ADSNetLibrary.Helpers
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
Partial Class Boletos
|
||||
Inherits ClsPaginas
|
||||
#Region "Propiedades"
|
||||
Private Property AsientoSeleccionado As String
|
||||
Get
|
||||
Return ViewState("AsientoSeleccionado").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("AsientoSeleccionado") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Importe As Decimal
|
||||
Get
|
||||
Return If(IsNothing(ViewState("Importe")), 0, ViewState("Importe")).ToString().ToDecimal()
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("Importe") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveViaje As Integer
|
||||
Get
|
||||
Return ViewState("CveViaje").ToString().ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveViaje") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Contrato As DataTable
|
||||
Get
|
||||
Return CType(ViewState("Contrato"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("Contrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtPasajeros As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtPasajeros"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPasajeros") = value
|
||||
End Set
|
||||
#Region "Propiedades"
|
||||
Private Property AsientoSeleccionado As String
|
||||
Get
|
||||
Return ViewState("AsientoSeleccionado").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("AsientoSeleccionado") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Importe As Decimal
|
||||
Get
|
||||
Return If(IsNothing(ViewState("Importe")), 0, ViewState("Importe")).ToString().ToDecimal()
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("Importe") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveViaje As Integer
|
||||
Get
|
||||
Return ViewState("CveViaje").ToString().ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveViaje") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Contrato As DataTable
|
||||
Get
|
||||
Return CType(ViewState("Contrato"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("Contrato") = value
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
Return CType(ViewState("DtPasajeros"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtPasajeros") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If Request.QueryString("CveViaje") Is Nothing Then
|
||||
Response.Redirect("/Transportes/RepViajes.aspx")
|
||||
End If
|
||||
AsientoSeleccionado = ""
|
||||
CveViaje = Request.QueryString("CveViaje").ToEntero
|
||||
If CveViaje > 0 Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CreaDTPasajeros()
|
||||
DtPasajeros = New DataTable
|
||||
DtPasajeros.Columns.Add("CveViajePasajero", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Numero", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Nombre", GetType(String))
|
||||
DtPasajeros.Columns.Add("Visa", GetType(String))
|
||||
DtPasajeros.Columns.Add("Asiento", GetType(String))
|
||||
DtPasajeros.Columns.Add("Celular", GetType(String))
|
||||
DtPasajeros.Columns.Add("Importe", GetType(Decimal))
|
||||
DtPasajeros.Columns.Add("Observaciones", GetType(String))
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If Request.QueryString("CveViaje") Is Nothing And UsuarioActual.CveVendedor <> Nothing And UsuarioActual.CveVendedor <> -1 Then
|
||||
Response.Redirect("/Transportes/RepViajes.aspx")
|
||||
End If
|
||||
AsientoSeleccionado = ""
|
||||
CveViaje = Request.QueryString("CveViaje").ToEntero
|
||||
If CveViaje > 0 Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
Dim ObjViaje As New ClsTransportes
|
||||
|
||||
If ObjContratos.GetContratos(CveViaje, UsuarioActual.CveEmpresa) Then
|
||||
Contrato = ObjContratos.DtResultados
|
||||
If ObjContratos.DtResultados IsNot Nothing AndAlso ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
TxtRuta.Text = Contrato.Rows(0)("Ruta").ToString
|
||||
TxtFecha.Text = Contrato.Rows(0)("FechaInicial").ToString.ToDate.ToShortDateString
|
||||
|
||||
CreaDTPasajeros()
|
||||
InicializaCombos()
|
||||
|
||||
'Boletos Vendidos
|
||||
Dim dt As DataTable
|
||||
If ObjViaje.GetViajesPasajeros(CveViaje, Estatus:=1) Then 'Poner párametro para estatus y cancelado de viajes
|
||||
dt = ObjViaje.DtResultados
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
For Each dr As DataRow In dt.Rows
|
||||
Dim lnk As LinkButton = CType(cph.FindControl($"A{dr("Asiento")}"), LinkButton)
|
||||
If lnk IsNot Nothing Then
|
||||
lnk.Enabled = False
|
||||
lnk.CssClass = "nodisponible"
|
||||
lnk.ToolTip = dr("Nombre").ToString
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
ObjContratos.Dispose()
|
||||
ObjViaje.Dispose()
|
||||
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
ObjViaje.Dispose()
|
||||
|
||||
'Boletos Vendidos
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub InicializaCombos()
|
||||
Dim CveRuta As Integer = Contrato.Rows(0)("CveRuta").ToString.ToEntero
|
||||
|
||||
'Lista Destinos''carga específicos
|
||||
Dim ObjDestinos As New ClsTransportes()
|
||||
If ObjDestinos.GetDestinos(CveRuta:=CveRuta) 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()
|
||||
End Sub
|
||||
|
||||
Protected Sub CotizarTarifa()
|
||||
If DdlDestino.SelectedValue <> "" And DdlPartida.SelectedValue <> "" Then
|
||||
Dim ImporteR As Decimal = 0
|
||||
Dim ObjDestinos As New ClsTransportes()
|
||||
If ObjDestinos.GetDestinosTarifas(DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
Dim ObjViaje As New ClsTransportes
|
||||
|
||||
If ObjContratos.GetContratos(CveViaje, UsuarioActual.CveEmpresa) Then
|
||||
Contrato = ObjContratos.DtResultados
|
||||
If ObjContratos.DtResultados IsNot Nothing AndAlso ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
TxtRuta.Text = Contrato.Rows(0)("SubProyecto").ToString
|
||||
TxtFecha.Text = Contrato.Rows(0)("FechaInicial").ToString.ToDate.ToShortDateString
|
||||
DtPasajeros = New DataTable
|
||||
DtPasajeros.Columns.Add("Numero", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Nombre", GetType(String))
|
||||
DtPasajeros.Columns.Add("Visa", GetType(String))
|
||||
DtPasajeros.Columns.Add("Sexo", GetType(String))
|
||||
DtPasajeros.Columns.Add("CveSexo", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Celular", GetType(String))
|
||||
DtPasajeros.Columns.Add("Observaciones", GetType(String))
|
||||
DtPasajeros.Columns.Add("Partida", GetType(String))
|
||||
DtPasajeros.Columns.Add("Destino", GetType(String))
|
||||
DtPasajeros.Columns.Add("CveDestinoOrigen", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("CveDestinoFinal", GetType(Integer))
|
||||
DtPasajeros.Columns.Add("Asiento", GetType(String))
|
||||
DtPasajeros.Columns.Add("Importe", GetType(Decimal))
|
||||
InicializaCombos()
|
||||
|
||||
'Boletos Vendidos
|
||||
Dim dt As DataTable
|
||||
If ObjViaje.GetViajesPasajeros(CveViaje, Estatus:=1) Then 'Poner párametro para estatus y cancelado de viajes
|
||||
dt = ObjViaje.DtResultados
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
For Each dr As DataRow In dt.Rows
|
||||
Dim lnk As LinkButton = CType(cph.FindControl($"A{dr("Asiento")}"), LinkButton)
|
||||
If lnk IsNot Nothing Then
|
||||
lnk.Enabled = False
|
||||
lnk.CssClass = "nodisponible"
|
||||
lnk.ToolTip = dr("Nombre").ToString
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
ObjContratos.Dispose()
|
||||
ObjViaje.Dispose()
|
||||
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
ObjViaje.Dispose()
|
||||
|
||||
'Boletos Vendidos
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub InicializaCombos()
|
||||
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
'Lista Destinos''carga específicos
|
||||
Dim ObjDestinos As New ClsTransportes()
|
||||
|
||||
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.Items.Insert(0, New ListItem("Seleccione Partida", "-1"))
|
||||
|
||||
'DdlDestino.DataSource = DtDestinos
|
||||
'DdlDestino.DataBind()
|
||||
'DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
||||
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()
|
||||
End Sub
|
||||
|
||||
Protected Sub CotizarTarifa()
|
||||
If DdlDestino.SelectedValue <> "-1" And DdlPartida.SelectedValue <> "-1" Then
|
||||
Dim ImporteR As Decimal = 0
|
||||
Dim ObjDestinos As New ClsTransportes()
|
||||
Dim CveSubProyecto As Integer = Contrato.Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
If ObjDestinos.GetDestinosTarifas(CveSubProyecto, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero) Then
|
||||
ImporteR = ObjDestinos.DtResultados.FiltroPrimeroValor("Importe").ToDecimal.RoundSQL
|
||||
End If
|
||||
ObjDestinos.Dispose()
|
||||
|
||||
If ImporteR > 0 Then
|
||||
ViewState("Importe") = ImporteR
|
||||
TxtCosto.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
||||
BtnGuardar.Visible = True
|
||||
Else
|
||||
Alert("No se encontro una tarifa para esta ruta", TipoMensaje.MsgAdvertencia)
|
||||
ViewState("Importe") = ImporteR
|
||||
LbCostos.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
||||
LbCostos.Visible = True
|
||||
BtnAgregarPasajero.Visible = True
|
||||
Else
|
||||
ViewState("Importe") = 0
|
||||
BtnAgregarPasajero.Visible = False
|
||||
LbCostos.Visible = False
|
||||
Alert("No se encontro una tarifa para estos destinos", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
TxtCosto.Text = ""
|
||||
BtnGuardar.Visible = False
|
||||
ViewState("Importe") = 0
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
|
||||
'quitamos la selección anterior, en caso de existir.
|
||||
If AsientoSeleccionado <> "" Then
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
Dim lnk As LinkButton = CType(cph.FindControl(AsientoSeleccionado), LinkButton)
|
||||
lnk.CssClass = "disponible"
|
||||
End If
|
||||
|
||||
Dim linkButton As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim buttonID As String = linkButton.ID
|
||||
linkButton.CssClass += " activo"
|
||||
AsientoSeleccionado = buttonID
|
||||
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
Protected Sub FinalizarVenta(sender As Object, e As EventArgs)
|
||||
ObjDestinos.Dispose()
|
||||
|
||||
Dim SbAlert As New StringBuilder()
|
||||
Dim Retorno As New Modelos.Factura.MMensajeFactura()
|
||||
|
||||
Dim ObjTransporte As New ClsTransportes()
|
||||
ObjTransporte.IniciaTransacSQL()
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Try
|
||||
For Each dr As DataRow In DtPasajeros.Rows 'gvr As GridViewRow In GvB.Rows
|
||||
Dim Nombre, Visa, Celular, Obs, Asiento As String
|
||||
Dim Sexo As Boolean = False
|
||||
Dim Importe As Decimal = 0
|
||||
|
||||
Nombre = dr("Nombre").ToString
|
||||
Visa = dr("Visa").ToString
|
||||
Celular = dr("Celular").ToString
|
||||
Obs = dr("Observaciones").ToString
|
||||
Asiento = dr("Asiento").ToString
|
||||
Importe = dr("Importe").ToString.ToDecimal
|
||||
|
||||
'.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text
|
||||
Dim CveViajePasajero = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, Asiento.ToEntero, Nombre, Visa, Celular, Sexo, Obs, UsuarioActual.CveUsuario, UsuarioActual.CveVendedor)
|
||||
If CveViajePasajero < 1 Then
|
||||
TieneError = True
|
||||
SbAlert.Append("Ocurrió un error al generar el viaje")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
dr("CveViajePasajero") = CveViajePasajero
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub OnLinkButtonClick(sender As Object, e As EventArgs)
|
||||
'quitamos la selección anterior, en caso de existir.
|
||||
If AsientoSeleccionado <> "" Then
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
Dim lnk As LinkButton = CType(cph.FindControl(AsientoSeleccionado), LinkButton)
|
||||
lnk.CssClass = "disponible"
|
||||
End If
|
||||
|
||||
Dim linkButton As LinkButton = DirectCast(sender, LinkButton)
|
||||
Dim buttonID As String = linkButton.ID
|
||||
linkButton.CssClass += " activo"
|
||||
AsientoSeleccionado = buttonID
|
||||
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub FinalizarVenta(sender As Object, e As EventArgs)
|
||||
|
||||
Dim SbAlert As New StringBuilder()
|
||||
Dim Retorno As New Modelos.Factura.MMensajeFactura()
|
||||
|
||||
Dim ObjTransporte As New ClsTransportes()
|
||||
ObjTransporte.IniciaTransacSQL()
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Try
|
||||
For Each dr As DataRow In DtPasajeros.Rows
|
||||
Dim Nombre, Visa, Celular, Obs, Asiento As String
|
||||
Dim Sexo As Boolean
|
||||
Dim Importe As Decimal = 0
|
||||
Dim CveDestinoOrigen, CveDestinoFinal As Integer
|
||||
|
||||
CveDestinoOrigen = dr("CveDestinoOrigen").ToString.ToEntero
|
||||
CveDestinoFinal = dr("CveDestinoFinal").ToString.ToEntero
|
||||
Importe = dr("Importe").ToString.ToDecimal
|
||||
Asiento = dr("Asiento").ToString
|
||||
Nombre = dr("Nombre").ToString
|
||||
Visa = dr("Visa").ToString
|
||||
Celular = dr("Celular").ToString
|
||||
Sexo = dr("CveSexo").ToString.ToBool
|
||||
Obs = dr("Observaciones").ToString
|
||||
|
||||
If ObjTransporte.AddViajesPasajeros(CveViaje, CveDestinoOrigen, CveDestinoFinal, Importe, Asiento.ToEntero, Nombre, Visa, Celular, Sexo, Obs, UsuarioActual.CveUsuario, UsuarioActual.CveVendedor) > 1 Then
|
||||
ObjTransporte.Commit()
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If Not TieneError Then
|
||||
Retorno = CrearRemision(ObjTransporte)
|
||||
End If
|
||||
@@ -246,19 +267,20 @@ Partial Class Boletos
|
||||
|
||||
If SbAlert.Length = 0 Then
|
||||
SbAlert.Append("Ocurrió un error al generar la factura")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
SbAlert.Append("Ocurrió un error al generar la factura." + ex.ToString())
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
SbAlert.Append("Ocurrió un error al generar la factura." + ex.ToString())
|
||||
GuardaLog(ex.ToString())
|
||||
Finally
|
||||
If TieneError Then
|
||||
ObjTransporte.RollBack()
|
||||
ObjTransporte.Dispose()
|
||||
Else
|
||||
SbAlert.Append("El boleto se genero correctamente")
|
||||
ObjTransporte.Commit()
|
||||
SbAlert.Append("El boleto se genero correctamente.")
|
||||
DtPasajeros.Clear()
|
||||
|
||||
ObjTransporte.Dispose()
|
||||
|
||||
DdlPartida.SelectedValueExist("-1")
|
||||
@@ -266,85 +288,92 @@ Partial Class Boletos
|
||||
AsientoSeleccionado = ""
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
Alert(SbAlert.ToString(), If(TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), ShowCloseButton:=False)
|
||||
|
||||
UpPanel.Update()
|
||||
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPartida.SelectedIndexChanged
|
||||
|
||||
UpPanel.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPartida_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlDestino.DataSource = DtDestinos.FiltraParametros($"CveDestinoOrigen = {DdlPartida.SelectedValue}")
|
||||
DdlDestino.DataBind()
|
||||
DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDestino.SelectedIndexChanged
|
||||
CotizarTarifa()
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlDestino_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlDestino.SelectedIndexChanged
|
||||
CotizarTarifa()
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnNumPasajeros_Click(sender As Object, e As EventArgs)
|
||||
' GeneraPasajeros(TxtNumPasajeros.Text.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraPasajeros(Cantidad As Integer)
|
||||
DtPasajeros.Clear()
|
||||
For i As Integer = 1 To Cantidad
|
||||
Dim Dr1 As DataRow = DtPasajeros.NewRow
|
||||
Dr1("Numero") = i
|
||||
'asiento
|
||||
DtPasajeros.Rows.Add(Dr1)
|
||||
Next
|
||||
GvB.DataSource = DtPasajeros
|
||||
GvB.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If AsientoSeleccionado = "" Then
|
||||
Alert("No se ha seleccionado el asiento.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Me.Importe <= 0 Then
|
||||
Alert("No hay un importe asignado.")
|
||||
End Sub
|
||||
|
||||
Private Sub GeneraPasajeros(Cantidad As Integer)
|
||||
DtPasajeros.Clear()
|
||||
For i As Integer = 1 To Cantidad
|
||||
Dim Dr1 As DataRow = DtPasajeros.NewRow
|
||||
Dr1("Numero") = i
|
||||
'asiento
|
||||
DtPasajeros.Rows.Add(Dr1)
|
||||
Next
|
||||
GvB.DataSource = DtPasajeros
|
||||
GvB.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub AgregarPasajero(sender As Object, e As EventArgs)
|
||||
|
||||
If AsientoSeleccionado = "" Then
|
||||
Alert("No se ha seleccionado el asiento.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Dr1 As DataRow = DtPasajeros.NewRow
|
||||
Dr1("Asiento") = AsientoSeleccionado.Replace("A", "")
|
||||
Dr1("Nombre") = TxtNombre.Text.Trim
|
||||
Dr1("Visa") = TxtVisa.Text.Trim
|
||||
Dr1("Importe") = Me.Importe
|
||||
'asiento
|
||||
DtPasajeros.Rows.Add(Dr1)
|
||||
AsientoSeleccionado = ""
|
||||
|
||||
GvB.DataSource = DtPasajeros
|
||||
GvB.DataBind()
|
||||
|
||||
'identifico los asientos seleccionados para la venta
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
For Each dr As DataRow In DtPasajeros.Rows
|
||||
Dim lnk As LinkButton = CType(cph.FindControl($"A{dr("Asiento")}"), LinkButton)
|
||||
If lnk IsNot Nothing Then
|
||||
lnk.Enabled = False
|
||||
lnk.CssClass = "seleccionado"
|
||||
lnk.ToolTip = dr("Nombre").ToString
|
||||
End If
|
||||
Next
|
||||
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
|
||||
End If
|
||||
|
||||
If Me.Importe <= 0 Then
|
||||
Alert("No hay un importe asignado.")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim Dr1 As DataRow = DtPasajeros.NewRow
|
||||
Dr1("Asiento") = AsientoSeleccionado.Replace("A", "")
|
||||
Dr1("Nombre") = TxtNombre.Text.Trim
|
||||
Dr1("Visa") = TxtVisa.Text.Trim
|
||||
Dr1("Sexo") = RblSexo.SelectedItem
|
||||
Dr1("CveSexo") = RblSexo.SelectedValue.ToBool
|
||||
Dr1("Celular") = TxtCelular.Text.Trim
|
||||
Dr1("Observaciones") = TxtObservaciones.Text.Trim
|
||||
Dr1("Partida") = DdlPartida.SelectedItem
|
||||
Dr1("Destino") = DdlDestino.SelectedItem
|
||||
Dr1("CveDestinoOrigen") = DdlPartida.SelectedValue.ToEntero
|
||||
Dr1("CveDestinoFinal") = DdlDestino.SelectedValue.ToEntero
|
||||
Dr1("Importe") = Me.Importe
|
||||
'Reiniciamos Datos'
|
||||
DtPasajeros.Rows.Add(Dr1)
|
||||
AsientoSeleccionado = ""
|
||||
TxtNombre.Text = ""
|
||||
TxtVisa.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
GvB.DataSource = DtPasajeros
|
||||
GvB.DataBind()
|
||||
|
||||
'identifico los asientos seleccionados para la venta
|
||||
Dim cph As ContentPlaceHolder = CType(Me.Master.FindControl("C"), ContentPlaceHolder)
|
||||
For Each dr As DataRow In DtPasajeros.Rows
|
||||
Dim lnk As LinkButton = CType(cph.FindControl($"A{dr("Asiento")}"), LinkButton)
|
||||
If lnk IsNot Nothing Then
|
||||
lnk.Enabled = False
|
||||
lnk.CssClass = "seleccionado"
|
||||
lnk.ToolTip = dr("Nombre").ToString
|
||||
End If
|
||||
Next
|
||||
BtnGuardar.Visible = True
|
||||
UpPanel.Update()
|
||||
End Sub
|
||||
|
||||
Private Function CrearRemision(ByRef objTrans As ClsTransportes) As Modelos.Factura.MMensajeFactura
|
||||
Dim Retorno As New Modelos.Factura.MMensajeFactura
|
||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
|
||||
Dim CveCliente As Integer = 1154164
|
||||
Dim CveMoneda As Integer = 2
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero()
|
||||
|
||||
If CveCliente <= 0 Then
|
||||
Retorno.Mensajes.Add("No se pudo cargar el cliente")
|
||||
@@ -356,46 +385,41 @@ Partial Class Boletos
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
Dim CvePSBoleto As Integer = 912720
|
||||
|
||||
If EsProduccion Then
|
||||
CvePSBoleto = 986337
|
||||
CveCliente = 1172306
|
||||
End If
|
||||
|
||||
Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda, "Rem")
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
CveSubProyecto = ObjFactura.Cliente.CveSubProyecto
|
||||
Dim CvePSBoleto As Integer = 912720
|
||||
|
||||
For Each Dr As DataRow In DtPasajeros.Rows
|
||||
Dim Obs = Dr("Nombre").ToString
|
||||
Dim Importe = Dr("Importe").ToString.ToDecimal()
|
||||
If Importe <= 0 Then
|
||||
Retorno.Mensajes.Add("El importe debe ser mayor a 0")
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
ObjFactura.AgregarPS(CvePSBoleto, 1, Importe, 0, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=0, CveViajePasajero:=Dr("CveViajePasajero").ToString().ToEntero())
|
||||
Next
|
||||
|
||||
ObjFactura.CalculaTotales()
|
||||
|
||||
Try
|
||||
Retorno = ObjFactura.EmitirFactura(False, Transac:=objTrans.IniciaTransacSQL())
|
||||
Catch ex As Exception
|
||||
Retorno = Nothing
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
ObjFactura.Dispose()
|
||||
For Each Dr As DataRow In DtPasajeros.Rows
|
||||
Dim Obs = Dr("Nombre").ToString
|
||||
Dim Importe = Dr("Importe").ToString.ToDecimal()
|
||||
If Importe <= 0 Then
|
||||
Retorno.Mensajes.Add("El importe debe ser mayor a 0")
|
||||
Return Retorno
|
||||
End If
|
||||
Else
|
||||
Retorno.Mensajes.Add("No se pudo generar la factura")
|
||||
End If
|
||||
|
||||
ObjFactura.AgregarPS(CvePSBoleto, 1, Importe, 0, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=0)
|
||||
Next
|
||||
|
||||
ObjFactura.CalculaTotales()
|
||||
|
||||
Try
|
||||
Retorno = ObjFactura.EmitirFactura(False, Transac:=objTrans.IniciaTransacSQL())
|
||||
Catch ex As Exception
|
||||
Retorno = Nothing
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
|
||||
If ObjFactura IsNot Nothing Then
|
||||
ObjFactura.Dispose()
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Class
|
||||
|
||||
'Protected Sub TimerActualizar_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles timerActualizar.Tick
|
||||
' ScriptManager.RegisterStartupScript(Me, Me.GetType(), "ActualizarTiempo", "actualizarTiempo();", True)
|
||||
' UpTimer.Update()
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -26,55 +26,6 @@
|
||||
<asp:Panel ID="PnlGeneral" runat="server">
|
||||
<%--Calendario Tab--%>
|
||||
<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--%>
|
||||
<ajax:TabPanel ID="TabDestinos" runat="server" HeaderText="Destinos">
|
||||
<ContentTemplate>
|
||||
@@ -133,7 +84,7 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<%--Importes Tab--%>
|
||||
<ajax:TabPanel ID="TabImportes" runat="server" HeaderText="Importes">
|
||||
<ajax:TabPanel ID="TabImportes" runat="server" HeaderText="Tarifas">
|
||||
<ContentTemplate>
|
||||
<div class="spaced">
|
||||
<div>
|
||||
@@ -152,29 +103,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvImportes" runat="server" AutoGenerateColumns="false" EmptyDataText="No
|
||||
se Encontró Contrato Registrado"
|
||||
<asp:GridView ID="GvImportes" 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="CveDestinoTarifa, CveRuta, CveDestinoOrigen, CveDestinoFinal, Importe, Destino, Salida">
|
||||
data-sort="true" DataKeyNames="CveDestinoTarifa, CveSubProyecto, CveDestinoOrigen, CveDestinoFinal, Importe, Destino, Partida">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Ruta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveRuta" runat="server" Text='<%# Eval("Ruta")%>'></asp:Literal>
|
||||
<asp:Literal ID="LtlCveRuta" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</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">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSalida" runat="server" Text='<%# Eval("Salida")%>'></asp:Literal>
|
||||
<asp:Literal ID="LtlSalida" runat="server" Text='<%# Eval("Partida")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</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">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe", "{0:N2}")%>'></asp:Literal>
|
||||
@@ -305,8 +253,8 @@
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Ruta:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="Ruta"
|
||||
DataValueField="CveRuta" Class="form-control input-sm select2me"
|
||||
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="SubProyecto"
|
||||
DataValueField="CveSubProyecto" Class="form-control input-sm select2me"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVRutas" runat="server" ControlToValidate="DdlRutas"
|
||||
@@ -368,8 +316,7 @@
|
||||
</div>
|
||||
|
||||
<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"
|
||||
ValidationGroup="GrpGuardar" Visible="false"></asp:Button>
|
||||
<asp:Button ID="BtnAddImporte" OnClick="AddImporte" runat="server" CssClass="btn btn-primary"
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class CatRutas
|
||||
Inherits ClsPaginas
|
||||
@@ -25,14 +23,15 @@ Partial Class CatRutas
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
'Lista Rutas'
|
||||
Dim ObjRutas As New ClsTransportes()
|
||||
If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
GvRutas.DataSource = ObjRutas.DtResultados
|
||||
GvRutas.DataBind()
|
||||
End If
|
||||
End If
|
||||
Dim ObjRutas As New ClsTransportes()
|
||||
'If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||
|
||||
' If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
' GvRutas.DataSource = ObjRutas.DtResultados
|
||||
' GvRutas.DataBind()
|
||||
' End If
|
||||
'End If
|
||||
'Lista Destinos'
|
||||
If ObjRutas.GetDestinos() Then
|
||||
|
||||
@@ -42,12 +41,13 @@ Partial Class CatRutas
|
||||
End If
|
||||
End If
|
||||
'Lista Importes'
|
||||
If ObjRutas.GetDestinosTarifas(-1, -1) Then
|
||||
If ObjRutas.GetDestinosTarifas(-1, -1, -1) Then
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
GvImportes.DataSource = ObjRutas.DtResultados
|
||||
GvImportes.DataBind()
|
||||
End If
|
||||
End If
|
||||
ObjRutas.Dispose()
|
||||
|
||||
UpPanel.Update()
|
||||
|
||||
@@ -71,16 +71,18 @@ Partial Class CatRutas
|
||||
End If
|
||||
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.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
DdlRutas.DataSource = ObjRutas.DtResultados
|
||||
DdlRutas.DataBind()
|
||||
DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||
End If
|
||||
End If
|
||||
' If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
' DdlRutas.DataSource = ObjRutas.DtResultados
|
||||
' DdlRutas.DataBind()
|
||||
' DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Protected Sub MostrarModal(sender As Object, e As EventArgs)
|
||||
@@ -92,7 +94,6 @@ Partial Class CatRutas
|
||||
DdlOrigen.SelectedValue = ""
|
||||
DdlFinal.SelectedValue = ""
|
||||
TxtImporte.Text = ""
|
||||
BtnAddRuta.Visible = False
|
||||
BtnAddDestino.Visible = False
|
||||
BtnAddImporte.Visible = False
|
||||
PnRuta.Visible = False
|
||||
@@ -109,11 +110,8 @@ Partial Class CatRutas
|
||||
PnRuta.Visible = True
|
||||
TxtRuta.Text = GvRow.DataKey("Ruta")
|
||||
DdlRutaEstatus.SelectedValue = GvRow.DataKey("Estatus")
|
||||
BtnAddRuta.Visible = True
|
||||
BtnAddRuta.Text = "Editar"
|
||||
ViewState("Cve") = GvRow.DataKey("CveRuta").ToEntero
|
||||
|
||||
|
||||
Case "BtnEditarDestino"
|
||||
ModalLabel.Text = "Editar Destino"
|
||||
TxtDestino.Text = GvRow.DataKey("Destino")
|
||||
@@ -124,10 +122,9 @@ Partial Class CatRutas
|
||||
BtnAddDestino.Text = "Editar"
|
||||
ViewState("Cve") = GvRow.DataKey("CveDestino").ToEntero
|
||||
|
||||
|
||||
Case "BtnEditarImporte"
|
||||
ModalLabel.Text = "Editar Importe"
|
||||
DdlRutas.SelectedValue = GvRow.DataKey("CveRuta")
|
||||
DdlRutas.SelectedValue = GvRow.DataKey("CveSubProyecto")
|
||||
DdlOrigen.SelectedValue = GvRow.DataKey("CveDestinoOrigen")
|
||||
DdlFinal.SelectedValue = GvRow.DataKey("CveDestinoFinal")
|
||||
TxtImporte.Text = GvRow.DataKey("Importe")
|
||||
@@ -136,7 +133,6 @@ Partial Class CatRutas
|
||||
BtnAddImporte.Text = "Editar"
|
||||
ViewState("Cve") = GvRow.DataKey("CveDestinoTarifa").ToEntero
|
||||
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
||||
@@ -145,8 +141,6 @@ Partial Class CatRutas
|
||||
Case "BtnAgregarRuta"
|
||||
ModalLabel.Text = "Agregar Ruta"
|
||||
PnRuta.Visible = True
|
||||
BtnAddRuta.Visible = True
|
||||
BtnAddRuta.Text = "Guardar"
|
||||
Case "BtnAgregarDestino"
|
||||
ModalLabel.Text = "Agregar Destino"
|
||||
PnDestino.Visible = True
|
||||
@@ -165,46 +159,46 @@ Partial Class CatRutas
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "Rutas"
|
||||
Protected Sub AddRuta(sender As Object, e As EventArgs)
|
||||
'#Region "Rutas"
|
||||
' Protected Sub AddRuta(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjRuta As New ClsTransportes
|
||||
ObjRuta.IniciaTransacSQL()
|
||||
Try
|
||||
If BtnAddRuta.Text = "Guardar" Then
|
||||
If ObjRuta.AddRuta(TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then
|
||||
ObjRuta.Commit()
|
||||
Alert("Ruta Agregada Correctamente.")
|
||||
End If
|
||||
End If
|
||||
' Dim ObjRuta As New ClsTransportes
|
||||
' ObjRuta.IniciaTransacSQL()
|
||||
' Try
|
||||
' If BtnAddRuta.Text = "Guardar" Then
|
||||
' If ObjRuta.AddRuta(TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then
|
||||
' ObjRuta.Commit()
|
||||
' Alert("Ruta Agregada Correctamente.")
|
||||
' End If
|
||||
' End If
|
||||
|
||||
If BtnAddRuta.Text = "Editar" Then
|
||||
If ObjRuta.UpdateRuta(Cve, TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ObjRuta.Commit()
|
||||
Alert("Ruta Actualizada Correctamente.")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjRuta.RollBack()
|
||||
Finally
|
||||
CargaDatos()
|
||||
ObjRuta.Dispose()
|
||||
End Try
|
||||
' If BtnAddRuta.Text = "Editar" Then
|
||||
' If ObjRuta.UpdateRuta(Cve, TxtRuta.Text, DdlRutaEstatus.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' ObjRuta.Commit()
|
||||
' Alert("Ruta Actualizada Correctamente.")
|
||||
' End If
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' ObjRuta.RollBack()
|
||||
' Finally
|
||||
' CargaDatos()
|
||||
' ObjRuta.Dispose()
|
||||
' End Try
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub RemoveRuta(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ObjRuta As New ClsTransportes
|
||||
' End Sub
|
||||
' Protected Sub RemoveRuta(sender As Object, e As EventArgs)
|
||||
' Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
' Dim ObjRuta As New ClsTransportes
|
||||
|
||||
If ObjRuta.RemoveRuta(GvRow.DataKey("CveRuta").ToEntero) Then
|
||||
Alert("Ruta eliminada correctamente")
|
||||
CargaDatos()
|
||||
End If
|
||||
' If ObjRuta.RemoveRuta(GvRow.DataKey("CveRuta").ToEntero) Then
|
||||
' Alert("Ruta eliminada correctamente")
|
||||
' CargaDatos()
|
||||
' End If
|
||||
|
||||
ObjRuta.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
' ObjRuta.Dispose()
|
||||
' End Sub
|
||||
'#End Region
|
||||
|
||||
#Region "Destinos"
|
||||
Protected Sub AddDestino(sender As Object, e As EventArgs)
|
||||
@@ -252,27 +246,22 @@ Partial Class CatRutas
|
||||
|
||||
Dim ObjImporte As New ClsTransportes
|
||||
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 ObjImporte.UpdateDestinosTarifas(Cve, DdlRutas.SelectedValue, DdlOrigen.SelectedValue, DdlFinal.SelectedValue, TxtImporte.Text) Then
|
||||
ObjImporte.Commit()
|
||||
Alert("Importe actualizado correctamente.")
|
||||
End If
|
||||
If BtnAddImporte.Text = "Guardar" Then
|
||||
If ObjImporte.AddDestinosTarifas(DdlRutas.SelectedValue.ToEntero, DdlOrigen.SelectedValue.ToEntero, DdlFinal.SelectedValue.ToEntero, TxtImporte.Text.ToDecimal) > 1 Then
|
||||
ObjImporte.Commit()
|
||||
Alert("Importe agregado correctamente.")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjImporte.RollBack()
|
||||
Finally
|
||||
CargaDatos()
|
||||
ObjImporte.Dispose()
|
||||
End Try
|
||||
End If
|
||||
|
||||
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
|
||||
Protected Sub RemoveImporte(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -48,35 +48,36 @@ Partial Class RepContratoDetalle
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa) Then
|
||||
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
|
||||
ObjContratos.Dispose()
|
||||
Response.Redirect($"~/Transportes/RepContratos.aspx")
|
||||
End If
|
||||
|
||||
|
||||
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
|
||||
ObjContratos.Dispose()
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCancelar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Contrato">
|
||||
<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>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -190,7 +190,7 @@
|
||||
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%-- Columnas Ocultas --%>
|
||||
<asp:TemplateField HeaderText="Chofer 1" Visible="false">
|
||||
<ItemTemplate>
|
||||
@@ -200,13 +200,13 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Chofer 2" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtChofer2" runat="server" Text='<%# Eval("NombreChofer2") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtChofer2" runat="server" Text='<%# Eval("NombreChofer2") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtUnidad" runat="server" Text='<%# Eval("NombreAF") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtUnidad" runat="server" Text='<%# Eval("NombreAF") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -364,11 +364,29 @@
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Anticipo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" Width="95%" runat="server"
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle="form-control" Width="95%" runat="server"
|
||||
type="decimal"></asp:TextBox>
|
||||
<span class="fa fa-percent"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Moneda</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlMoneda" AppendDataBoundItems="true" DataTextField="Moneda"
|
||||
DataValueField="CveMoneda"
|
||||
Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVMoneda" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -40,6 +40,14 @@ Partial Class ListadoContratos
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("-", ""))
|
||||
'Lista de Monedas
|
||||
DdlMoneda.DataSource = GlobalDTMonedas
|
||||
DdlMoneda.DataBind()
|
||||
|
||||
DdlEstatus.DataSource = GlobalDTContratosEstatus(UsuarioActual.CveEmpresa)
|
||||
DdlEstatus.DataBind()
|
||||
DdlEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
@@ -49,11 +57,6 @@ Partial Class ListadoContratos
|
||||
GvContratos.DataBind()
|
||||
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
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||
Dim ObjFolio As New ClsGralFolios
|
||||
@@ -90,7 +93,7 @@ Partial Class ListadoContratos
|
||||
'Agregamos Contrato
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
||||
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
}
|
||||
|
||||
.miGrid {
|
||||
color: white;
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
@@ -44,16 +43,16 @@
|
||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<asp:Button runat="server" Text="Consultar" class="btn btn-primary" OnClick="Consultar" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="height: 32px;">
|
||||
<label class="col-md-1">Tipo Vista: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:RadioButtonList ID="RBTipoVista" runat="server" AutoPostBack="True" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Text="Duración" Value="duracion" />
|
||||
<asp:RadioButtonList ID="RBTipoVista" runat="server" AutoPostBack="True" RepeatDirection="Horizontal">
|
||||
<asp:ListItem Text="Fecha de Salida" Value="fecha" Selected="True" />
|
||||
<asp:ListItem Text="Duración" Value="duracion" />
|
||||
</asp:RadioButtonList>
|
||||
|
||||
</div>
|
||||
@@ -86,7 +85,6 @@
|
||||
<%--Contratos Tab--%>
|
||||
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos">
|
||||
<ContentTemplate>
|
||||
<%-- Filtros --%>
|
||||
<%-- Filtros --%>
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -94,62 +92,69 @@
|
||||
<%-- Filtro Visible - Consulta --%>
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultarListado" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultarListado_Click" />
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 ">Cliente:</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesFiltro" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<label class="col-md-1 ">Estatus:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatusConsulta" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
DataTextField="ContratoEstatus" DataValueField="CveContratoEstatus"
|
||||
AppendDataBoundItems="true" Width="200px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="row" style="height: 32px;">
|
||||
<%-- Fecha Inicial --%>
|
||||
<label class="col-md-1 truncate">Fecha Inicial</label>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker "
|
||||
data-date-format="dd/mm/yyyy"
|
||||
style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default" Text="<i class='fa fa-calendar'></i>"
|
||||
runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI"
|
||||
Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left">
|
||||
</ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI"
|
||||
PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
<%-- Fecha Final --%>
|
||||
<label class="col-md-1 truncate">Fecha Fin</label>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy"
|
||||
style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default "
|
||||
Text="<i class='fa fa-calendar'></i>"
|
||||
runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF"
|
||||
Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left">
|
||||
</ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF"
|
||||
PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<%-- Cliente --%>
|
||||
<label class="col-md-1">Cliente</label>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="86%"
|
||||
data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente"
|
||||
CssStyle="width: 86%;"
|
||||
UsaWebService="true" Enabled="false"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<%-- Estatus --%>
|
||||
<label class="col-md-1 ">Estatus:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatusConsulta" data-text="Todos" AppendDataBoundItems="true"
|
||||
DataTextField="ContratoEstatus"
|
||||
DataValueField="CveContratoEstatus" CssClass="form-control ddlFiltros input-sm select2me Widthall"
|
||||
Style="width: 100%;" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- Filtro Oculto --%>
|
||||
@@ -157,8 +162,8 @@
|
||||
<%-- Centro de Costos --%>
|
||||
<label class="col-md-1 truncate ">Centro de Costos</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCentroCostos" data-text="Todos" AppendDataBoundItems="true"
|
||||
DataTextField="" DataValueField="" CssClass="form-control ddlFiltros input-sm select2me Widthall"
|
||||
<asp:DropDownList ID="DdlSubProyectos" data-text="Todos" AppendDataBoundItems="true"
|
||||
DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall"
|
||||
Style="width: 100%;" runat="server">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
@@ -173,7 +178,7 @@
|
||||
<%-- Chofer --%>
|
||||
<label class="col-md-1 ">Chofer:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlChoferConsulta" data-text="Todos" AppendDataBoundItems="true"
|
||||
<asp:DropDownList ID="DdlChoferFiltro" data-text="Todos" AppendDataBoundItems="true"
|
||||
DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="form-control ddlFiltros input-sm select2me Widthall"
|
||||
Style="width: 100%;" runat="server">
|
||||
</asp:DropDownList>
|
||||
@@ -188,16 +193,16 @@
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn miGrid"
|
||||
GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, NumeroContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente,NombreComercial, CveTipoAF, Importe, ImporteMin, ImporteMax, Observaciones, CveAF, CveChofer, CveChofer2, CveContratosEstatus, CantidadPasajeros">
|
||||
data-sort="true" DataKeyNames="CveContrato, NumeroContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, NombreComercial, CveTipoAF, Importe, ImporteMin, ImporteMax, Observaciones, CveAF, CveChofer, CveChofer2, CveContratosEstatus, CantidadPasajeros,CveMoneda">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" NavigateUrl='<%# "~/Transportes/RepContratoDetalle.aspx?CveContrato=" + If(Eval("CveContrato") IsNot DBNull.Value, Eval("CveContrato").ToString(), String.Empty) %>'
|
||||
<asp:HyperLink ForeColor="White" runat="server" NavigateUrl='<%# "~/Transportes/RepContratoDetalle.aspx?CveContrato=" + If(Eval("CveContrato") IsNot DBNull.Value, Eval("CveContrato").ToString(), String.Empty) %>'
|
||||
Text='<%# Eval("NumeroContrato") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="120px">
|
||||
<asp:TemplateField ItemStyle-Width="120px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Salida
|
||||
@@ -213,7 +218,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -237,7 +242,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Regreso
|
||||
@@ -247,7 +252,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-CssClass="bold">
|
||||
<asp:TemplateField HeaderText="Estatus" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlContrato" runat="server" Text='<%# Eval("ContratoEstatus") %>'>
|
||||
</asp:Label>
|
||||
@@ -256,7 +261,8 @@
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" OnClick="UpdateModal" CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" OnClick="UpdateModal"
|
||||
CssClass="btn btn-circle btn-xs green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -319,7 +325,6 @@
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" Width="100%" TextMode="MultiLine"
|
||||
Rows="2"
|
||||
ReadOnly="true"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -333,7 +338,6 @@
|
||||
<div class="row">
|
||||
<label class="col-md-4">Fecha Salida:</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control"
|
||||
ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
|
||||
@@ -343,12 +347,18 @@
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Fecha Regreso:</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control"
|
||||
ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Moneda:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtMoneda" runat="server" ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Tipo Unidad</label>
|
||||
<div class="col-md-8">
|
||||
@@ -356,7 +366,6 @@
|
||||
DataTextField="TipoActivoFijo" Class="form-control input-inline"
|
||||
Width="100%" runat="server" Enabled="false">
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -366,7 +375,7 @@
|
||||
<asp:DropDownList ID="DdlAF" DataValueField="CveActivoFijo"
|
||||
DataTextField="Descripcion" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -376,16 +385,17 @@
|
||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Chofer 2</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlChofer2" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -42,18 +42,18 @@ Partial Class RepContratosCalendario
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
' GvContratos.HeaderStyle.ForeColor = Drawing.Color.Black
|
||||
Dim CveCliente As Integer = DdlClientesFiltro.SelectedValue.ToEntero
|
||||
'EL fondo de las líneas es blanco, por eso cambio el color a negro de la cabecera
|
||||
GvContratos.HeaderStyle.ForeColor = Drawing.Color.Black
|
||||
Dim CveCliente As Integer = DdlCliente.SelectedValue.ToEntero
|
||||
If CveCliente = 0 Then CveCliente = -1
|
||||
|
||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientesFiltro.SelectedValue.ToEntero, CveEstatus:=DdlEstatusConsulta.SelectedValue.ToEntero, CveTipoContrato:=34) Then
|
||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveEstatus:=DdlEstatusConsulta.SelectedValue.ToEntero, CveTipoContrato:=34) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
End If
|
||||
|
||||
DtAvance = ObjContratos.DtResultados
|
||||
|
||||
ObjContratos.Dispose()
|
||||
GvContratos.DataBind()
|
||||
End Sub
|
||||
Private Sub InicializaCalendar()
|
||||
|
||||
@@ -97,11 +97,13 @@ Partial Class RepContratosCalendario
|
||||
|
||||
DdlEstatusContrato.DataSource = GlobalDTContratosEstatus(UsuarioActual.CveEmpresa)
|
||||
DdlEstatusContrato.DataBind()
|
||||
DdlEstatusContrato.Items.Insert(0, New ListItem("-", ""))
|
||||
DdlEstatusContrato.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectos.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
|
||||
'CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -142,6 +144,7 @@ Partial Class RepContratosCalendario
|
||||
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
|
||||
TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy hh:mm tt")
|
||||
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy hh:mm tt")
|
||||
TxtMoneda.Text = GvRow.DataKey("CveMoneda")
|
||||
'Requeridos
|
||||
ViewState("Contrato") = GvRow.DataKey("CveContrato")
|
||||
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
|
||||
@@ -153,7 +156,9 @@ Partial Class RepContratosCalendario
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
End Sub
|
||||
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
|
||||
@@ -45,17 +45,17 @@
|
||||
<%-- Listado de Viajes --%>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontró ningún viaje registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveContrato, NumeroContrato, CveRuta, CveDestino, CvePartida, FechaInicial, CveMasivo">
|
||||
data-sort="true" DataKeyNames="CveContrato, NumeroContrato, CveSubProyecto,CveDestino, CvePartida, FechaInicial, CveMasivo">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Contrato">
|
||||
<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>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Ruta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlRuta" runat="server" Text='<%# Eval("Ruta") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlRuta" runat="server" Text='<%# Eval("SubProyecto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -115,8 +115,8 @@
|
||||
<div class="row">
|
||||
<label class="col-md-4">Ruta</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="Ruta"
|
||||
DataValueField="CveRuta" Class="form-control input-sm select2me"
|
||||
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="SubProyecto"
|
||||
DataValueField="CveSubProyecto" Class="form-control input-sm select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVRutas" runat="server" ControlToValidate="DdlRutas"
|
||||
|
||||
@@ -34,15 +34,21 @@ Partial Class ListadoViajes
|
||||
End Sub
|
||||
Private Sub InicializaCombos()
|
||||
'Lista Rutas'
|
||||
Dim ObjRutas As New ClsTransportes()
|
||||
If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||
DdlRutas.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveSubProyecto in (12699,12700)")
|
||||
DdlRutas.DataBind()
|
||||
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
DdlRutas.DataSource = ObjRutas.DtResultados
|
||||
DdlRutas.DataBind()
|
||||
DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
|
||||
End If
|
||||
End If
|
||||
Dim ObjRutas As New ClsTransportes()
|
||||
'If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||
|
||||
' If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
' DdlRutas.DataSource = ObjRutas.DtResultados
|
||||
' 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'
|
||||
If ObjRutas.GetDestinos() Then
|
||||
|
||||
@@ -62,11 +68,15 @@ Partial Class ListadoViajes
|
||||
Private Sub CargaDatos()
|
||||
'Carga Viajes
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=35) Then
|
||||
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, -1, CveEstatus:=-1, CveTipoContrato:=35) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
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
|
||||
|
||||
@@ -86,7 +96,6 @@ Partial Class ListadoViajes
|
||||
End If
|
||||
|
||||
IsMasivo.Visible = True
|
||||
DdlRutas.Text = ""
|
||||
TxtFechaViaje.Text = ""
|
||||
DdlPartida.Text = ""
|
||||
DdlDestino.SelectedValue = ""
|
||||
@@ -127,7 +136,7 @@ Partial Class ListadoViajes
|
||||
End If
|
||||
'Agregamos contrato
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, fecha, fecha, "", "", 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, CveMasivo:=CveMasivo) > 0 Then
|
||||
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, fecha, fecha, "", "", 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, CveMasivo:=CveMasivo, CveVendedor:=UsuarioActual.CveVendedor) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
End If
|
||||
'Actualizamos Folio
|
||||
@@ -141,13 +150,11 @@ Partial Class ListadoViajes
|
||||
ObjContratos.RollBack()
|
||||
Alert("Ocurrió un error al generar viajes masivo", TipoMensaje.MsgError)
|
||||
Finally
|
||||
DdlRutas.Text = ""
|
||||
|
||||
TxtFechaViaje.Text = ""
|
||||
DdlPartida.Text = ""
|
||||
DdlDestino.SelectedValue = ""
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
Else
|
||||
@@ -157,13 +164,13 @@ Partial Class ListadoViajes
|
||||
Try
|
||||
'Agregamos Viaje
|
||||
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()
|
||||
Alert("Viaje agregado correctamente.")
|
||||
End If
|
||||
Else
|
||||
'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()
|
||||
Alert("El viaje se actualizó correctamente.")
|
||||
End If
|
||||
|
||||
11
Transportes/RepViajesCalendario.aspx
Normal file
11
Transportes/RepViajesCalendario.aspx
Normal file
@@ -0,0 +1,11 @@
|
||||
<%@ Page Language="C#" Title="Transportes V&A - Viajes Calendario" AutoEventWireup="false"
|
||||
MasterPageFile="~/Site.master" CodeFile="RepViajesCalendario.aspx.cs"
|
||||
Inherits="RepViajesCalendario" EnableEventValidation="true" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||
Prueba
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
7
Transportes/RepViajesCalendario.aspx.cs
Normal file
7
Transportes/RepViajesCalendario.aspx.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using System;
|
||||
|
||||
public partial class RepViajesCalendario : ClsPaginas {
|
||||
protected void Page_Load(object sender, EventArgs e) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user