-
This commit is contained in:
@@ -159,7 +159,7 @@ Public Class ClsContratos
|
|||||||
Public Property PorGarantia As Double
|
Public Property PorGarantia As Double
|
||||||
Public Property CveContratosEstatus As Integer
|
Public Property CveContratosEstatus As Integer
|
||||||
Public Property Estatus As Integer
|
Public Property Estatus As Integer
|
||||||
'Public Property EstatusContrato As Integer
|
Public Property EstatusContrato As Integer
|
||||||
Public Property Archivo As String
|
Public Property Archivo As String
|
||||||
Public Property Geom As String
|
Public Property Geom As String
|
||||||
Public Property FechaIng As DateTime
|
Public Property FechaIng As DateTime
|
||||||
@@ -271,7 +271,7 @@ Public Class ClsContratos
|
|||||||
Me.PorAnticipo = Data.Rows(0)("PorAnticipo").ToString.ToDouble
|
Me.PorAnticipo = Data.Rows(0)("PorAnticipo").ToString.ToDouble
|
||||||
Me.PorAmortizacionAnticipo = Data.Rows(0)("PorAmortizacionAnticipo").ToString.ToDouble
|
Me.PorAmortizacionAnticipo = Data.Rows(0)("PorAmortizacionAnticipo").ToString.ToDouble
|
||||||
Me.PorGarantia = Data.Rows(0)("PorGarantia").ToString.ToDouble
|
Me.PorGarantia = Data.Rows(0)("PorGarantia").ToString.ToDouble
|
||||||
'Me.EstatusContrato = Data.Rows(0)("EstatusContrato").ToString.ToEntero
|
Me.EstatusContrato = Data.Rows(0)("EstatusContrato").ToString.ToEntero
|
||||||
Me.Archivo = Data.Rows(0)("Archivo").ToString
|
Me.Archivo = Data.Rows(0)("Archivo").ToString
|
||||||
Me.Geom = Data.Rows(0)("Geom").ToString
|
Me.Geom = Data.Rows(0)("Geom").ToString
|
||||||
Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDate
|
Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDate
|
||||||
@@ -407,7 +407,7 @@ Public Class ClsContratos
|
|||||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1.0, Optional CveSucursalCliente As Integer = -1, Optional CveAlmacenOrigen As Integer = -1, Optional CveAlmacenDestino As Integer = -1, Optional PorcentajeComision As Integer = -1,
|
||||||
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1,
|
||||||
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False,
|
Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False,
|
||||||
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1) As Boolean
|
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional EstatusContrato As Integer = -1, Optional CveAF As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Con_ContratosUpdate")
|
DataAdapter("PA_Con_ContratosUpdate")
|
||||||
@@ -464,6 +464,8 @@ Public Class ClsContratos
|
|||||||
.Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales
|
.Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales
|
||||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||||
|
.Add("@EstatusContrato", SqlDbType.Int).Value = EstatusContrato
|
||||||
|
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -10769,6 +10769,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600)
|
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600)
|
||||||
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601)
|
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601)
|
||||||
PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603)
|
PaginaDict.Add("/Transportes/RepContratosCalendario.aspx".ToUpper(), 603)
|
||||||
|
PaginaDict.Add("/Transportes/CatRutas.aspx".ToUpper(), 604)
|
||||||
#End Region
|
#End Region
|
||||||
'Antes de aquí.
|
'Antes de aquí.
|
||||||
|
|
||||||
|
|||||||
@@ -246,6 +246,9 @@ Public Class ClsSisUsuarios
|
|||||||
Dim autoip As String = Data.Rows(0)("AutorizadoxIP").ToString().ToUpper()
|
Dim autoip As String = Data.Rows(0)("AutorizadoxIP").ToString().ToUpper()
|
||||||
Retorno.AutorizadoxIP = (autoip = "1" OrElse autoip = "TRUE")
|
Retorno.AutorizadoxIP = (autoip = "1" OrElse autoip = "TRUE")
|
||||||
|
|
||||||
|
' Esto es parta el punto de venta
|
||||||
|
Retorno.CveSucursal = Data.Rows(0)("CveSubProyecto").ToString().ToEntero
|
||||||
|
|
||||||
''Toma la primer letra de cada nombre
|
''Toma la primer letra de cada nombre
|
||||||
'Dim sbr As New StringBuilder
|
'Dim sbr As New StringBuilder
|
||||||
'For Each St As String In Retorno.Nombre.Split(" "c)
|
'For Each St As String In Retorno.Nombre.Split(" "c)
|
||||||
|
|||||||
@@ -333,6 +333,68 @@ Public Class ClsTransportes
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function AddDestino(Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
||||||
|
Dim Retorno As Integer = -1
|
||||||
|
|
||||||
|
DataAdapter("PA_Trans_DestinosAdd")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveDestino", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
|
.Add("@Destino", SqlDbType.VarChar).Value = Destino
|
||||||
|
.Add("@EsNacional", SqlDbType.VarChar).Value = Convert.ToBoolean(EsNacional)
|
||||||
|
.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("@CveDestino").Value.ToString)
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agregar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateDestino(CveDestino As Integer, Destino As String, Estatus As String, EsNacional As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Trans_DestinosUpdate")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||||
|
.Add("@Destino", SqlDbType.VarChar).Value = Destino
|
||||||
|
.Add("@EsNacional", SqlDbType.VarChar).Value = Convert.ToBoolean(EsNacional)
|
||||||
|
.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 el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function RemoveDestino(CveDestino As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
|
DataAdapter("PA_Trans_DestinosRemove")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al eliminar el destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Rutas"
|
#Region "Rutas"
|
||||||
@@ -351,15 +413,73 @@ Public Class ClsTransportes
|
|||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Tarifas"
|
#Region "Importes"
|
||||||
Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean
|
Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Trans_DestinosTarifasGet")
|
DataAdapter("PA_Trans_DestinosTarifasGet")
|
||||||
@@ -376,6 +496,63 @@ Public Class ClsTransportes
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function AddDestinosTarifas(CveRuta As String, CveDestinoOrigen As String, CveDestinoFinal As String, Importe As String) As Integer
|
||||||
|
Dim Retorno As Integer = -1
|
||||||
|
|
||||||
|
DataAdapter("PA_Trans_DestinosTarifasAdd")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.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)
|
||||||
|
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveDestinoTarifa").Value.ToString)
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agregar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
Public Function UpdateDestinosTarifas(CveDestinoTarifa As Integer, CveRuta As String, CveDestinoOrigen As String, CveDestinoFinal As String, Importe As String) 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
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
Public Function RemoveDestinosTarifas(CveDestinoTarifa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
|
DataAdapter("PA_Trans_DestinosTarifasRemove")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveDestinoTarifa", SqlDbType.Int).Value = CveDestinoTarifa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al eliminar el importe.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -115,7 +115,12 @@ Public Class wsSIG
|
|||||||
Retorno.CveEmpresa = ttDato.CveEmpresa
|
Retorno.CveEmpresa = ttDato.CveEmpresa
|
||||||
'Retorno.Empresa = ttDato.NombreEmpresa
|
'Retorno.Empresa = ttDato.NombreEmpresa
|
||||||
Retorno.CveVendedor = ttDato.CveVendedor
|
Retorno.CveVendedor = ttDato.CveVendedor
|
||||||
Retorno.CveSucursal = CveSubProyecto
|
|
||||||
|
If CveSubProyecto > 0 Then
|
||||||
|
Retorno.CveSucursal = CveSubProyecto
|
||||||
|
Else
|
||||||
|
Retorno.CveSucursal = ttDato.CveSucursal
|
||||||
|
End If
|
||||||
'Retorno.Contraseña = ttDato.Contraseña
|
'Retorno.Contraseña = ttDato.Contraseña
|
||||||
'Retorno.IMEI = IMEI
|
'Retorno.IMEI = IMEI
|
||||||
|
|
||||||
|
|||||||
@@ -442,7 +442,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
Dim DT_EstatusOS As New DataTable
|
Dim DT_EstatusOS As New DataTable
|
||||||
Dim usuarioActual_ As Usuario = UsuarioActual(context)
|
Dim usuarioActual_ As Usuario = UsuarioActual(context)
|
||||||
Dim ErrorEventos As Boolean = False
|
Dim ErrorEventos As Boolean = False
|
||||||
Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"}
|
|
||||||
Dim tipoVista As String = context.Request("tipoVista")
|
Dim tipoVista As String = context.Request("tipoVista")
|
||||||
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
|
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||||
DT_SubProyectos.Columns.Add("backgroundColor")
|
DT_SubProyectos.Columns.Add("backgroundColor")
|
||||||
@@ -458,19 +457,31 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
For Each dr As DataRow In ObjContratos.DtResultados.Rows
|
For Each dr As DataRow In ObjContratos.DtResultados.Rows
|
||||||
Dim cevent As CalendarEvent = New CalendarEvent()
|
Dim cevent As CalendarEvent = New CalendarEvent()
|
||||||
|
|
||||||
|
Dim estatus As Integer = dr("EstatusContrato").ToString.ToEntero
|
||||||
|
|
||||||
cevent.id = dr("CveContrato").ToString.ToEntero
|
cevent.id = dr("CveContrato").ToString.ToEntero
|
||||||
cevent.title = dr("DescripcionContrato").ToString
|
cevent.title = dr("DescripcionContrato").ToString
|
||||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||||
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) 'Agregar una hora, fecha final como default
|
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
|
||||||
cevent.allDay = False
|
cevent.allDay = False
|
||||||
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
||||||
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
|
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
|
||||||
cevent.CveActivoFijo = dr("CveTipoAF").ToString.ToEntero
|
|
||||||
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
|
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
|
||||||
cevent.Dolares = dr("Importe").ToString.ToDecimal
|
cevent.Dolares = dr("Importe").ToString.ToDecimal
|
||||||
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
|
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
|
||||||
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
|
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
|
||||||
|
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||||
|
|
||||||
|
Select Case estatus
|
||||||
|
Case 1
|
||||||
|
cevent.backgroundColor = "#00A56A"
|
||||||
|
Case 2
|
||||||
|
cevent.backgroundColor = "#2B4FD6"
|
||||||
|
Case 3
|
||||||
|
cevent.backgroundColor = "#EE602E"
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not cevent.recurrenciatipo > 0 Then
|
If Not cevent.recurrenciatipo > 0 Then
|
||||||
|
|
||||||
@@ -554,24 +565,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
|||||||
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
|
||||||
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
|
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
|
||||||
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
||||||
|
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||||
cevent.allDay = False
|
cevent.allDay = False
|
||||||
'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
|
|
||||||
'cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero
|
|
||||||
'cevent.cveagendatipo = dr("CveAgendaTipo").ToString
|
|
||||||
'cevent.prioridad = dr("CvePrioridad").ToString.ToEntero
|
|
||||||
'cevent.backgroundColor = dr("BackGroundColor").ToString
|
|
||||||
|
|
||||||
'cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero
|
|
||||||
'cevent.frecuencia = dr("Frecuencia").ToString.ToEntero
|
|
||||||
'cevent.diassemana = dr("DiasSemana").ToString
|
|
||||||
'cevent.dia = dr("Dia").ToString.ToEntero
|
|
||||||
'cevent.mes = dr("Mes").ToString.ToEntero
|
|
||||||
'cevent.recurrenciafin = dr("RecurrenciaFin").ToString
|
|
||||||
'cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero
|
|
||||||
'cevent.Prospecto = dr("Prospecto").ToString
|
|
||||||
|
|
||||||
'11/05/2018 - Evento Gasto Recurrente
|
|
||||||
|
|
||||||
|
|
||||||
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
|
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA
|
||||||
|
|||||||
@@ -1254,9 +1254,10 @@ Partial Class PopUpVerFactura
|
|||||||
Dim CveAlmacenTransitorioRecepcion As Integer = If(UrlParametros("CVEALMACENTRANSITORIORECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENTRANSITORIORECEPCION").ToString.ToEntero))
|
Dim CveAlmacenTransitorioRecepcion As Integer = If(UrlParametros("CVEALMACENTRANSITORIORECEPCION") Is Nothing, -1, (UrlParametros("CVEALMACENTRANSITORIORECEPCION").ToString.ToEntero))
|
||||||
Dim FolioBusquedaTrasitorio As Integer = If(UrlParametros("FOLIOBUSQUEDATRASITORIO") Is Nothing, -1, (UrlParametros("FOLIOBUSQUEDATRASITORIO").ToString.ToEntero))
|
Dim FolioBusquedaTrasitorio As Integer = If(UrlParametros("FOLIOBUSQUEDATRASITORIO") Is Nothing, -1, (UrlParametros("FOLIOBUSQUEDATRASITORIO").ToString.ToEntero))
|
||||||
|
|
||||||
|
Dim Consola As String = If(UrlParametros("CVEMOVIMIENTO") IsNot Nothing, UrlParametros("CVEMOVIMIENTO").ToString.Trim, "")
|
||||||
|
|
||||||
CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=False, EsTransitorio:=EsTransitorio, CveAlmacenRecepcion:=CveAlmacenRecepcion, CveAlmacenTransitorioRecepcion:=CveAlmacenTransitorioRecepcion,
|
CargaMovimientosAlmacen(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, Resumen:=False, EsTransitorio:=EsTransitorio, CveAlmacenRecepcion:=CveAlmacenRecepcion, CveAlmacenTransitorioRecepcion:=CveAlmacenTransitorioRecepcion,
|
||||||
FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio)
|
FolioBusquedaTrasitorio:=FolioBusquedaTrasitorio, Consola:=Consola)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -2420,7 +2421,7 @@ Partial Class PopUpVerFactura
|
|||||||
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
#Region " - OP = 'Alm' - REPORTE ENTRADAS ALMACEN "
|
||||||
|
|
||||||
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False,
|
Private Sub CargaMovimientosAlmacen(CveMovimiento As Integer, Optional Resumen As Boolean = False,
|
||||||
Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1)
|
Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1, Optional Consola As String = "")
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
||||||
@@ -2656,7 +2657,7 @@ Partial Class PopUpVerFactura
|
|||||||
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
|
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
|
||||||
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego,
|
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego,
|
||||||
CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado, UsuarioRegistro:=UsuarioCapturo,
|
CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado, UsuarioRegistro:=UsuarioCapturo,
|
||||||
Ruta:=Ruta, Supervisor:=Supervisor)
|
Ruta:=Ruta, Supervisor:=Supervisor, Consola:=Consola)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera
|
Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera
|
||||||
@@ -2675,7 +2676,7 @@ Partial Class PopUpVerFactura
|
|||||||
EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
|
EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
|
||||||
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0,
|
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0,
|
||||||
Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "", Optional UsuarioRegistro As String = "",
|
Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "", Optional UsuarioRegistro As String = "",
|
||||||
Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing)
|
Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing, Optional Consola As String = "-1")
|
||||||
|
|
||||||
|
|
||||||
Select Case CveConcepto
|
Select Case CveConcepto
|
||||||
@@ -3347,6 +3348,8 @@ Partial Class PopUpVerFactura
|
|||||||
RutaFormato = "{0}Formatos\TrasladoUsado.rdlc"
|
RutaFormato = "{0}Formatos\TrasladoUsado.rdlc"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
params.Add(New ReportParameter("CveConcepto", "8")) 'FolioTraspaso.ToString
|
params.Add(New ReportParameter("CveConcepto", "8")) 'FolioTraspaso.ToString
|
||||||
'params.Add(New ReportParameter("TipoTraslado", "AVISO")) 'FolioTraspaso.ToString
|
'params.Add(New ReportParameter("TipoTraslado", "AVISO")) 'FolioTraspaso.ToString
|
||||||
params.Add(New ReportParameter("SubProyecto", String.Format("Traslado de: {0} A {1}", Almacen, AlmacenDestino))) 'DdlAlmacenDestino.SelectedItem.ToString
|
params.Add(New ReportParameter("SubProyecto", String.Format("Traslado de: {0} A {1}", Almacen, AlmacenDestino))) 'DdlAlmacenDestino.SelectedItem.ToString
|
||||||
@@ -3377,6 +3380,19 @@ Partial Class PopUpVerFactura
|
|||||||
CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero
|
CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero
|
||||||
DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}")
|
DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}")
|
||||||
|
|
||||||
|
If CveCliente = 819998 Then
|
||||||
|
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
|
||||||
|
|
||||||
|
If Consola <> "-1" And Consola.Trim.Length > 0 Then
|
||||||
|
RutaFormato = "{0}Formatos\Consola.rdlc"
|
||||||
|
params.Add(New ReportParameter("Consola", Consola))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero
|
Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero
|
||||||
|
|
||||||
params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion")))
|
params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion")))
|
||||||
@@ -3409,9 +3425,6 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
If CveCliente = 819998 Then
|
|
||||||
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveContrato > 0 Then
|
If CveContrato > 0 Then
|
||||||
|
|||||||
3073
Empresas/186/Formatos/Consola.rdlc
Normal file
3073
Empresas/186/Formatos/Consola.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,10 @@
|
|||||||
<Field Name="Codigo">
|
<Field Name="Codigo">
|
||||||
<DataField>Codigo</DataField>
|
<DataField>Codigo</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
|
<Field Name="NumeroParte">
|
||||||
|
<DataField>NumeroParte</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
</Field>
|
</Field>
|
||||||
<Field Name="PS">
|
<Field Name="PS">
|
||||||
<DataField>PS</DataField>
|
<DataField>PS</DataField>
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
<DataField>Codigo</DataField>
|
<DataField>Codigo</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
</Field>
|
</Field>
|
||||||
|
<Field Name="NumeroParte">
|
||||||
|
<DataField>NumeroParte</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
<Field Name="PS">
|
<Field Name="PS">
|
||||||
<DataField>PS</DataField>
|
<DataField>PS</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
@@ -754,7 +758,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!Codigo.Value</Value>
|
<Value>=Fields!NumeroParte.Value</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>7pt</FontSize>
|
<FontSize>7pt</FontSize>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -776,6 +780,7 @@
|
|||||||
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
|
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
|
||||||
</Style>
|
</Style>
|
||||||
</Textbox>
|
</Textbox>
|
||||||
|
<rd:Selected>true</rd:Selected>
|
||||||
</CellContents>
|
</CellContents>
|
||||||
</TablixCell>
|
</TablixCell>
|
||||||
<TablixCell>
|
<TablixCell>
|
||||||
|
|||||||
@@ -62,6 +62,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HplImprimirResumen" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Resumen</asp:HyperLink>
|
<asp:HyperLink ID="HplImprimirResumen" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Resumen</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink ID="HplImprimirConsola" runat="server" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF Consola</asp:HyperLink>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HplDescargaXml" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Descargar XML SAT</asp:HyperLink>
|
<asp:HyperLink ID="HplDescargaXml" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Descargar XML SAT</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
@@ -673,7 +676,7 @@
|
|||||||
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
||||||
|
|
||||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" EmptyDataText="Aún no hay registros."
|
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" EmptyDataText="Aún no hay registros."
|
||||||
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" >
|
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Codigo" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" >
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
|
|||||||
@@ -507,10 +507,55 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'ImgFecha.Visible = True
|
'ImgFecha.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If CveMovimiento > 0 And CveConcepto.Contiene(8) And UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
ValidaUsaConsola()
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Property Consola As String
|
||||||
|
Get
|
||||||
|
If ViewState("Consola") Is Nothing Then
|
||||||
|
ViewState("Consola") = ""
|
||||||
|
End If
|
||||||
|
Return ViewState("Consola").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("Consola") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Function ValidaUsaConsola() As Boolean
|
||||||
|
Consola = ""
|
||||||
|
Dim Respuesta As Boolean = False
|
||||||
|
|
||||||
|
For Each gvRow As GridViewRow In GvM.Rows
|
||||||
|
If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then
|
||||||
|
Consola = "ARS600"
|
||||||
|
Respuesta = True
|
||||||
|
HplImprimirConsola.Visible = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then
|
||||||
|
Consola = "ARS800"
|
||||||
|
Respuesta = True
|
||||||
|
HplImprimirConsola.Visible = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Respuesta Then
|
||||||
|
HplImprimirConsola.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Alm&CveMovimiento={0}&Consola={1}", CveMovimiento, Consola)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return Respuesta
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region " PERMISOS PAGINAS "
|
#Region " PERMISOS PAGINAS "
|
||||||
Private Function PermiteGuardar() As Boolean
|
Private Function PermiteGuardar() As Boolean
|
||||||
Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False)
|
Return If(UsuarioActual.TienePermisoProceso(181) Or EsConsumoInterno, True, False)
|
||||||
@@ -909,9 +954,12 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
HplImprimirResumen.Visible = True
|
HplImprimirResumen.Visible = True
|
||||||
HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento)))
|
HplImprimirResumen.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=Almr&CveMovimiento={0}", CveMovimiento)))
|
||||||
|
|
||||||
|
|
||||||
CveCompra = Mov.CveCompra
|
CveCompra = Mov.CveCompra
|
||||||
CveConcepto = Mov.CveConcepto
|
CveConcepto = Mov.CveConcepto
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then
|
If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then
|
||||||
HplDescargaXml.Visible = True
|
HplDescargaXml.Visible = True
|
||||||
HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto"))))
|
HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), drM("TimbreTipoDocto"))))
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Option Explicit On
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports System.Web.Management
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
@@ -1847,6 +1848,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Private Sub GuardaVenta()
|
Private Sub GuardaVenta()
|
||||||
|
|
||||||
|
ValidaUsaConsola()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'' INICIA: VALIDACIONES
|
'' INICIA: VALIDACIONES
|
||||||
|
|
||||||
@@ -3112,6 +3116,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Msg.AppendFormat("Movimiento {2}: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimiento, Folio, If(TipoMovimiento = 1, "Salida", "Entrada"))
|
Msg.AppendFormat("Movimiento {2}: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimiento, Folio, If(TipoMovimiento = 1, "Salida", "Entrada"))
|
||||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||||
|
If Consola.Trim.Length > 0 Then
|
||||||
|
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Consola</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}&Consola={1}", CveMovimiento, Consola)))
|
||||||
|
End If
|
||||||
|
|
||||||
If CveMovimientoEntrada > 0 Then
|
If CveMovimientoEntrada > 0 Then
|
||||||
Msg.AppendFormat("<br/><br/> Movimiento Entrada (Traspaso): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
Msg.AppendFormat("<br/><br/> Movimiento Entrada (Traspaso): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
||||||
@@ -3162,6 +3169,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Msg.AppendFormat("<br/><br/>Recibir Usado: <b><a href=""/Inventarios/RecepcionUsados.aspx?CveRemision={0}"" target=""_blank"" class=""Texto"">Ir a Recepción de Usados</a></b>", CveVentaSurtir)
|
Msg.AppendFormat("<br/><br/>Recibir Usado: <b><a href=""/Inventarios/RecepcionUsados.aspx?CveRemision={0}"" target=""_blank"" class=""Texto"">Ir a Recepción de Usados</a></b>", CveVentaSurtir)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
|
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
Limpia()
|
Limpia()
|
||||||
@@ -4410,4 +4419,45 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Property Consola As String
|
||||||
|
Get
|
||||||
|
If ViewState("Consola") Is Nothing Then
|
||||||
|
ViewState("Consola") = ""
|
||||||
|
End If
|
||||||
|
Return ViewState("Consola").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("Consola") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Function ValidaUsaConsola() As Boolean
|
||||||
|
Consola = ""
|
||||||
|
Dim Respuesta As Boolean = False
|
||||||
|
|
||||||
|
For Each gvRow As GridViewRow In GvDatos.Rows
|
||||||
|
|
||||||
|
If gvRow.FCCheckBox("cbInv").Checked AndAlso gvRow.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||||
|
|
||||||
|
If gvRow.DataKey("Codigo").Contiene("404Q2", "404Q3", "405Q2", "405Q3", "306Q1", "306Q2") Then
|
||||||
|
Consola = "ARS600"
|
||||||
|
Respuesta = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
If gvRow.DataKey("Codigo").Contiene("106Q1A", "106Q2A", "106Q3", "106Q3WT", "106Q4", "106Q4A", "106Q5A", "106Q6A", "106Q7A") Then
|
||||||
|
Consola = "ARS800"
|
||||||
|
Respuesta = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return Respuesta
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -72,6 +72,9 @@ Partial Class RepNotasSinAlmacen
|
|||||||
CargaPermisos()
|
CargaPermisos()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaPermisos()
|
Private Sub CargaPermisos()
|
||||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||||
Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278)
|
Dim TienePermisoDesmarcar As Boolean = UsuarioActual.TienePermisoProceso(278)
|
||||||
@@ -88,6 +91,9 @@ Partial Class RepNotasSinAlmacen
|
|||||||
GvVentas.Columns(8).Visible = True
|
GvVentas.Columns(8).Visible = True
|
||||||
TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString
|
TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString
|
||||||
|
|
||||||
|
GvVentas.Columns(4).Visible = False
|
||||||
|
GvCompras.Columns(4).Visible = False
|
||||||
|
|
||||||
GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120)
|
GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120)
|
||||||
'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}"
|
'CType(GvVentas.Columns(2), Literal).DataFormatString = "{0:dd/MM/yyyy HH:mm}"
|
||||||
'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120)
|
'CType(GvVentas.Columns(2), Literal).ItemStyle.Width = Unit.Pixel(120)
|
||||||
|
|||||||
@@ -200,10 +200,15 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:HyperLinkField DataTextField="Folio" HeaderText="Folio" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/OS/OrdenesServicios.aspx?CveOS={0}" DataNavigateUrlFields="CveOS" />
|
<asp:HyperLinkField DataTextField="Folio" HeaderText="Folio" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/OS/OrdenesServicios.aspx?CveOS={0}" DataNavigateUrlFields="CveOS" />
|
||||||
<asp:BoundField DataField="Nombre" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Nombre" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||||
|
|
||||||
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="Concepto" HeaderText="Concepto" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Concepto" HeaderText="Concepto" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="EstatusOrdenServicio" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="EstatusOrdenServicio" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha Ingreso" DataFormatString="{0:d}" ItemStyle-Width="130px" />
|
<asp:BoundField DataField="FechaIng" HeaderText="Fecha Ingreso" DataFormatString="{0:d}" ItemStyle-Width="130px" />
|
||||||
|
|
||||||
|
<asp:BoundField DataField="Medico" HeaderText="Médico" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||||
|
<asp:BoundField DataField="Procedimiento" HeaderText="Procedimiento" ItemStyle-HorizontalAlign="Left" Visible="false" />
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-Width="120px" HeaderText="Fecha Servicio">
|
<asp:TemplateField ItemStyle-Width="120px" HeaderText="Fecha Servicio">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFechaServicio" runat="server" Visible="false" Text='<%# Eval("FechaCita", "{0:d}")%>'> ></asp:Literal>
|
<asp:Literal ID="LtlFechaServicio" runat="server" Visible="false" Text='<%# Eval("FechaCita", "{0:d}")%>'> ></asp:Literal>
|
||||||
|
|||||||
@@ -40,16 +40,13 @@ Partial Class OS_Asignaciones
|
|||||||
#End Region
|
#End Region
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
GvNA_ConfiguraColumnas()
|
||||||
CargaEstatusOS()
|
CargaEstatusOS()
|
||||||
'CargaUsuarios()
|
'CargaUsuarios()
|
||||||
CargaClientes()
|
CargaClientes()
|
||||||
CargaSubProyecto()
|
CargaSubProyecto()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
|
||||||
GvNA.Columns(2).HeaderText = "Hospital"
|
|
||||||
GvNA.Columns(7).HeaderText = "Fecha Cirugía"
|
|
||||||
GvNA.Columns(8).HeaderText = "Hora Cirugía"
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(171) Then
|
If UsuarioActual.TienePermisoProceso(171) Then
|
||||||
CargaOrdenesServiciosAsignadasXPersona()
|
CargaOrdenesServiciosAsignadasXPersona()
|
||||||
@@ -75,6 +72,9 @@ Partial Class OS_Asignaciones
|
|||||||
End If
|
End If
|
||||||
ObjEstatusPermisos.Dispose()
|
ObjEstatusPermisos.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
RegistraScript("
|
RegistraScript("
|
||||||
@@ -90,6 +90,26 @@ Partial Class OS_Asignaciones
|
|||||||
")
|
")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GvNA_ConfiguraColumnas()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||||
|
GvNA.Columns(3).Visible = False
|
||||||
|
GvNA.Columns(4).Visible = False
|
||||||
|
GvNA.Columns(5).Visible = False
|
||||||
|
GvNA.Columns(6).Visible = False
|
||||||
|
|
||||||
|
GvNA.Columns(7).Visible = True
|
||||||
|
GvNA.Columns(8).Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
GvNA.Columns(2).HeaderText = "Hospital"
|
||||||
|
GvNA.Columns(9).HeaderText = "Fecha Cirugía"
|
||||||
|
GvNA.Columns(10).HeaderText = "Hora Cirugía"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
#Region "C A R G A S "
|
#Region "C A R G A S "
|
||||||
Private Sub CargaSubProyecto()
|
Private Sub CargaSubProyecto()
|
||||||
DdlSubProyecto.Items.Clear()
|
DdlSubProyecto.Items.Clear()
|
||||||
@@ -184,7 +204,7 @@ Partial Class OS_Asignaciones
|
|||||||
Dim TecnicosResultado As New DataTable
|
Dim TecnicosResultado As New DataTable
|
||||||
|
|
||||||
If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then
|
If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then
|
||||||
TecnicosSubProyectos = ObjOS.DtResultados
|
TecnicosSubProyectos = ObjOS.DtResultados.FiltraParametros(" Estatus = 'True' ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtOSSubProyectos IsNot Nothing Then
|
If DtOSSubProyectos IsNot Nothing Then
|
||||||
|
|||||||
@@ -1309,8 +1309,6 @@
|
|||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtFolioRemisionModal">
|
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtFolioRemisionModal">
|
||||||
<asp:TextBox ID="TxtFolioRemisionModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox>
|
<asp:TextBox ID="TxtFolioRemisionModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtFolioRemisionModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtFolioRemisionModal"
|
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterialUtilizado"></asp:RequiredFieldValidator>
|
|
||||||
<label for="<%= TxtFolioRemisionModal.ClientID.ToString()%>">Folio:</label>
|
<label for="<%= TxtFolioRemisionModal.ClientID.ToString()%>">Folio:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,11 +33,6 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
background-color: #45b6af;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nodisponible {
|
.nodisponible {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 45px;
|
width: 45px;
|
||||||
@@ -74,8 +69,9 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="upPanel">
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpPanel">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
<%-- Datos de cliente y su viaje --%>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="portlet light xspadding bordered">
|
<div class="portlet light xspadding bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
@@ -158,6 +154,7 @@
|
|||||||
<label for="<%= TxtRuta.ClientID.ToString()%>">Ruta:</label>
|
<label for="<%= TxtRuta.ClientID.ToString()%>">Ruta:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
|
||||||
@@ -174,6 +171,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -181,8 +179,8 @@
|
|||||||
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha:</label>
|
<label for="<%= TxtFecha.ClientID.ToString()%>">Fecha:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlDestino" AppendDataBoundItems="true" DataTextField="Destino"
|
<asp:DropDownList ID="DdlDestino" AppendDataBoundItems="true" DataTextField="Destino"
|
||||||
AutoPostBack="true"
|
AutoPostBack="true"
|
||||||
@@ -196,10 +194,8 @@
|
|||||||
<label for="<%= DdlDestino.ClientID.ToString()%>">Destino:</label>
|
<label for="<%= DdlDestino.ClientID.ToString()%>">Destino:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold mx-1"></asp:Label>
|
<asp:Label runat="server" ID="TxtCosto" CssClass="text-success bold mx-1"></asp:Label>
|
||||||
<br />
|
<br />
|
||||||
@@ -209,14 +205,10 @@
|
|||||||
ValidationGroup="GrpGuardar"></asp:Button>
|
ValidationGroup="GrpGuardar"></asp:Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</div>
|
||||||
</asp:UpdatePanel>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<%-- Asientos --%>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="portlet light xspadding bordered margin-bottom-10">
|
<div class="portlet light xspadding bordered margin-bottom-10">
|
||||||
<table>
|
<table>
|
||||||
@@ -468,10 +460,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</ContentTemplate>
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -119,11 +119,11 @@ Partial Class Boletos
|
|||||||
ViewState("Importe") = ImporteR
|
ViewState("Importe") = ImporteR
|
||||||
TxtCosto.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
TxtCosto.Text = $"El precio de su boleto es ${ImporteR.FormatoNumero}"
|
||||||
BtnGuardar.Visible = True
|
BtnGuardar.Visible = True
|
||||||
upPanel.Visible = True
|
UpPanel.Visible = True
|
||||||
Else
|
Else
|
||||||
TxtCosto.Text = ""
|
TxtCosto.Text = ""
|
||||||
BtnGuardar.Visible = False
|
BtnGuardar.Visible = False
|
||||||
upPanel.Visible = False
|
UpPanel.Visible = False
|
||||||
ViewState("Importe") = 0
|
ViewState("Importe") = 0
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -156,9 +156,7 @@ Partial Class Boletos
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
AsientoSeleccionado = AsientoSeleccionado.Replace("A", "")
|
AsientoSeleccionado = AsientoSeleccionado.Replace("A", "")
|
||||||
Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
If ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then
|
||||||
|
|
||||||
If retorno > 1 Then
|
|
||||||
Alert("Boleto generado correctamente")
|
Alert("Boleto generado correctamente")
|
||||||
ObjTransporte.Commit()
|
ObjTransporte.Commit()
|
||||||
DdlPartida.SelectedValue = ""
|
DdlPartida.SelectedValue = ""
|
||||||
@@ -168,13 +166,14 @@ Partial Class Boletos
|
|||||||
TxtCelular.Text = ""
|
TxtCelular.Text = ""
|
||||||
TxtObservaciones.Text = ""
|
TxtObservaciones.Text = ""
|
||||||
AsientoSeleccionado = ""
|
AsientoSeleccionado = ""
|
||||||
upPanel.Update()
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ObjTransporte.RollBack()
|
ObjTransporte.RollBack()
|
||||||
Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError)
|
Alert($"No se pudo generar el boleto {ex}", TipoMensaje.MsgError)
|
||||||
Finally
|
Finally
|
||||||
ObjTransporte.Dispose()
|
ObjTransporte.Dispose()
|
||||||
|
CargaDatos()
|
||||||
|
UpPanel.Update()
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
404
Transportes/CatRutas.aspx
Normal file
404
Transportes/CatRutas.aspx
Normal file
@@ -0,0 +1,404 @@
|
|||||||
|
<%@ Page Language="VB" Title="Transportes V&A - Rutas" AutoEventWireup="false"
|
||||||
|
MasterPageFile="~/Site.master" CodeFile="CatRutas.aspx.vb"
|
||||||
|
Inherits="CatRutas" EnableEventValidation="true" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Rutas y Destinos
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.spaced {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-block: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.my-1 {
|
||||||
|
margin-block: 1rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpPanel" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<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 ItemStyle-CssClass="bold text-center" HeaderText="No. Ruta">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCveRuta" runat="server" Text='<%# Eval("CveRuta") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Ruta">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlRuta" runat="server" Text='<%# Eval("Ruta") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" 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>
|
||||||
|
<div class="spaced">
|
||||||
|
<div>
|
||||||
|
<asp:LinkButton ID="BtnAgregarDestino" runat="server" AlternateText="Agregar"
|
||||||
|
CssClass="btn btn-success btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-add'>Agregar</i>"
|
||||||
|
ToolTip="Agregar" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||||
|
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDestinos.ClientID) %>"
|
||||||
|
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDestinos.ClientID) %>"
|
||||||
|
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||||
|
</i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:GridView ID="GvDestinos" 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="CveDestino, Destino, EsNacional, Estatus, CveUsuario, FechaIng, CveEmpresa">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="No. Destino">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCveDestino" runat="server" Text='<%# Eval("CveDestino") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Destino">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" 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-CssClass="bold text-center" HeaderText="Nacional">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LtlEsNacional" runat="server" Text='<%# If(Eval("EsNacional").ToString = "True", "Sí", "No") %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="BtnEditarDestino" runat="server" AlternateText="Editar"
|
||||||
|
CssClass="btn btn-circle btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
<asp:LinkButton ID="BtnEliminarDestino" runat="server" AlternateText="Eliminar"
|
||||||
|
CssClass="btn btn-circle btn-sm red" OnClick="RemoveDestino" 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>
|
||||||
|
<%--Importes Tab--%>
|
||||||
|
<ajax:TabPanel ID="TabImportes" runat="server" HeaderText="Importes">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="spaced">
|
||||||
|
<div>
|
||||||
|
<asp:LinkButton ID="BtnAgregarImporte" runat="server" AlternateText="Agregar"
|
||||||
|
CssClass="btn btn-success btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-add'>Agregar</i>"
|
||||||
|
ToolTip="Agregar" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||||
|
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvImportes.ClientID) %>"
|
||||||
|
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvImportes.ClientID) %>"
|
||||||
|
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||||
|
</i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="No. Importe">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCveDestinoTarifa" runat="server" Text='<%# Eval("CveDestinoTarifa")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Ruta">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCveRuta" runat="server" Text='<%# Eval("Ruta")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Destino">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Salida">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlSalida" runat="server" Text='<%# Eval("Salida")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-CssClass="bold text-center" HeaderText="Importe">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="BtnEditarImporte" runat="server" AlternateText="Editar"
|
||||||
|
CssClass="btn btn-circle btn-sm green" OnClick="MostrarModal" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
<asp:LinkButton ID="BtnEliminarImporte" runat="server" AlternateText="Eliminar"
|
||||||
|
CssClass="btn btn-circle btn-sm red" OnClick="RemoveImporte" 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>
|
||||||
|
</ajax:TabContainer>
|
||||||
|
</asp:Panel>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<div id="Modal" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-dialog rowpadding">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<asp:Label runat="server" ID="ModalLabel"></asp:Label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<%-- Ruta --%>
|
||||||
|
<asp:Panel runat="server" ID="PnRuta" Visible="False">
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Nombre de la ruta</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtRuta" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVRuta" runat="server" ControlToValidate="TxtRuta"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ruta''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCERuta" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVRuta" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Estatus:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:DropDownList ID="DdlRutaEstatus" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
AppendDataBoundItems="true"
|
||||||
|
Width="99.9%">
|
||||||
|
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Activo" Value="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Inactivo" Value="False"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVRutaEstatus" runat="server" ControlToValidate="DdlRutaEstatus"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCERutaEstatus" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVRutaEstatus" Width="400px" BehaviorID="_content_VCERutaEstatus">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
<%-- Destino --%>
|
||||||
|
<asp:Panel ID="PnDestino" runat="server" Visible="false">
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Nombre del Destino</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtDestino" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="TxtDestino"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Destino''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEDestino" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVDestino" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Nacional:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:DropDownList ID="DdlEsNacional" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
AppendDataBoundItems="true"
|
||||||
|
Width="99.9%">
|
||||||
|
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Sí" Value="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="No" Value="False"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVEsNacional" runat="server" ControlToValidate="DdlEsNacional"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nacional''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEEsNacional" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVEsNacional" Width="400px" BehaviorID="_content_VCEEsNacional">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Estatus:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:DropDownList ID="DdlDestinoEstatus" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
AppendDataBoundItems="true"
|
||||||
|
Width="99.9%">
|
||||||
|
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Activo" Value="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Inactivo" Value="False"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDestinoEstatus" runat="server" ControlToValidate="DdlDestinoEstatus"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEDestinoEstatus" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVDestinoEstatus" Width="400px" BehaviorID="_content_VCEDestinoEstatus">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
<%-- Importes --%>
|
||||||
|
<asp:Panel ID="PnImporte" runat="server" Visible="false">
|
||||||
|
<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"
|
||||||
|
Width="200px" runat="server">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVRutas" runat="server" ControlToValidate="DdlRutas"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ruta''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCERutas" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVRutas" Width="400px" BehaviorID="_content_VCERutas">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Partida:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:DropDownList ID="DdlOrigen" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
AppendDataBoundItems="true"
|
||||||
|
Width="99.9%" DataTextField="Destino"
|
||||||
|
DataValueField="CveDestino">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVOrigen" runat="server" ControlToValidate="DdlOrigen"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Partida''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEOrigen" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVOrigen" Width="400px" BehaviorID="_content_VCEOrigen">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Destino:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:DropDownList ID="DdlFinal" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
AppendDataBoundItems="true"
|
||||||
|
Width="99.9%" DataTextField="Destino"
|
||||||
|
DataValueField="CveDestino">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFinal" runat="server" ControlToValidate="DdlFinal"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Origen''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEFinal" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVFinal" Width="400px" BehaviorID="_content_VCEFinal">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">Importe</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox type="number" ID="TxtImporte" runat="server" MaxLength="7" Width="100%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVImporte" runat="server" ControlToValidate="TxtImporte"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="VCOImporte"
|
||||||
|
TargetControlID="RFVDestino" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
</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"
|
||||||
|
ValidationGroup="GrpGuardar" Visible="false"></asp:Button>
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
|
|
||||||
291
Transportes/CatRutas.aspx.vb
Normal file
291
Transportes/CatRutas.aspx.vb
Normal file
@@ -0,0 +1,291 @@
|
|||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Extensiones.ModExtensiones
|
||||||
|
|
||||||
|
Partial Class CatRutas
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property Cve As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("Cve").ToString().ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("Cve") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
ViewState("Cve") = 0
|
||||||
|
InicializarCombos()
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
|
||||||
|
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
|
||||||
|
'Lista Destinos'
|
||||||
|
If ObjRutas.GetDestinos() Then
|
||||||
|
|
||||||
|
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||||
|
GvDestinos.DataSource = ObjRutas.DtResultados
|
||||||
|
GvDestinos.DataBind()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
'Lista Importes'
|
||||||
|
If ObjRutas.GetDestinosTarifas(-1, -1) Then
|
||||||
|
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||||
|
GvImportes.DataSource = ObjRutas.DtResultados
|
||||||
|
GvImportes.DataBind()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpPanel.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub InicializarCombos()
|
||||||
|
Dim ObjDestinos As New ClsTransportes()
|
||||||
|
|
||||||
|
If ObjDestinos.GetDestinos() Then
|
||||||
|
|
||||||
|
If ObjDestinos.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
DdlOrigen.DataSource = ObjDestinos.DtResultados
|
||||||
|
DdlOrigen.DataBind()
|
||||||
|
DdlOrigen.Items.Insert(0, New ListItem("Seleccione Partida", ""))
|
||||||
|
|
||||||
|
DdlFinal.DataSource = ObjDestinos.DtResultados
|
||||||
|
DdlFinal.DataBind()
|
||||||
|
DdlFinal.Items.Insert(0, New ListItem("Seleccione Destino", ""))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjDestinos.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub MostrarModal(sender As Object, e As EventArgs)
|
||||||
|
TxtRuta.Text = ""
|
||||||
|
DdlRutaEstatus.SelectedValue = ""
|
||||||
|
TxtDestino.Text = ""
|
||||||
|
DdlEsNacional.SelectedValue = ""
|
||||||
|
DdlDestinoEstatus.SelectedValue = ""
|
||||||
|
DdlOrigen.SelectedValue = ""
|
||||||
|
DdlFinal.SelectedValue = ""
|
||||||
|
TxtImporte.Text = ""
|
||||||
|
BtnAddRuta.Visible = False
|
||||||
|
BtnAddDestino.Visible = False
|
||||||
|
BtnAddImporte.Visible = False
|
||||||
|
PnRuta.Visible = False
|
||||||
|
PnDestino.Visible = False
|
||||||
|
PnImporte.Visible = False
|
||||||
|
Dim id As String = DirectCast(sender, LinkButton).ID
|
||||||
|
|
||||||
|
If id.Contains("Editar") Then
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
Select Case id
|
||||||
|
Case "BtnEditarRuta"
|
||||||
|
ModalLabel.Text = "Editar Ruta"
|
||||||
|
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")
|
||||||
|
DdlEsNacional.SelectedValue = GvRow.DataKey("EsNacional")
|
||||||
|
DdlDestinoEstatus.SelectedValue = GvRow.DataKey("Estatus")
|
||||||
|
PnDestino.Visible = True
|
||||||
|
BtnAddDestino.Visible = True
|
||||||
|
BtnAddDestino.Text = "Editar"
|
||||||
|
ViewState("Cve") = GvRow.DataKey("CveDestino").ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
Case "BtnEditarImporte"
|
||||||
|
ModalLabel.Text = "Editar Importe"
|
||||||
|
DdlRutas.SelectedValue = GvRow.DataKey("CveRuta")
|
||||||
|
DdlOrigen.SelectedValue = GvRow.DataKey("CveDestinoOrigen")
|
||||||
|
DdlFinal.SelectedValue = GvRow.DataKey("CveDestinoFinal")
|
||||||
|
TxtImporte.Text = GvRow.DataKey("Importe")
|
||||||
|
PnImporte.Visible = True
|
||||||
|
BtnAddImporte.Visible = True
|
||||||
|
BtnAddImporte.Text = "Editar"
|
||||||
|
ViewState("Cve") = GvRow.DataKey("CveDestinoTarifa").ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
|
||||||
|
If id.Contains("Agregar") Then
|
||||||
|
Select Case id
|
||||||
|
Case "BtnAgregarRuta"
|
||||||
|
ModalLabel.Text = "Agregar Ruta"
|
||||||
|
PnRuta.Visible = True
|
||||||
|
BtnAddRuta.Visible = True
|
||||||
|
BtnAddRuta.Text = "Guardar"
|
||||||
|
Case "BtnAgregarDestino"
|
||||||
|
ModalLabel.Text = "Agregar Destino"
|
||||||
|
PnDestino.Visible = True
|
||||||
|
BtnAddDestino.Visible = True
|
||||||
|
BtnAddDestino.Text = "Guardar"
|
||||||
|
Case "BtnAgregarImporte"
|
||||||
|
ModalLabel.Text = "Agregar Importe"
|
||||||
|
PnImporte.Visible = True
|
||||||
|
BtnAddImporte.Visible = True
|
||||||
|
BtnAddImporte.Text = "Guardar"
|
||||||
|
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
UpModal.Update()
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('show');", "Modal"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
If ObjRuta.RemoveRuta(GvRow.DataKey("CveRuta").ToEntero) Then
|
||||||
|
Alert("Ruta eliminada correctamente")
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjRuta.Dispose()
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Destinos"
|
||||||
|
Protected Sub AddDestino(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim ObjDestino As New ClsTransportes
|
||||||
|
ObjDestino.IniciaTransacSQL()
|
||||||
|
Try
|
||||||
|
If BtnAddDestino.Text = "Guardar" Then
|
||||||
|
If ObjDestino.AddDestino(TxtDestino.Text, DdlDestinoEstatus.SelectedValue, DdlEsNacional.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) > 1 Then
|
||||||
|
ObjDestino.Commit()
|
||||||
|
Alert("Destino agregado correctamente.")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If BtnAddDestino.Text = "Editar" Then
|
||||||
|
If ObjDestino.UpdateDestino(Cve, TxtDestino.Text, DdlDestinoEstatus.SelectedValue, DdlEsNacional.SelectedValue, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
ObjDestino.Commit()
|
||||||
|
Alert("Destino actualizado correctamente.")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ObjDestino.RollBack()
|
||||||
|
Finally
|
||||||
|
CargaDatos()
|
||||||
|
ObjDestino.Dispose()
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Protected Sub RemoveDestino(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
Dim ObjDestino As New ClsTransportes
|
||||||
|
|
||||||
|
If ObjDestino.RemoveDestino(GvRow.DataKey("CveDestino").ToEntero) Then
|
||||||
|
Alert("Destino eliminado correctamente")
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjDestino.Dispose()
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Importes"
|
||||||
|
Protected Sub AddImporte(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
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
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ObjImporte.RollBack()
|
||||||
|
Finally
|
||||||
|
CargaDatos()
|
||||||
|
ObjImporte.Dispose()
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Protected Sub RemoveImporte(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
Dim ObjImporte As New ClsTransportes
|
||||||
|
|
||||||
|
If ObjImporte.RemoveDestinosTarifas(GvRow.DataKey("CveDestinoTarifa").ToEntero) Then
|
||||||
|
Alert("Importe eliminada correctamente")
|
||||||
|
CargaDatos()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjImporte.Dispose()
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
CodeFile="RepContratos.aspx.vb"
|
CodeFile="RepContratos.aspx.vb"
|
||||||
Inherits="ListadoContratos" %>
|
Inherits="ListadoContratos" %>
|
||||||
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||||
Listado de Contratos
|
Listado de Contratos
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
@@ -30,41 +30,155 @@
|
|||||||
.boton {
|
.boton {
|
||||||
background: red;
|
background: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.consulta {
|
||||||
|
padding: 1rem 2rem;
|
||||||
|
background-color: #95A5A6;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom:1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.consulta_campo {
|
||||||
|
display: flex;
|
||||||
|
gap: 1rem;
|
||||||
|
align-items: center;
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.consulta_campo label {
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||||
<asp:UpdatePanel ID="UPPAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
<asp:UpdatePanel ID="UPPAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LBExcel" runat="server"><i class="fa fa-file-excel-o"></i>Generar Excel</asp:LinkButton>
|
<asp:LinkButton ID="LBExcel" runat="server"><i class="fa fa-file-excel-o"></i>Generar Excel</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LBExcel" />
|
<asp:PostBackTrigger ControlID="LBExcel" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="consulta">
|
||||||
|
<div class="consulta_campo">
|
||||||
|
<label>Cliente</label>
|
||||||
|
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||||
|
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||||
|
UsaWebService="true"></ADS:Dropdownlost>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
<div class="consulta_campo">
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>"
|
<label>Estatus:</label>
|
||||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
<div class="col-md-8">
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>"
|
<asp:DropDownList ID="DdlEstatusConsulta" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
AppendDataBoundItems="true"
|
||||||
</i></a>
|
Width="100%">
|
||||||
</div>
|
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Vigente" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Terminado" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Cancelado" Value="3"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVEstatusConsulta" runat="server" ControlToValidate="DdlEstatusConsulta"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEEstatusConsulta" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVEstatusConsulta" Width="400px">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
<div class="consulta_campo">
|
||||||
<ContentTemplate>
|
<label>Fecha Inicial:</label>
|
||||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy">
|
||||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer ">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy"
|
||||||
<Columns>
|
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="GrpConsulta"></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="GrpConsulta"></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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="consulta_campo">
|
||||||
|
<label>Fecha Final:</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" 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="GrpConsulta"></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="GrpConsulta"></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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary" OnClick="Consultar"
|
||||||
|
ValidationGroup="GrpConsulta" />
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvContratos" 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="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, EstatusContrato, CveAF">
|
||||||
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Folio">
|
<asp:TemplateField HeaderText="Folio">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -109,206 +223,211 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-CssClass="bold">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("EstatusContrato").ToString = "1", "Vigente", If(Eval("EstatusContrato").ToString = "2", "Terminado", "Cancelado")) %>'
|
||||||
CssClass="btn btn-circle btn-sm green" OnClick="UpdateContrato" Text="<i class='fa fa-pencil'></i>" />
|
CssClass='<%# If(Eval("EstatusContrato").ToString = "1", "text-success", If(Eval("EstatusContrato").ToString = "2", "text-info", "text-danger")) %>'></asp:Label>
|
||||||
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
|
</ItemTemplate>
|
||||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveContrato" Text="<i class='fa fa-trash'></i>"
|
</asp:TemplateField>
|
||||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar"
|
|
||||||
data-btn-ok-label="si" />
|
|
||||||
|
|
||||||
</ItemTemplate>
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||||
</asp:TemplateField>
|
<ItemTemplate>
|
||||||
</Columns>
|
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||||
</asp:GridView>
|
CssClass="btn btn-circle btn-sm green" OnClick="UpdateContrato" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
|
||||||
|
CssClass="btn btn-circle btn-sm red" OnClick="RemoveContrato" 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>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-dialog rowpadding">
|
||||||
|
<div class="modal-content">
|
||||||
|
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title" id="myModalLabel" runat="server">Agregar Contrato</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row my-1">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label>Cliente</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
|
||||||
|
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||||
|
UsaWebService="true"></ADS:Dropdownlost>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Servicio:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||||
|
TextMode="MultiLine"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVDescripcion" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Lugar de Salida:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVUbicacion" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Fecha Salida:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="input-group input-sm input-small date date-picker">
|
||||||
|
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||||
|
type="datetime-local"></asp:TextBox>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Fecha Regreso:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="input-group input-sm input-small date date-picker">
|
||||||
|
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||||
|
type="datetime-local"></asp:TextBox>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">
|
||||||
|
<asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
|
||||||
|
class="col-md-8">
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||||
|
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
Width="100%" runat="server">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTipoAF"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVTransporte" Width="400px">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row my-1">
|
||||||
|
<label class="col-md-4">
|
||||||
|
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||||
|
class="col-md-8">
|
||||||
|
|
||||||
|
<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:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVChofer" Width="400px">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Observaciones:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||||
|
TextMode="MultiLine"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVObservaciones" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Costo dólares:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Costo pesos:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Anticipo:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" runat="server" type="decimal"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<asp:Label ID="LbEstatus" runat="server" class="col-md-4" Visible="false">Estatus:</asp:Label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:DropDownList ID="DdlEstatusContrato" runat="server" Visible="false" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
AppendDataBoundItems="true"
|
||||||
|
Width="100%">
|
||||||
|
<asp:ListItem Text="Vigente" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Terminado" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Cancelado" Value="3"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnGuardar" OnClick="AddContrato" runat="server" CssClass="btn btn-primary"
|
||||||
|
Text="Guardar"
|
||||||
|
ValidationGroup="GrpGuardar"></asp:Button>
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-dialog rowpadding">
|
|
||||||
<div class="modal-content">
|
|
||||||
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
<h4 class="modal-title" id="myModalLabel" runat="server">Agregar Contrato</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row" >
|
|
||||||
<div class="col-md-4">
|
|
||||||
<label>Cliente</label>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" UsaWebService="true"></ADS:Dropdownlost>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-4">Servicio:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
|
||||||
TextMode="MultiLine"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVDescripcion" Width="100%">
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-4">Lugar de Salida:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVUbicacion" Width="100%" >
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-4">Fecha Salida:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="input-group input-sm input-small date date-picker">
|
|
||||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
|
||||||
type="datetime-local"></asp:TextBox>
|
|
||||||
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVTxtFechaSalida" Width="100%" >
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-4">Fecha Regreso:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="input-group input-sm input-small date date-picker">
|
|
||||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
|
||||||
type="datetime-local"></asp:TextBox>
|
|
||||||
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVTxtFechaRegreso" Width="100%" >
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-4">
|
|
||||||
<asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
|
|
||||||
class="col-md-8">
|
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
|
||||||
DataValueField="CveTipoActivoFijo" Class="table-group-action-input form-control input-inline select2me"
|
|
||||||
Width="100%" runat="server">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTipoAF"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETransporte" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVTransporte" Width="400px" >
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row" runat="server" visible="false">
|
|
||||||
<label class="col-md-4">
|
|
||||||
<asp:Label runat="server" Text="Unidad:"></asp:Label></label><div
|
|
||||||
class="col-md-8">
|
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlAF" AppendDataBoundItems="true" DataTextField="Descripcion"
|
|
||||||
DataValueField="CveAF" Class="table-group-action-input form-control input-inline select2me"
|
|
||||||
Width="100%" runat="server">
|
|
||||||
</asp:DropDownList>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row margin-bottom-5">
|
|
||||||
<label class="col-md-4">
|
|
||||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
|
||||||
class="col-md-8">
|
|
||||||
|
|
||||||
<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:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVChofer" Width="400px" >
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-4">Observaciones:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
|
||||||
TextMode="MultiLine"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVObservaciones" Width="100%" >
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-4">Costo dólares:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-4">Costo pesos:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-4">Anticipo:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" runat="server" type="decimal"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:Button ID="BtnGuardar" OnClick="AddContrato" runat="server" CssClass="btn btn-primary"
|
|
||||||
Text="Guardar"
|
|
||||||
ValidationGroup="GrpGuardar"></asp:Button>
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
Imports System.Data.SqlClient
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Extensiones.ModExtensiones
|
Imports Extensiones.ModExtensiones
|
||||||
|
|
||||||
@@ -22,15 +23,6 @@ Partial Class ListadoContratos
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub InicializaCombos()
|
Private Sub InicializaCombos()
|
||||||
'Lista Activos Fijos'
|
|
||||||
'Dim ObjAF As New ClsAF()
|
|
||||||
'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
|
|
||||||
' If ObjAF.DtResultados.Rows.Count > 0 Then
|
|
||||||
' DdlAF.DataSource = ObjAF.DtResultados
|
|
||||||
' DdlAF.Items.Insert(0, New ListItem("Seleccione", ""))
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'ObjAF.Dispose()
|
|
||||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||||
DdlTipoAF.DataBind()
|
DdlTipoAF.DataBind()
|
||||||
DdlTipoAF.Items.Insert(0, New ListItem("Seleccione", ""))
|
DdlTipoAF.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||||
@@ -40,7 +32,6 @@ Partial Class ListadoContratos
|
|||||||
DdlChofer.DataBind()
|
DdlChofer.DataBind()
|
||||||
DdlChofer.Items.Insert(0, New ListItem("Seleccione", ""))
|
DdlChofer.Items.Insert(0, New ListItem("Seleccione", ""))
|
||||||
|
|
||||||
|
|
||||||
UpModal.Update()
|
UpModal.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
@@ -48,14 +39,15 @@ Partial Class ListadoContratos
|
|||||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||||
GvContratos.DataSource = ObjContratos.DtResultados
|
GvContratos.DataSource = ObjContratos.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjContratos.Dispose()
|
|
||||||
GvContratos.DataBind()
|
GvContratos.DataBind()
|
||||||
UpTitulos.Update()
|
UpTitulos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional CveCliente As Integer = 0, Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional Chofer As String = "")
|
Protected Sub MostrarModal(Optional Descripcion As String = "", Optional FechaSalida As String = "", Optional FechaRegreso As String = "", Optional Observaciones As String = "", Optional Ubicacion As String = "", Optional Transporte As String = "", Optional CveCliente As Integer = 0, Optional Dolares As String = "", Optional Pesos As String = "", Optional Anticipo As String = "", Optional Boton As String = "Guardar", Optional Chofer As String = "")
|
||||||
|
|
||||||
|
DdlClientes.SelectedText = Cliente
|
||||||
TxtDescripcion.Text = Descripcion
|
TxtDescripcion.Text = Descripcion
|
||||||
|
TxtUbicacion.Text = Ubicacion
|
||||||
TxtFechaSalida.Text = FechaSalida
|
TxtFechaSalida.Text = FechaSalida
|
||||||
TxtFechaRegreso.Text = FechaRegreso
|
TxtFechaRegreso.Text = FechaRegreso
|
||||||
TxtObservaciones.Text = Observaciones
|
TxtObservaciones.Text = Observaciones
|
||||||
@@ -64,10 +56,17 @@ Partial Class ListadoContratos
|
|||||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial")
|
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial")
|
||||||
DdlClientes.SelectedValue = CveCliente.ToString
|
DdlClientes.SelectedValue = CveCliente.ToString
|
||||||
DdlChofer.SelectedValue = Chofer
|
DdlChofer.SelectedValue = Chofer
|
||||||
|
TxtObservaciones.Text = Observaciones
|
||||||
TxtDolares.Text = Dolares
|
TxtDolares.Text = Dolares
|
||||||
TxtPesos.Text = Pesos
|
TxtPesos.Text = Pesos
|
||||||
TxtAnticipo.Text = Anticipo
|
TxtAnticipo.Text = Anticipo
|
||||||
BtnGuardar.Text = Boton
|
BtnGuardar.Text = Boton
|
||||||
|
If EstatusContrato <> "" Then
|
||||||
|
LbEstatus.Visible = True
|
||||||
|
DdlEstatusContrato.Visible = True
|
||||||
|
DdlEstatusContrato.SelectedValue = EstatusContrato
|
||||||
|
End If
|
||||||
|
'DdlEstatusContrato.Text = EstatusContrato
|
||||||
myModalLabel.InnerHtml = $"{Boton} Contrato"
|
myModalLabel.InnerHtml = $"{Boton} Contrato"
|
||||||
UpModal.Update()
|
UpModal.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||||
@@ -91,49 +90,54 @@ Partial Class ListadoContratos
|
|||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
|
|
||||||
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
||||||
CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero
|
CveEstatusInicial = ObjContratos.DtResultados.FiltroPrimeroValor("CveContratoEstatus", "TipoEstatus=1").ToEntero
|
||||||
End If
|
End If
|
||||||
'Agregar contrato
|
'Agregar contrato
|
||||||
If BtnGuardar.Text = "Guardar" Then
|
If BtnGuardar.Text = "Guardar" Then
|
||||||
CveContratoHijo = ObjContratos.AddContratos("", 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:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero)
|
CveContratoHijo = ObjContratos.AddContratos("", 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:=2, CveContratosEstatus:=1, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero)
|
||||||
If CveContratoHijo > 0 Then
|
If CveContratoHijo > 0 Then
|
||||||
ObjContratos.Commit()
|
ObjContratos.Commit()
|
||||||
Alert("Agregado Correctamente.")
|
Alert("Agregado Correctamente.")
|
||||||
End If
|
End If
|
||||||
Else
|
End If
|
||||||
'Actualizar contrato
|
|
||||||
If BtnGuardar.Text = "Editar" Then
|
|
||||||
retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, 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:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero)
|
|
||||||
|
|
||||||
If retorno Then
|
'Actualizar contrato
|
||||||
ObjContratos.Commit()
|
If BtnGuardar.Text = "Editar" Then
|
||||||
Alert("Actualizado Correctamente.")
|
retorno = ObjContratos.UpdateContratos(CveContrato, "", TxtDescripcion.Text, "", -1, 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:=2, CveContratosEstatus:=1, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveTipoAF:=DdlTransporte.SelectedValue.ToEntero)
|
||||||
End If
|
|
||||||
End If
|
ObjContratos.Commit()
|
||||||
|
Alert("Actualizado Correctamente.")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
TxtDescripcion.Text = ""
|
TxtDescripcion.Text = ""
|
||||||
TxtFechaSalida.Text = ""
|
TxtFechaSalida.Text = ""
|
||||||
TxtFechaRegreso.Text = ""
|
TxtFechaRegreso.Text = ""
|
||||||
TxtObservaciones.Text = ""
|
TxtObservaciones.Text = ""
|
||||||
TxtUbicacion.Text = ""
|
TxtUbicacion.Text = ""
|
||||||
DdlClientes.SelectedText = ""
|
DdlClientes.SelectedText = ""
|
||||||
'DdlTipoAF.SelectedValue = "-1"
|
DdlTransporte.SelectedValue = ""
|
||||||
'DdlChofer.SelectedValue = "-1"
|
DdlChofer.SelectedValue = ""
|
||||||
TxtDolares.Text = ""
|
TxtDolares.Text = ""
|
||||||
TxtPesos.Text = ""
|
TxtPesos.Text = ""
|
||||||
TxtAnticipo.Text = ""
|
TxtAnticipo.Text = ""
|
||||||
BtnGuardar.Text = "Guardar"
|
BtnGuardar.Text = "Guardar"
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError)
|
||||||
|
ObjContratos.RollBack()
|
||||||
|
Finally
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
ViewState("CveContrato") = GvRow.DataKey("CveContrato")
|
ViewState("CveContrato") = GvRow.DataKey("CveContrato")
|
||||||
MostrarModal(
|
MostrarModal(
|
||||||
Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("DescripcionContrato"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), CveCliente:=GvRow.DataKey("CveCliente").ToEntero, Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer"))
|
Descripcion:=GvRow.DataKey("DescripcionContrato"), FechaSalida:=GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), FechaRegreso:=GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T"), Observaciones:=GvRow.DataKey("DescripcionContrato"), Ubicacion:=GvRow.DataKey("Ubicacion"), Transporte:=GvRow.DataKey("CveTipoAF"), Cliente:=GvRow.DataKey("CveCliente"), Dolares:=GvRow.DataKey("Importe"), Pesos:=GvRow.DataKey("ImporteMax"), Anticipo:=GvRow.DataKey("ImporteMin"), Boton:="Editar", Chofer:=GvRow.DataKey("CveChofer"))
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub RemoveContrato(sender As Object, e As EventArgs)
|
Protected Sub RemoveContrato(sender As Object, e As EventArgs)
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
@@ -150,4 +154,34 @@ Partial Class ListadoContratos
|
|||||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If DdlClientesConsulta.SelectedValue = "" Then
|
||||||
|
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim cliente As Integer = DdlClientesConsulta.SelectedValue.ToEntero
|
||||||
|
Dim estatus As Integer = DdlEstatusConsulta.SelectedValue.ToEntero
|
||||||
|
Dim fechaInicial As DateTime = txtFechaI.Text.ToDate
|
||||||
|
Dim fechaFinal As DateTime = txtFechaF.Text.ToDate
|
||||||
|
|
||||||
|
Dim query As String = "SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente WHERE C.CveCliente = @Cliente AND EstatusContrato = @Estatus AND FechaInicial BETWEEN @FechaInicial AND @FechaFinal"
|
||||||
|
|
||||||
|
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||||
|
Using command As New SqlCommand(query, connection)
|
||||||
|
command.Parameters.AddWithValue("@Cliente", cliente)
|
||||||
|
command.Parameters.AddWithValue("@Estatus", estatus)
|
||||||
|
command.Parameters.AddWithValue("@FechaInicial", fechaInicial)
|
||||||
|
command.Parameters.AddWithValue("@FechaFinal", fechaFinal)
|
||||||
|
|
||||||
|
connection.Open()
|
||||||
|
Dim reader As SqlDataReader = command.ExecuteReader()
|
||||||
|
GvContratos.DataSource = reader
|
||||||
|
GvContratos.DataBind()
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
|
||||||
|
UpTitulos.Update()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -10,6 +10,41 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.my-1 {
|
||||||
|
margin-block: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.consulta {
|
||||||
|
padding: 1rem 2rem;
|
||||||
|
background-color: #95A5A6;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.consulta_campo {
|
||||||
|
display: flex;
|
||||||
|
gap: 1rem;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.consulta_campo label {
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.miGrid {
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.miGrid thead {
|
||||||
|
color: black;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
@@ -20,8 +55,8 @@
|
|||||||
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:Panel ID="PnlGeneral" runat="server">
|
<asp:Panel ID="PnlGeneral" runat="server">
|
||||||
<%--Calendario Tab--%>
|
<%--Calendario Tab--%>
|
||||||
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
<ajax:TabContainer ID="Tab" runat="server" Width="100%" ActiveTabIndex="0">
|
||||||
|
|
||||||
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario">
|
<ajax:TabPanel ID="TabAlta" runat="server" HeaderText="Calendario">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -65,15 +100,121 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<%--Contratos Tab--%>
|
<%--Contratos Tab--%>
|
||||||
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos">
|
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se Encontró Contrato Registrado"
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
<ContentTemplate>
|
||||||
data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax ">
|
<div class="consulta">
|
||||||
<Columns>
|
<div class="consulta_campo">
|
||||||
|
<label>Cliente</label>
|
||||||
|
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||||
|
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||||
|
UsaWebService="true"></ADS:Dropdownlost>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="consulta_campo">
|
||||||
|
<label>Estatus:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:DropDownList ID="DdlEstatusConsulta" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
AppendDataBoundItems="true"
|
||||||
|
Width="100%">
|
||||||
|
<asp:ListItem Text="Seleccione" Value="" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Vigente" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Terminado" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Cancelado" Value="3"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVEstatusConsulta" runat="server" ControlToValidate="DdlEstatusConsulta"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Transporte''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEEstatusConsulta" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVEstatusConsulta" Width="400px">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="consulta_campo">
|
||||||
|
<label>Fecha Inicial:</label>
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy">
|
||||||
|
<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="GrpConsulta"></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="GrpConsulta"></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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="consulta_campo">
|
||||||
|
<label>Fecha Final:</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" 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="GrpConsulta"></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="GrpConsulta"></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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||||
|
OnClick="Consultar"
|
||||||
|
ValidationGroup="GrpConsulta" />
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<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, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, EstatusContrato, CveAF">
|
||||||
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Folio">
|
<asp:TemplateField HeaderText="Folio">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -95,11 +236,11 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Cliente">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Chofer">
|
<asp:TemplateField HeaderText="Chofer">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -121,106 +262,119 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
</Columns>
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-CssClass="bold">
|
||||||
</asp:GridView>
|
<ItemTemplate>
|
||||||
</ContentTemplate>
|
<asp:Label ID="LtlEstatus" runat="server" Text='<%# If(Eval("EstatusContrato").ToString = "1", "Vigente", If(Eval("EstatusContrato").ToString = "2", "Terminado", "Cancelado")) %>'></asp:Label>
|
||||||
</ajax:TabPanel>
|
</ItemTemplate>
|
||||||
</ajax:TabContainer>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar" CssClass="miGrid"
|
||||||
|
OnClick="UpdateModal" Text="Editar" />
|
||||||
|
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
</ajax:TabContainer>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
|
|
||||||
<div id="ModalActualizar" class="modal ADS fade" role="dialog">
|
<div id="ModalActualizar" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog rowpadding">
|
||||||
<div id="UpAddChofer" class="modal-content rowpadding" tabindex="-1"
|
<div class="modal-content">
|
||||||
runat="server">
|
|
||||||
<contenttemplate>
|
<div class="modal-header">
|
||||||
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<span aria-hidden="true">×</span>
|
||||||
<span aria-hidden="true">×</span>
|
</button>
|
||||||
</button>
|
<h4 class="modal-title" id="myModalLabel" runat="server">Editar Contrato</h4>
|
||||||
<h4 class="modal-title" id="myModalLabel" runat="server">Actualizar Contrato</h4>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row my-1">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<label>Cliente</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
|
||||||
|
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
||||||
|
UsaWebService="true"></ADS:Dropdownlost>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Servicio:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
||||||
|
TextMode="MultiLine"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVDescripcion" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
<div class="portlet-body">
|
<div class="row">
|
||||||
<div class="row">
|
<label class="col-md-4">Lugar de Salida:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-8">
|
||||||
<label>Cliente</label>
|
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
||||||
</div>
|
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
||||||
<div class="col-md-8">
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
||||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente"
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
|
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
||||||
UsaWebService="true"></ADS:Dropdownlost>
|
TargetControlID="RFVUbicacion" Width="100%">
|
||||||
</div>
|
</ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-4">Fecha Salida:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="input-group input-sm input-small date date-picker">
|
||||||
|
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||||
|
type="datetime-local"></asp:TextBox>
|
||||||
|
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
||||||
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
||||||
|
TargetControlID="RFVTxtFechaSalida" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row my-1">
|
<div class="row">
|
||||||
<label class="col-md-4 bold">Servicio:</label>
|
<label class="col-md-4">Fecha Regreso:</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox ID="TxtDescripcion" runat="server" MaxLength="70" Width="100%"
|
<div class="input-group input-sm input-small date date-picker">
|
||||||
TextMode="MultiLine"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||||
<asp:RequiredFieldValidator ID="RFVDescripcion" runat="server" ControlToValidate="TxtDescripcion"
|
type="datetime-local"></asp:TextBox>
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEDescripcion" runat="server" HighlightCssClass="vco"
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
||||||
TargetControlID="RFVDescripcion" Width="100%" BehaviorID="_content_VCEDescripcion">
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
</ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
||||||
</div>
|
TargetControlID="RFVTxtFechaRegreso" Width="100%">
|
||||||
|
</ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row my-1">
|
||||||
<label class="col-md-4 bold">Lugar de Salida:</label>
|
<label class="col-md-4">
|
||||||
<div class="col-md-8">
|
<asp:Label runat="server" Text="Tipo Unidad:"></asp:Label></label><div
|
||||||
<asp:TextBox ID="TxtUbicacion" runat="server" MaxLength="70" Width="100%"></asp:TextBox>
|
class="col-md-8">
|
||||||
<asp:RequiredFieldValidator ID="RFVUbicacion" runat="server" ControlToValidate="TxtUbicacion"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Ubicación''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEUbicacion" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVUbicacion" Width="100%" BehaviorID="_content_VCEUbicacion">
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
|
||||||
<label class="col-md-4 bold">Fecha Salida:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="input-group input-sm input-small date date-picker">
|
|
||||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
|
||||||
type="datetime-local"></asp:TextBox>
|
|
||||||
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtFechaSalida" runat="server" ControlToValidate="TxtFechaSalida"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Salida''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaSalida" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVTxtFechaSalida" Width="100%" BehaviorID="_content_VCETxtFechaSalida">
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
|
||||||
<label class="col-md-4 bold">Fecha Regreso:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="input-group input-sm input-small date date-picker">
|
|
||||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
|
||||||
type="datetime-local"></asp:TextBox>
|
|
||||||
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtFechaRegreso" runat="server" ControlToValidate="TxtFechaRegreso"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Regreso''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVTxtFechaRegreso" Width="100%" BehaviorID="_content_VCETxtFechaRegreso">
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row margin-bottom-5" id="TrAF" runat="server">
|
|
||||||
<label class="col-md-4 bold">
|
|
||||||
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div
|
|
||||||
class="col-md-8">
|
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlTipoAF" DataValueField="CveTipoActivoFijo"
|
<asp:DropDownList ID="DdlTipoAF" DataValueField="CveTipoActivoFijo"
|
||||||
DataTextField="TipoActivoFijo" Class="table-group-action-input form-control input-inline "
|
DataTextField="TipoActivoFijo" Class="table-group-action-input form-control input-inline "
|
||||||
@@ -254,66 +408,81 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row margin-bottom-5" id="TrChofer" runat="server">
|
|
||||||
<label class="col-md-4 bold">
|
|
||||||
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
|
||||||
class="col-md-8">
|
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
<div class="row my-1">
|
||||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline text-center"
|
<label class="col-md-4">
|
||||||
Width="200px" runat="server">
|
<asp:Label runat="server" Text="Chofer:"></asp:Label></label><div
|
||||||
</asp:DropDownList>
|
class="col-md-8">
|
||||||
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
|
||||||
TargetControlID="RFVChofer" Width="400px" BehaviorID="_content_VCEChofer">
|
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
<asp:DropDownList ID="DdlChofer" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||||
<label class="col-md-4 bold">Observaciones:</label>
|
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||||
<div class="col-md-8">
|
Width="100%" runat="server">
|
||||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
</asp:DropDownList>
|
||||||
TextMode="MultiLine"></asp:TextBox>
|
<asp:RequiredFieldValidator ID="RFVChofer" runat="server" ControlToValidate="DdlChofer"
|
||||||
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer''</b> es necesario, por favor ingréselo."
|
||||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<ajax:ValidatorCalloutExtender ID="VCEChofer" runat="server" HighlightCssClass="vco"
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
TargetControlID="RFVChofer" Width="400px">
|
||||||
TargetControlID="RFVObservaciones" Width="100%" BehaviorID="_content_VCEObservaciones">
|
</ajax:ValidatorCalloutExtender>
|
||||||
</ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row my-1">
|
<div class="row">
|
||||||
<label class="col-md-4 bold">Costo dólares:</label>
|
<label class="col-md-4">Observaciones:</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox ID="TxtDolares" runat="server" type="number"></asp:TextBox>
|
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||||
</div>
|
TextMode="MultiLine"></asp:TextBox>
|
||||||
</div>
|
<asp:RequiredFieldValidator ID="RFVObservaciones" runat="server" ControlToValidate="TxtObservaciones"
|
||||||
|
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo."
|
||||||
<div class="row my-1">
|
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<label class="col-md-4 bold">Costo pesos:</label>
|
<ajax:ValidatorCalloutExtender ID="VCEObservaciones" runat="server" HighlightCssClass="vco"
|
||||||
<div class="col-md-8">
|
TargetControlID="RFVObservaciones" Width="100%">
|
||||||
<asp:TextBox ID="TxtPesos" runat="server" type="number"></asp:TextBox>
|
</ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row my-1">
|
|
||||||
<label class="col-md-4 bold">Anticipo:</label>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<asp:TextBox ID="TxtAnticipo" runat="server" type="decimal"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:Button ID="BtnActualizar" OnClick="UpdateContrato" runat="server" CssClass="btn btn-primary"
|
|
||||||
Text="Editar"
|
|
||||||
ValidationGroup="GrpGuardar"></asp:Button>
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row hidden">
|
||||||
|
<label class="col-md-4">Costo dólares:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row hidden">
|
||||||
|
<label class="col-md-4">Costo pesos:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row hidden">
|
||||||
|
<label class="col-md-4">Anticipo:</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" runat="server" type="decimal"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<asp:Label ID="LbEstatus" runat="server" class="col-md-4" Visible="false">Estatus:</asp:Label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:DropDownList ID="DdlEstatusContrato" runat="server" Visible="false" Class="table-group-action-input form-control input-inline select2me"
|
||||||
|
AppendDataBoundItems="true"
|
||||||
|
Width="100%">
|
||||||
|
<asp:ListItem Text="Vigente" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Terminado" Value="2"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Cancelado" Value="3"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnGuardar" OnClick="UpdateContrato" runat="server" CssClass="btn btn-primary"
|
||||||
|
Text="Editar"
|
||||||
|
ValidationGroup="GrpGuardar"></asp:Button>
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
Imports System.Data.SqlClient
|
||||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||||
Imports Extensiones.ModExtensiones
|
Imports Extensiones.ModExtensiones
|
||||||
|
|
||||||
@@ -52,11 +53,53 @@ Partial Class RepContratosCalendario
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratos.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
Dim estatusContrato As String = DataBinder.Eval(e.Row.DataItem, "EstatusContrato").ToString()
|
||||||
|
|
||||||
|
Select Case estatusContrato
|
||||||
|
Case "1"
|
||||||
|
e.Row.BackColor = Drawing.Color.FromArgb(0, 165, 106)
|
||||||
|
Case "2"
|
||||||
|
e.Row.BackColor = Drawing.Color.FromArgb(43, 79, 214)
|
||||||
|
Case "3"
|
||||||
|
e.Row.BackColor = Drawing.Color.FromArgb(238, 96, 46)
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
|
Protected Sub MostrarModal(sender As Object, e As System.EventArgs)
|
||||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||||
|
If DdlClientesConsulta.SelectedValue = "" Then
|
||||||
|
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim cliente As Integer = DdlClientesConsulta.SelectedValue.ToEntero
|
||||||
|
Dim estatus As Integer = DdlEstatusConsulta.SelectedValue.ToEntero
|
||||||
|
Dim fechaInicial As DateTime = txtFechaI.Text.ToDate
|
||||||
|
Dim fechaFinal As DateTime = txtFechaF.Text.ToDate
|
||||||
|
|
||||||
|
Dim query As String = "SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial, RH.NombreCompleto AS NombreCompleto FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente LEFT JOIN RH_Personal RH with(nolock) ON C.CveChofer = RH.CvePersonal WHERE C.CveCliente = @Cliente AND EstatusContrato = @Estatus AND FechaInicial BETWEEN @FechaInicial AND @FechaFinal"
|
||||||
|
|
||||||
|
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||||
|
Using command As New SqlCommand(query, connection)
|
||||||
|
command.Parameters.AddWithValue("@Cliente", cliente)
|
||||||
|
command.Parameters.AddWithValue("@Estatus", estatus)
|
||||||
|
command.Parameters.AddWithValue("@FechaInicial", fechaInicial)
|
||||||
|
command.Parameters.AddWithValue("@FechaFinal", fechaFinal)
|
||||||
|
|
||||||
|
connection.Open()
|
||||||
|
Dim reader As SqlDataReader = command.ExecuteReader()
|
||||||
|
GvContratos.DataSource = reader
|
||||||
|
GvContratos.DataBind()
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
|
||||||
|
UpTitulos.Update()
|
||||||
|
End Sub
|
||||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
'If DdlClientes.SelectedValue = "" Then
|
'If DdlClientes.SelectedValue = "" Then
|
||||||
@@ -68,16 +111,28 @@ Partial Class RepContratosCalendario
|
|||||||
ObjContratos.IniciaTransacSQL()
|
ObjContratos.IniciaTransacSQL()
|
||||||
|
|
||||||
If ObjContratos.UpdateContratoAF(CveContrato.Value.ToEntero, DdlAF.SelectedValue.ToEntero, DdlChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
If ObjContratos.UpdateContratoAF(CveContrato.Value.ToEntero, DdlAF.SelectedValue.ToEntero, DdlChofer.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
ObjContratos.Commit()
|
ObjContratos.Commit()
|
||||||
Alert("Actualizado Correctamente.")
|
Alert("Actualizado Correctamente.")
|
||||||
Else
|
Else
|
||||||
ObjContratos.RollBack()
|
ObjContratos.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjContratos.Dispose()
|
ObjContratos.Dispose()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|
||||||
|
Protected Sub UpdateModal(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
TxtObservaciones.Text = GvRow.DataKey("Observaciones")
|
||||||
|
TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato")
|
||||||
|
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
|
||||||
|
TxtFechaSalida.Text = GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||||
|
TxtFechaRegreso.Text = GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||||
|
DdlClientes.SelectedValue = GvRow.DataKey("CveCliente")
|
||||||
|
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
|
||||||
|
DdlChofer.SelectedValue = GvRow.DataKey("CveChofer")
|
||||||
|
|
||||||
|
UpModal.Update()
|
||||||
|
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -441,6 +441,28 @@ Public Class WS_PuntoVenta
|
|||||||
Return Respuesta
|
Return Respuesta
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
<WebMethod()>
|
||||||
|
Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS
|
||||||
|
Dim objProyecto As New ClsSubProyectos
|
||||||
|
Dim Respuesta As New RespuestaWS
|
||||||
|
|
||||||
|
If objProyecto.GetSubProyectos(CveEmpresa) Then
|
||||||
|
Respuesta.Datos = objProyecto.DtResultados
|
||||||
|
|
||||||
|
Respuesta.Datos.Columns(2).ColumnName = "CveSucursal"
|
||||||
|
Respuesta.Datos.Columns(3).ColumnName = "Sucursal"
|
||||||
|
Respuesta.Datos.TableName = "Resultados"
|
||||||
|
Respuesta.HuboError = False
|
||||||
|
Else
|
||||||
|
Respuesta.Descripcion = "HUBO UN ERROR"
|
||||||
|
End If
|
||||||
|
|
||||||
|
objProyecto.Dispose()
|
||||||
|
Return Respuesta
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS
|
Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS
|
||||||
Dim objClientes As New ClsClientes
|
Dim objClientes As New ClsClientes
|
||||||
@@ -546,14 +568,15 @@ Public Class WS_PuntoVenta
|
|||||||
|
|
||||||
#Region "ProductosServicios"
|
#Region "ProductosServicios"
|
||||||
<WebMethod()>
|
<WebMethod()>
|
||||||
Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSubProyecto As Integer) As RespuestaWS
|
Public Function GetProductosServicios(CvePS As Integer, CveClasificacion As Integer, Codigo As String, PS As String, CveEmpresa As Integer, CveSucursal As Integer) As RespuestaWS
|
||||||
Dim objPS As New ClsProductosServicios
|
Dim objPS As New ClsProductosServicios
|
||||||
Dim Respuesta As New RespuestaWS
|
Dim Respuesta As New RespuestaWS
|
||||||
|
|
||||||
If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS, CveSubProyecto:=CveSubProyecto, pAplicaParaVenta:=1, pEstado:=1) Then
|
If objPS.GetPS(CvePS, CveClasificacion, CveEmpresa, Codigo, PS:=PS, CveSubProyecto:=CveSucursal, pAplicaParaVenta:=1, pEstado:=1) Then
|
||||||
Respuesta.Datos = objPS.DtResultados
|
Respuesta.Datos = objPS.DtResultados
|
||||||
Respuesta.Datos.TableName = "Resultados"
|
Respuesta.Datos.TableName = "Resultados"
|
||||||
Respuesta.HuboError = False
|
Respuesta.HuboError = False
|
||||||
|
GuardaLog($"CvePS: {CvePS}, CveClasificacion: {CveClasificacion}, CveEmpresa: {CveEmpresa}, Codigo: {Codigo}, PS: {PS}, CveSubProyecto: {CveSucursal}, pAplicaParaVenta: {1}, pEstado: {1}")
|
||||||
Else
|
Else
|
||||||
Respuesta.Descripcion = "HUBO UN ERROR"
|
Respuesta.Descripcion = "HUBO UN ERROR"
|
||||||
End If
|
End If
|
||||||
@@ -848,16 +871,34 @@ Public Class WS_PuntoVenta
|
|||||||
CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "Punto de Venta addVenta", objVenta.CveUsuario, objVenta.CveEmpresa)
|
CvePrePoliza = ObjConta.AddPrePolizas("Vta", 4, objVenta.Total, objVenta.Total, objVenta.CveMoneda, objVenta.Fecha, "Punto de Venta addVenta", objVenta.CveUsuario, objVenta.CveEmpresa)
|
||||||
|
|
||||||
If objVentas.DtResultados.Rows.Count = 0 Then
|
If objVentas.DtResultados.Rows.Count = 0 Then
|
||||||
|
|
||||||
|
If objVenta.CveEmpresa = 1 Then
|
||||||
|
If objVenta.CveSubProyecto <= 0 Then
|
||||||
|
objVenta.CveSubProyecto = 10430
|
||||||
|
End If
|
||||||
|
|
||||||
|
If objVenta.FolioFact.ToString.Contiene("", "-1", "0") Then
|
||||||
|
objVenta.FolioFact = getFolio("Rem", objVenta.CveEmpresa, objVenta.CveSubProyecto).ToEntero
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal,
|
If objVentas.AddVenta(objVenta.TipoDocto, objVenta.FolioFact, objVenta.CveCliente, objVenta.CveClienteSucursal,
|
||||||
objVenta.SubTotal, objVenta.Descuento, objVenta.Amortizacion, objVenta.IVA, objVenta.RetIVA, objVenta.RetISR,
|
objVenta.SubTotal, objVenta.Descuento, objVenta.Amortizacion, objVenta.IVA, objVenta.RetIVA, objVenta.RetISR,
|
||||||
objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago,
|
objVenta.Total, objVenta.CveMoneda, objVenta.TipoCambio, objVenta.CveMetodoPago, objVenta.CondicionesPago,
|
||||||
objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, objVenta.FechaEjecucion,
|
objVenta.FormaPago, ClsPaginas.NowADS(), objVenta.Fecha, objVenta.MotivoDescuento, objVenta.Observaciones, If(objVenta.FechaEjecucion < MinFecha, Now, objVenta.FechaEjecucion),
|
||||||
objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1,
|
objVenta.CveVendedor, If(objVenta.Alfa1 IsNot Nothing, objVenta.Alfa1, ""), If(objVenta.Alfa2 IsNot Nothing, objVenta.Alfa2, ""), If(objVenta.Alfa3 IsNot Nothing, objVenta.Alfa3, ""), objVenta.Num1,
|
||||||
objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza, objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto) Then
|
objVenta.Num2, objVenta.Num3, Fech1, Fech2, Fech3, objVenta.CveCorte, If(objVenta.NumeroPersonas > 255, 255, objVenta.NumeroPersonas), CvePrePoliza,
|
||||||
|
objVenta.CveUsuario, objVenta.CveEmpresa, objVenta.Propina, objVenta.CveVentaTerminal, CveSubProyecto:=objVenta.CveSubProyecto, CveSubProyectoEjecucion:=objVenta.CveSubProyecto, Vigencia:=Now) Then
|
||||||
objVenta.CveVenta = objVentas.CveVenta
|
objVenta.CveVenta = objVentas.CveVenta
|
||||||
'Ingresar los detalles
|
'Ingresar los detalles
|
||||||
|
|
||||||
|
If objVenta.CveEmpresa = 1 Then
|
||||||
|
GuardaLog($"objVenta.Detalle {objVenta.Detalle.Count}")
|
||||||
|
End If
|
||||||
For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle
|
For Each Detalle As ClsVentaWS.ClsVentaDetalleWS In objVenta.Detalle
|
||||||
If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1) Then
|
If objVentas.AddVentaDetalle(objVentas.CveVenta, Detalle.CvePS, Detalle.Cantidad, Detalle.CveUnidadMedida, Detalle.PU, Detalle.IVA, Detalle.Total, Detalle.Observaciones, Detalle.Descuento, Detalle.TipoDescuento, Detalle.CveSubProyecto, -1, IEPS:=0) Then
|
||||||
'Ingresar las caracteristicas del detalle de la venta
|
'Ingresar las caracteristicas del detalle de la venta
|
||||||
For Each Caracteristica As ClsVentaWS.ClsVentaDetalleCaracteristicaWS In Detalle.Caracteristicas
|
For Each Caracteristica As ClsVentaWS.ClsVentaDetalleCaracteristicaWS In Detalle.Caracteristicas
|
||||||
If objVentas.AddVentaDetalleCaracteristica(objVentas.CveVentaDetalle, Caracteristica.CvePS, Caracteristica.CveOpcion) = False Then
|
If objVentas.AddVentaDetalleCaracteristica(objVentas.CveVentaDetalle, Caracteristica.CvePS, Caracteristica.CveOpcion) = False Then
|
||||||
@@ -954,50 +995,57 @@ Public Class WS_PuntoVenta
|
|||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
' For Each Row As DataRow In DT.Rows
|
' For Each Row As DataRow In DT.Rows
|
||||||
ImporteMov = objVenta.SubTotal
|
ImporteMov = objVenta.SubTotal
|
||||||
Dim CveClasificacion_04 As Integer = -1
|
|
||||||
If ImporteMov <> 0 Then
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then
|
|
||||||
ErrorMovtosVentas = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
'Se agregan los DSV DESCUENTOS
|
|
||||||
ImporteMov = objVenta.Descuento
|
|
||||||
If ImporteMov <> 0 Then
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
|
||||||
ErrorMovtosDSV = True
|
' FIXME OIC
|
||||||
End If
|
'Dim CveClasificacion_04 As Integer = -1
|
||||||
End If
|
'If ImporteMov <> 0 Then
|
||||||
|
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoVenta, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, CveSubProyecto:=objVenta.CveSubProyecto, CveClasificacion:=CveClasificacion_04) Then
|
||||||
|
' ErrorMovtosVentas = True
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
'' Next
|
||||||
|
|
||||||
|
''Se agregan los DSV DESCUENTOS
|
||||||
|
'ImporteMov = objVenta.Descuento
|
||||||
|
'If ImporteMov <> 0 Then
|
||||||
|
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoDSV, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||||
|
' ErrorMovtosDSV = True
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
''End If
|
||||||
|
|
||||||
|
''Se agregan las CxC
|
||||||
|
'ImporteMov = objVenta.Total - TotalPagado
|
||||||
|
'If ImporteMov <> 0 Then
|
||||||
|
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||||
|
' ErrorMovtosCxC = True
|
||||||
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
'Se agregan las CxC
|
''Si hubo un pago agregarlo
|
||||||
ImporteMov = objVenta.Total - TotalPagado
|
'ImporteMov = TotalPagado
|
||||||
If ImporteMov <> 0 Then
|
'If ImporteMov <> 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoAfectacion, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
|
||||||
ErrorMovtosCxC = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Si hubo un pago agregarlo
|
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
||||||
ImporteMov = TotalPagado
|
' ErrorMovtosCxC = True
|
||||||
If ImporteMov <> 0 Then
|
' End If
|
||||||
|
'End If
|
||||||
|
''Se agregan el Traslado de IVA
|
||||||
|
'ImporteMov = objVenta.IVA
|
||||||
|
'If ImporteMov <> 0 Then
|
||||||
|
' Dim PorcentajeImpuesto As Decimal = 0
|
||||||
|
' If objVenta.SubTotal > 0 Then
|
||||||
|
' PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal)
|
||||||
|
' End If
|
||||||
|
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||||
|
' ErrorMovtosTrasladoIVA = True
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimientoVenta, ImporteMov, ImporteMov, 2, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE) Then
|
|
||||||
ErrorMovtosCxC = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
'Se agregan el Traslado de IVA
|
|
||||||
ImporteMov = objVenta.IVA
|
|
||||||
If ImporteMov <> 0 Then
|
|
||||||
Dim PorcentajeImpuesto As Decimal = 0
|
|
||||||
If objVenta.SubTotal > 0 Then
|
|
||||||
PorcentajeImpuesto = (objVenta.IVA / objVenta.SubTotal)
|
|
||||||
End If
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimientoVenta, ImporteMov, ImporteMov, CveConceptoIVA, " ", " ", CveVenta:=objVenta.CveVenta, CveCliente:=objVenta.CveCliente, CveIE:=CveIE, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
|
||||||
ErrorMovtosTrasladoIVA = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -1051,6 +1099,37 @@ Public Class WS_PuntoVenta
|
|||||||
Return CveVentas
|
Return CveVentas
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Function getFolio(TipoDoctoConsulta As String, CveEmpresa As Integer, CvesubProyecto As Integer) As String
|
||||||
|
Dim Respuesta As String = "-1"
|
||||||
|
Dim ObjFolios As New ClsGralFolios()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If ObjFolios.GetFolios(TipoDoctoConsulta, CveEmpresa) Then
|
||||||
|
GuardaLog($" GetFolios ok {ObjFolios.DtResultados.Rows.Count} . CvesubProyecto = {CvesubProyecto} .")
|
||||||
|
Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", CvesubProyecto))
|
||||||
|
If DT.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
Respuesta = DT.Rows(0)("FActual").ToString()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
DT.Dispose()
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjFolios.Dispose()
|
||||||
|
|
||||||
|
GuardaLog($" Folio Rem {Respuesta} .")
|
||||||
|
Return Respuesta
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user