Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -34,22 +34,19 @@ Public Class CalendarEvent
|
||||
Public Property NomprePersonal As String
|
||||
Public Property NombreAcercamiento As String
|
||||
Public Property CvePersonal As Integer
|
||||
Public Property CvePersonal2 As Integer
|
||||
Public Property CveCliente As Integer
|
||||
Public Property CveProveedor As Integer
|
||||
Public Property CveOS As Integer
|
||||
Public Property CveOSDetalle As Integer
|
||||
Public Property CveUsuarioAtendio As Integer
|
||||
|
||||
Public Property CveSubProyectoUsuarioAtendio As Integer
|
||||
|
||||
Public Property CveCompra As Integer
|
||||
Public Property SerieFolioCompra As String
|
||||
|
||||
Public Property CveVenta As Integer
|
||||
Public Property SerieFolioVenta As String
|
||||
Public Property CveActivoFijo As Integer
|
||||
Public Property AFCodigo As String
|
||||
|
||||
Public Property CveMovimiento As Integer
|
||||
Public Property MovimientoFolio As String
|
||||
Public Property CveIE As Integer
|
||||
@@ -57,7 +54,7 @@ Public Class CalendarEvent
|
||||
Public Property Pesos As Double
|
||||
Public Property Dolares As Double
|
||||
Public Property Anticipo As Double
|
||||
|
||||
|
||||
Public Property CantidadPasajeros As String
|
||||
Public Property NumeroContrato As String
|
||||
|
||||
End Class
|
||||
|
||||
2245
App_Code/ClsAF.vb
2245
App_Code/ClsAF.vb
File diff suppressed because it is too large
Load Diff
@@ -890,6 +890,32 @@ Public Class ClsClientes
|
||||
' Return Retorno
|
||||
'End Function
|
||||
|
||||
Public Function UpdateClienteFranquicia(CveCliente As Integer, CveEmpresaActual As Integer, CveEmpresaFranquicia As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_ClientesFranquiciaUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveEmpresaActual", SqlDbType.Int).Value = CveEmpresaActual
|
||||
.Add("@CveEmpresaFranquicia", SqlDbType.Int).Value = CveEmpresaFranquicia
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("El Cliente no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al intentar Actualizar los datos del Cliente.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al intentar Actualizar los datos del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateClientePersonaFisica(CveCliente As Integer, ApellidoPaterno As String, ApellidoMaterno As String, Nombres As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ Public Class ClsContratos
|
||||
|
||||
Public Property NumeroEstimacionNueva As Integer
|
||||
Public Property CveEstimacionNueva As Integer
|
||||
Public Property CveChofer As Integer
|
||||
|
||||
|
||||
|
||||
@@ -135,7 +134,6 @@ Public Class ClsContratos
|
||||
Public Property NumeroLicitacion As String
|
||||
Public Property Observaciones As String
|
||||
Public Property CveDireccionEnvio As Integer
|
||||
|
||||
Public Property CveProveedor As Integer
|
||||
Public Property RazonSocial As String
|
||||
Public Property CveCliente As Integer
|
||||
@@ -186,11 +184,16 @@ Public Class ClsContratos
|
||||
Public Property AplicaImpuestosLocales As Boolean
|
||||
Public Property CveEstimacionActual As Integer
|
||||
Public Property NumeroEstimacionActual As Integer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'Viajes
|
||||
Public Property CveTipoAF As Integer
|
||||
Public Property CveChofer As Integer
|
||||
Public Property CveChofer2 As Integer
|
||||
Public Property CveAF As Integer
|
||||
Public Property CantidadPasajeros As Integer
|
||||
Public Property CveRuta As Integer
|
||||
Public Property CvePartida As Integer
|
||||
Public Property CveDestino As Integer
|
||||
Public Property CveMasivo As Integer
|
||||
#End Region
|
||||
|
||||
#Region " C O N T R A T O S "
|
||||
@@ -227,8 +230,7 @@ Public Class ClsContratos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
Public Function GetContratos(CveContrato As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveEstatus As Integer = -1,
|
||||
Optional TipoEstatus As Integer = -1, Optional TipoContrato As Integer = -1, Optional EstatusFianza As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1) As Boolean
|
||||
@@ -299,30 +301,37 @@ Public Class ClsContratos
|
||||
Me.CveVendedor = Data.Rows(0)("CveVendedor").ToString.ToEntero
|
||||
Me.ImporteTotal = Data.Rows(0)("ImporteTotal").ToString.ToDecimal
|
||||
Me.Lugar = Data.Rows(0)("Lugar").ToString
|
||||
Me.LimiteDeGasto = Data.Rows(0)("LimiteDeGasto").ToString.ToDouble
|
||||
CveChofer = Data.Rows(0)("CveChofer").ToString.ToEntero
|
||||
|
||||
Me.LimiteDeGasto = Data.Rows(0)("LimiteDeGasto").ToString.ToDouble
|
||||
Observaciones = Data.Rows(0)("Observaciones").ToString
|
||||
CveDireccionEnvio = Data.Rows(0)("CveDireccionEnvio").ToString.ToEntero
|
||||
AplicaImpuestosLocales = CBool(Data.Rows(0)("AplicaImpuestosLocales"))
|
||||
'Viajes
|
||||
Me.CveTipoAF = Data.Rows(0)("CveTipoAF").ToString.ToEntero
|
||||
Me.CveChofer = Data.Rows(0)("CveChofer").ToString.ToEntero
|
||||
Me.CveChofer2 = Data.Rows(0)("CveChofer2").ToString.ToEntero
|
||||
Me.CveAF = Data.Rows(0)("CveAF").ToString.ToEntero
|
||||
Me.CantidadPasajeros = Data.Rows(0)("CantidadPasajeros").ToString.ToEntero
|
||||
Me.CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero
|
||||
Me.CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero
|
||||
Me.CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero
|
||||
Me.CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
||||
|
||||
End If
|
||||
End If
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el Catálogo de Contratos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddContratos(NumeroContrato As String, DescripcionContrato As String, NumeroLicitacion As String, CveProveedor As Integer, CveCliente As Integer, CveProspecto As Integer, FechaInicial As DateTime, FechaFinal As DateTime,
|
||||
Ubicacion As String, Responsable As String, CveSubProyecto As Integer, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String,
|
||||
Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, 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 CvePeriodo 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 DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "",
|
||||
Optional CveTipoAF As Integer = -1, Optional CveChofer As Integer = -1, Optional CveAF As Integer = -1, Optional CantidadPasajeros As Integer = -1) As Integer
|
||||
End Function
|
||||
Public Function AddContratos(NumeroContrato As String, DescripcionContrato As String, NumeroLicitacion As String, CveProveedor As Integer, CveCliente As Integer, CveProspecto As Integer, FechaInicial As DateTime, FechaFinal As DateTime,
|
||||
Ubicacion As String, Responsable As String, CveSubProyecto As Integer, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String,
|
||||
Geom As String, CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
||||
Optional CveContratosEstatus As Integer = -1, Optional CveContratoTipo As Integer = -1, Optional TipoCambio As Double = 1, 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 CvePeriodo 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 DiaMesFacturacion As Integer = 1, Optional ObservacionesGenerales As String = "",
|
||||
Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing, Optional CantidadPasajeros As Integer = Nothing, Optional CveRuta As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Integer
|
||||
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Con_ContratosAdd")
|
||||
@@ -378,11 +387,16 @@ Public Class ClsContratos
|
||||
.Add("@FacturacionCiclicaAutomatico", SqlDbType.Bit).Value = FacturacionCiclicaAutomatico
|
||||
.Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion
|
||||
.Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales
|
||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
'Viajes
|
||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@CveChofer2", SqlDbType.Int).Value = CveChofer2
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros
|
||||
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
.Add("@CvePartida", SqlDbType.Int).Value = CvePartida
|
||||
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||
.Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -400,14 +414,13 @@ Public Class ClsContratos
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function UpdateContratos(CveContrato As Integer, NumeroContrato As String, DescripcionContrato As String, NumeroLicitacion As String, CveProveedor As Integer, CveCliente As Integer, CveProspecto As Integer, FechaInicial As DateTime, FechaFinal As DateTime,
|
||||
Ubicacion As String, Responsable As String, CveSubProyecto As Integer, PorIVA As Double, PorAnticipo As Double, PorAmortizacionAnticipo As Double, PorGarantia As Double, Archivo As String, Geom As String,
|
||||
CveContratoPadre As Integer, CveUsuario As Integer, CveEmpresa As Integer, EsPresupuestal As Boolean, Minimo As Double, Maximo As Double, Importe As Double, CveMoneda As Integer, ModalidadDetalle As Integer,
|
||||
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 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, Optional EstatusContrato As Integer = -1, Optional CveAF As Integer = -1) As Boolean
|
||||
Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "", Optional CveTipoAF As Integer = Nothing, Optional CveChofer As Integer = Nothing, Optional CveChofer2 As Integer = Nothing, Optional CveAF As Integer = Nothing, Optional CantidadPasajeros As Integer = Nothing, Optional CveRuta As Integer = Nothing, Optional CvePartida As Integer = Nothing, Optional CveDestino As Integer = Nothing, Optional CveMasivo As Integer = Nothing) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Con_ContratosUpdate")
|
||||
@@ -462,12 +475,17 @@ Public Class ClsContratos
|
||||
.Add("@DiaMesFacturacion", SqlDbType.TinyInt).Value = DiaMesFacturacion
|
||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||
.Add("@ObservacionesGenerales", SqlDbType.VarChar).Value = ObservacionesGenerales
|
||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||
'Viajes
|
||||
.Add("@CveTipoAF", SqlDbType.Int).Value = CveTipoAF
|
||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||
.Add("@EstatusContrato", SqlDbType.Int).Value = EstatusContrato
|
||||
.Add("@CveChofer2", SqlDbType.Int).Value = CveChofer2
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@CantidadPasajeros", SqlDbType.Int).Value = CantidadPasajeros
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
.Add("@CvePartida", SqlDbType.Int).Value = CvePartida
|
||||
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||
.Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
@@ -10376,6 +10376,25 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/MF/CargaLayout.aspx".ToUpper(), 863)
|
||||
PaginaDict.Add("/MF/RepConsumoCombustible.aspx".ToUpper(), 864)
|
||||
#End Region
|
||||
#Region "MQ"
|
||||
PaginaDict.Add("/MQ/CatActividades.aspx".ToUpper, 1401)
|
||||
PaginaDict.Add("/MQ/ContratosMaquinariaRentada.aspx".ToUpper, 1402)
|
||||
PaginaDict.Add("/MQ/CatOrdenesTrabajoTipos.aspx".ToUpper, 1403)
|
||||
PaginaDict.Add("/MQ/CatActividadesOT.aspx".ToUpper, 1404)
|
||||
PaginaDict.Add("/MQ/CatCheckListActividadesGrupos.aspx".ToUpper, 1405)
|
||||
PaginaDict.Add("/MQ/CatCheckListActividades.aspx".ToUpper, 1406)
|
||||
PaginaDict.Add("/MQ/CatEstatusOT.aspx".ToUpper, 1407)
|
||||
PaginaDict.Add("/MQ/CatHerramientasOT.aspx".ToUpper, 1408)
|
||||
PaginaDict.Add("/MQ/SubContrataciones.aspx".ToUpper, 1409)
|
||||
PaginaDict.Add("/MQ/CatTipoOrdenTrabajo.aspx".ToUpper, 1410)
|
||||
PaginaDict.Add("/MQ/CatOperadores.aspx".ToUpper, 1411)
|
||||
PaginaDict.Add("/MQ/OrdenTrabajo.aspx".ToUpper, 1412)
|
||||
PaginaDict.Add("/MQ/CatOrdenTrabajo.aspx".ToUpper, 1413)
|
||||
PaginaDict.Add("/MQ/HorometroDiario.aspx".ToUpper, 1414)
|
||||
|
||||
PaginaDict.Add("/MQ/TipoOrdenTrabajo.aspx".ToUpper, -1)
|
||||
#End Region
|
||||
|
||||
#Region "Nomina"
|
||||
PaginaDict.Add("/Nomina/Calculo.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Nomina/SobreRecibo.aspx".ToUpper(), -1)
|
||||
@@ -10812,7 +10831,7 @@ Public Class ClsPaginas
|
||||
|
||||
#Region "Transportes"
|
||||
PaginaDict.Add("/Transportes/RepContratos.aspx".ToUpper(), 598)
|
||||
PaginaDict.Add("/Transportes/RepContratosDetalles.aspx".ToUpper(), 598)
|
||||
PaginaDict.Add("/Transportes/RepContratoDetalle.aspx".ToUpper(), 598)
|
||||
PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599)
|
||||
PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 600)
|
||||
PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 601)
|
||||
|
||||
@@ -134,113 +134,6 @@ Public Class ClsTransportes
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Viajes"
|
||||
Public Function AddViajes(CveRuta As Integer, CveAF As Integer, CvePersonal As Integer, CveEmpresa As Integer, Fecha As DateTime, CvePartida As Integer, CveDestino As Integer, Optional IsMasivo As Boolean = False, Optional CveMasivo As Integer = -1) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Trans_ViajesAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveViaje", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||
.Add("@CvePartida", SqlDbType.Int).Value = CvePartida
|
||||
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||
.Add("@IsMasivo", SqlDbType.Bit).Value = IsMasivo
|
||||
.Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = CInt(SqlAdapter.SelectCommand.Parameters("@CveViaje").Value.ToString)
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el nuevo viaje.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetViajes(CveViaje As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Trans_ViajesGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
If CveViaje > 0 AndAlso Data IsNot Nothing AndAlso Data.Rows.Count > 0 Then
|
||||
CveRuta = Data.Rows(0)("CveRuta").ToString.ToEntero
|
||||
CveAF = Data.Rows(0)("CveAF").ToString.ToEntero
|
||||
CvePersonal = Data.Rows(0)("CvePersonal").ToString.ToEntero
|
||||
CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero
|
||||
CvePartida = Data.Rows(0)("CvePartida").ToString.ToEntero
|
||||
CveDestino = Data.Rows(0)("CveDestino").ToString.ToEntero
|
||||
CveMasivo = Data.Rows(0)("CveMasivo").ToString.ToEntero
|
||||
Fecha = Data.Rows(0)("Fecha").ToString.ToDate
|
||||
Ruta = Data.Rows(0)("Ruta").ToString
|
||||
Me.CveViaje = Data.Rows(0)("CveViaje").ToString.ToEntero
|
||||
End If
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el catálogo de viajes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function RemoveViaje(Optional CveViaje As Integer = -1, Optional CveMasivo As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
DataAdapter("PA_Trans_ViajesRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
||||
.Add("@CveMasivo", SqlDbType.Int).Value = CveMasivo
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar el contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateViajes(CveViaje As Integer, CveRuta As Integer, CveAF As Integer, CvePersonal As Integer, CveEmpresa As Integer, Fecha As DateTime, CvePartida As Integer, CveDestino As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Trans_ViajesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveViaje", SqlDbType.Int).Value = CveViaje
|
||||
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
|
||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@CvePartida", SqlDbType.Int).Value = CvePartida
|
||||
.Add("@CveDestino", SqlDbType.Int).Value = CveDestino
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el Contrato.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Boletos"
|
||||
Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer, CveVendedor As Integer) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
@@ -2052,7 +2052,7 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Predeterminada As Boolean, Porcentaje As Double, Optional CvePrecioListaClonar As Integer = -1) As Integer
|
||||
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Predeterminada As Boolean, Porcentaje As Double, Optional CvePrecioListaClonar As Integer = -1, Optional UpdateFranquicia As Boolean = False) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Vta_PrecioListaAdd")
|
||||
@@ -2064,6 +2064,7 @@ Public Class ClsVentas
|
||||
.Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje
|
||||
.Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada
|
||||
.Add("@CvePrecioListaClonar", SqlDbType.Int).Value = CvePrecioListaClonar
|
||||
.Add("@UpdateFranquicia", SqlDbType.Bit).Value = UpdateFranquicia
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
@@ -2084,7 +2085,7 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
Public Function UpdatePrecioLista(PrecioLista As String, Estatus As Boolean, CveUsuario As Integer, Porcentaje As Double,
|
||||
Predeterminada As Boolean, CvePrecioLista As Integer) As Boolean
|
||||
Predeterminada As Boolean, CvePrecioLista As Integer, Optional UpdateFranquicia As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_PrecioListaUpdate")
|
||||
@@ -2096,6 +2097,7 @@ Public Class ClsVentas
|
||||
.Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje
|
||||
.Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||
.Add("@UpdateFranquicia", SqlDbType.Bit).Value = UpdateFranquicia
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -449,7 +449,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
|
||||
|
||||
If ObjContratos.GetContratos(-1, usuarioActual_.CveEmpresa, TipoContrato:=2) Then
|
||||
If ObjContratos.GetContratos(-1, usuarioActual_.CveEmpresa, TipoContrato:=34) Then
|
||||
|
||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -465,14 +465,15 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
cevent.NombreAcercamiento = dr("Ubicacion").ToString
|
||||
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
|
||||
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
|
||||
cevent.CvePersonal2 = dr("CveChofer2").ToString.ToEntero
|
||||
cevent.CveEventoEstatus = dr("CveContratosEstatus").ToString.ToEntero
|
||||
cevent.Dolares = dr("Importe").ToString.ToDecimal
|
||||
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
|
||||
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
|
||||
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
|
||||
cevent.backgroundColor = dr("BackgroundColor").ToString
|
||||
|
||||
|
||||
|
||||
cevent.CantidadPasajeros = dr("CantidadPasajeros").ToString
|
||||
cevent.NumeroContrato = dr("NumeroContrato").ToString
|
||||
|
||||
If Not cevent.recurrenciatipo > 0 Then
|
||||
|
||||
|
||||
102
MQ/CatActividades.aspx
Normal file
102
MQ/CatActividades.aspx
Normal file
@@ -0,0 +1,102 @@
|
||||
<%@ Page Title="AF - Catálogo de Actividades" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatActividades.aspx.cs" Inherits="AF_CatActividades" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Actividadedes
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarActividadD" OnClick="BtnAgregarActividadD_Click" data-toggle="tooltip" data-placement="left" title="Agregar un Defecto" Text="<i class='fa fa-plus'></i>Agregar Actividad"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveActividad, Nombre,CveUsuario, CveEmpresa,Estatus"
|
||||
EmptyDataText="No se encontraron Actividades" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Width="50%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Actividad" DataField="Nombre" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusStr" />
|
||||
<asp:BoundField HeaderText="Fecha Ingreso" DataField="FechaIng" DataFormatString = "{0:dd/MM/yyyy}" />
|
||||
<asp:BoundField HeaderText="Usuario Ingreso" DataField="Usuario" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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="DivAgregarActividadD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalActividad" runat="server">Actividades</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombre" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtNombre" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TxtNombre">Actividad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPuesto" DataTextField="Puesto" DataValueField="CvePuesto" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlPuesto.ClientID.ToString()%>">Puesto:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvPuesto" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlPuesto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puesto''</b> es necesario." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvCantidad" runat="server" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TxtCantidad">Cantidad:</label>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarActividad" OnClick="BtnAgregarActividad_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
119
MQ/CatActividades.aspx.cs
Normal file
119
MQ/CatActividades.aspx.cs
Normal file
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatActividades : ClsPaginas
|
||||
{
|
||||
private int CveActividad
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveActividad"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveActividad"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetActividades(-1, -1, UsuarioActual.CveEmpresa,-1))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividadD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividad.Text = "Agregar";
|
||||
TxtNombre.Text = "";
|
||||
|
||||
LtlTituloModalActividad.Text = "Agregar Actividad";
|
||||
ChkEstatus.Checked = true;
|
||||
CheckActiveSection.Visible = false;
|
||||
|
||||
UpModalTiposD.Update();
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarActividadD"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividad.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveActividad = GvRow.DataKey("CveActividad").ToEntero();
|
||||
TxtNombre.Text = GvRow.DataKey("Nombre");
|
||||
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus").ToEntero() == 1 ? true : false;
|
||||
CheckActiveSection.Visible = true;
|
||||
|
||||
UpModalTiposD.Update();
|
||||
|
||||
LtlTituloModalActividad.Text = "Actualizar Actividad";
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarActividadD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveActividad = GvRow.DataKey("CveActividad").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteActividades(CveActividad, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
Alert("Se eliminó la Actividad correctamente");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividad_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
|
||||
int Estatus = ChkEstatus.Checked ? 1 : 0;
|
||||
|
||||
if (BtnAgregarActividad.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddActividades(TxtNombre.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,Estatus))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
Alert("Se agregó la Actividad correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateActividades(CveActividad,TxtNombre.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,Estatus))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
Alert("Se actualizó la Actividad correctamente");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
}
|
||||
}
|
||||
105
MQ/CatActividadesOT.aspx
Normal file
105
MQ/CatActividadesOT.aspx
Normal file
@@ -0,0 +1,105 @@
|
||||
<%@ Page Title="AF - Catálogo de Actividades" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatActividadesOT.aspx.cs" Inherits="AF_CatActividadesOT" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Actividades Ordenes de Trabajo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarActividadD" OnClick="BtnAgregarActividadD_Click" data-toggle="tooltip" data-placement="left" title="Agregar un actividad" Text="<i class='fa fa-plus'></i>Agregar Actividad"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveActividadOT,ActividadOT,CveUsuario,CveEmpresa,Estatus,CvePuesto,Horas"
|
||||
EmptyDataText="No se encontraron Actividades" ToolTip="Listado de Actividades " CssClass="table table-striped table-advance table-hover" Width="50%" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="Actividad" DataField="ActividadOT" />
|
||||
<asp:BoundField HeaderText="Puesto" DataField="Puesto" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusStr" />
|
||||
<asp:BoundField HeaderText="Fecha Ingreso" DataField="FechaIng" DataFormatString = "{0:dd/MM/yyyy}" />
|
||||
<asp:BoundField HeaderText="Usuario Ingreso" DataField="Usuario" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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="DivAgregarActividadD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalActividad" runat="server">Actividades</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNombre" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtNombre" runat="server" ControlToValidate="TxtNombre" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nombre''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TxtNombre">Actividad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPuesto" DataTextField="Puesto" DataValueField="CvePuesto" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlPuesto.ClientID.ToString()%>">Puesto:</label>
|
||||
<asp:RequiredFieldValidator ID="RfvPuesto" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlPuesto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puesto''</b> es necesario." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHoras" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvCantidad" runat="server" ControlToValidate="TxtHoras" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Horas''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TxtHoras">Horas:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarActividad" OnClick="BtnAgregarActividad_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
144
MQ/CatActividadesOT.aspx.cs
Normal file
144
MQ/CatActividadesOT.aspx.cs
Normal file
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatActividadesOT : ClsPaginas
|
||||
{
|
||||
private int CveActividadOT
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveActividadOT"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveActividadOT"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
|
||||
ClsRH objRH = new ClsRH();
|
||||
|
||||
if (objRH.GetPuestos(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlPuesto.DataSource = objRH.DtResultados;
|
||||
}
|
||||
else {
|
||||
DdlPuesto.DataSource = null;
|
||||
}
|
||||
|
||||
|
||||
DdlPuesto.DataBind();
|
||||
DdlPuesto.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetActividadesOT(-1, -1, UsuarioActual.CveEmpresa,-1))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividadD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividad.Text = "Agregar";
|
||||
TxtNombre.Text = "";
|
||||
|
||||
LtlTituloModalActividad.Text = "Agregar Actividad";
|
||||
ChkEstatus.Checked = true;
|
||||
CheckActiveSection.Visible = false;
|
||||
|
||||
DdlPuesto.SelectedValueExist(-1); ;
|
||||
TxtHoras.Text = "0";
|
||||
|
||||
|
||||
|
||||
UpModalTiposD.Update();
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarActividadD"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividad.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveActividadOT = GvRow.DataKey("CveActividadOT").ToEntero();
|
||||
TxtNombre.Text = GvRow.DataKey("ActividadOT");
|
||||
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus").ToEntero() == 1 ? true : false;
|
||||
CheckActiveSection.Visible = true;
|
||||
|
||||
DdlPuesto.SelectedValueExist(GvRow.DataKey("CvePuesto"));
|
||||
TxtHoras.Text = GvRow.DataKey("Horas");
|
||||
|
||||
|
||||
UpModalTiposD.Update();
|
||||
|
||||
LtlTituloModalActividad.Text = "Actualizar Actividad";
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarActividadD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveActividadOT = GvRow.DataKey("CveActividadOT").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteActividadesOT(CveActividadOT, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
Alert("Se eliminó la Actividad correctamente");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividad_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
|
||||
int Estatus = ChkEstatus.Checked ? 1 : 0;
|
||||
|
||||
if (BtnAgregarActividad.Text == "Agregar")
|
||||
{
|
||||
// if (ObjAF.AddActividadesOT(TxtNombre.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,Estatus, DdlPuesto.SelectedValue.ToEntero(), TxtHoras.Text.ToDecimal()))
|
||||
if (ObjAF.AddActividadesOT(TxtNombre.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlPuesto.SelectedValue.ToEntero(), TxtHoras.Text.ToDecimal()))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
Alert("Se agregó la Actividad correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateActividadesOT(CveActividadOT,TxtNombre.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,Estatus, DdlPuesto.SelectedValue.ToEntero(), TxtHoras.Text.ToDecimal()))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
Alert("Se actualizó la Actividad correctamente");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarActividadD"));
|
||||
}
|
||||
}
|
||||
92
MQ/CatCheckListActividades.aspx
Normal file
92
MQ/CatCheckListActividades.aspx
Normal file
@@ -0,0 +1,92 @@
|
||||
<%@ Page Title="AF - Catálogo de Actividades de CheckList" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatCheckListActividades.aspx.cs" Inherits="AF_CatCheckListActividades" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de CheckList Nivel 2
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarActividadCheckListD" OnClick="BtnAgregarActividadCheckListD_Click" data-toggle="tooltip" data-placement="left" title="Agregar CheckList Nivel 2" Text="<i class='fa fa-plus'></i>Agregar CheckList Nivel 2"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCheckListActividad, CheckListActividad, CveCheckListActividadGrupo, CheckListActividadGrupo,Estatus"
|
||||
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Width="50%" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="CheckList Nivel 1" DataField="CheckListActividadGrupo" />
|
||||
<asp:BoundField HeaderText="CheckList Nivel 2" DataField="CheckListActividad" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusStr" />
|
||||
<asp:BoundField HeaderText="Fecha Ingreso" DataField="FechaIng" DataFormatString = "{0:dd/MM/yyyy}" />
|
||||
<asp:BoundField HeaderText="Usuario Ingreso" DataField="Usuario" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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="DivAgregarTiposServiciosD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalActividad" runat="server">Actividad CheckList</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCheckListActividad" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCheckListActividad" runat="server" ControlToValidate="TxtCheckListActividad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''CheckList''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="LblNombre">CheckList Nivel 2:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCheckListActividadGrupo" DataTextField="CheckListActividadGrupo" DataValueField="CveCheckListActividadGrupo" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlCheckListActividadGrupo.ClientID.ToString()%>">CheckList Nivel 1:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCheckListActividadGrupo" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlCheckListActividadGrupo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Nivel de CheckList''</b> es necesario." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarActividadCheckList" OnClick="BtnAgregarActividadCheckList_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
121
MQ/CatCheckListActividades.aspx.cs
Normal file
121
MQ/CatCheckListActividades.aspx.cs
Normal file
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatCheckListActividades : ClsPaginas
|
||||
{
|
||||
private int CveCheckListActividad
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveCheckListActividad"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveCheckListActividad"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
DdlCheckListActividadGrupo.Items.Clear();
|
||||
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetCheckListActividad(-1, -1,UsuarioActual.CveEmpresa,-1))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
if (ObjAF.GetCheckListActividadGrupo(-1, UsuarioActual.CveEmpresa,1))
|
||||
{
|
||||
DdlCheckListActividadGrupo.DataSource = ObjAF.DtResultados;
|
||||
DdlCheckListActividadGrupo.DataBind();
|
||||
DdlCheckListActividadGrupo.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividadCheckListD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividadCheckList.Text = "Agregar";
|
||||
TxtCheckListActividad.Text = "";
|
||||
DdlCheckListActividadGrupo.SelectedValueExist(-1);
|
||||
LtlTituloModalActividad.Text = "Agregar CheckList Nivel 2";
|
||||
ChkEstatus.Checked = true;
|
||||
CheckActiveSection.Visible = false;
|
||||
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosD"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarActividadCheckList.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckListActividad = GvRow.DataKey("CveCheckListActividad").ToEntero();
|
||||
TxtCheckListActividad.Text = GvRow.DataKey("CheckListActividad");
|
||||
DdlCheckListActividadGrupo.SelectedValueExist(GvRow.DataKey("CveCheckListActividadGrupo"));
|
||||
LtlTituloModalActividad.Text = "Actualizar CheckList Nivel 2";
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus").ToEntero() == 1 ? true : false;
|
||||
CheckActiveSection.Visible = true;
|
||||
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposServiciosD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckListActividad = GvRow.DataKey("CveCheckListActividad").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteCheckListActividad(CveCheckListActividad, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosD"));
|
||||
Alert("Se eliminó CheckList Nivel 2");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividadCheckList_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
int Estatus = ChkEstatus.Checked ? 1 : 0;
|
||||
|
||||
if (BtnAgregarActividadCheckList.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddCheckListActividad(TxtCheckListActividad.Text, DdlCheckListActividadGrupo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa,Estatus,UsuarioActual.CveUsuario))
|
||||
{
|
||||
Alert("Se agregó CheckList Nivel 2 correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateCheckListActividad(CveCheckListActividad, TxtCheckListActividad.Text, DdlCheckListActividadGrupo.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, Estatus, UsuarioActual.CveUsuario))
|
||||
{
|
||||
Alert("Se actualizó CheckList Nivel 2 correctamente");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposServiciosD"));
|
||||
}
|
||||
}
|
||||
84
MQ/CatCheckListActividadesGrupos.aspx
Normal file
84
MQ/CatCheckListActividadesGrupos.aspx
Normal file
@@ -0,0 +1,84 @@
|
||||
<%@ Page Title="AF - Catálogo de Grupos de CheckLists" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatCheckListActividadesGrupos.aspx.cs" Inherits="AF_CatCheckListActividadesGrupos" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de CheckList Nivel 1
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarGrupoCheckListD" OnClick="BtnAgregarGrupoCheckListD_Click" data-toggle="tooltip" data-placement="left" title="Agregar CheckList Nivel 1" Text="<i class='fa fa-plus'></i>Agregar CheckList Nivel 1"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCheckListActividadGrupo, CheckListActividadGrupo,Estatus"
|
||||
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Width="50%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="CheckList Nivel 1" DataField="CheckListActividadGrupo" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusStr" />
|
||||
<asp:BoundField HeaderText="Fecha Ingreso" DataField="FechaIng" DataFormatString = "{0:dd/MM/yyyy}" />
|
||||
<asp:BoundField HeaderText="Usuario Ingreso" DataField="Usuario" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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="DivAgregarGrupoCheckListD" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalGrupoCheckList" runat="server">Grupo de CheckList</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtGrupoCheckList" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtGrupoCheckList" runat="server" ControlToValidate="TxtGrupoCheckList" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Grupo CheckList''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="LblNombre">CheckList Nivel 1:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarGrupoCheckList" OnClick="BtnAgregarGrupoCheckList_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
114
MQ/CatCheckListActividadesGrupos.aspx.cs
Normal file
114
MQ/CatCheckListActividadesGrupos.aspx.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatCheckListActividadesGrupos : ClsPaginas
|
||||
{
|
||||
private int CveCheckListActividadGrupo
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveCheckListActividadGrupo"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveCheckListActividadGrupo"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetCheckListActividadGrupo(-1, UsuarioActual.CveEmpresa,-1))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarGrupoCheckListD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarGrupoCheckList.Text = "Agregar";
|
||||
TxtGrupoCheckList.Text = "";
|
||||
LtlTituloModalGrupoCheckList.Text = "Agregar CheckList Nivel 1";
|
||||
ChkEstatus.Checked = true;
|
||||
CheckActiveSection.Visible = false;
|
||||
|
||||
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarGrupoCheckListD"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarGrupoCheckList.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
|
||||
CveCheckListActividadGrupo = GvRow.DataKey("CveCheckListActividadGrupo").ToEntero();
|
||||
TxtGrupoCheckList.Text = GvRow.DataKey("CheckListActividadGrupo");
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus").ToEntero() == 1 ? true : false;
|
||||
CheckActiveSection.Visible = true;
|
||||
|
||||
LtlTituloModalGrupoCheckList.Text = "Actualizar CheckList Nivel 1";
|
||||
|
||||
UpModalTiposD.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarGrupoCheckListD"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveCheckListActividadGrupo = GvRow.DataKey("CveCheckListActividadGrupo").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteCheckListActividadGrupo(CveCheckListActividadGrupo, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarGrupoCheckListD"));
|
||||
Alert("Se eliminó el CheckList Nivel 1");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarGrupoCheckList_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
int Estatus = ChkEstatus.Checked ? 1 : 0;
|
||||
|
||||
|
||||
if (BtnAgregarGrupoCheckList.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddCheckListActividadGrupo(TxtGrupoCheckList.Text, UsuarioActual.CveEmpresa,Estatus,UsuarioActual.CveUsuario))
|
||||
{
|
||||
Alert("Se agregó el CheckList Nivel 1 correctamente");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateCheckListActividadGrupo(CveCheckListActividadGrupo, TxtGrupoCheckList.Text, Estatus, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
Alert("Se actualizó el CheckList Nivel 1 correctamente");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarGrupoCheckListD"));
|
||||
}
|
||||
}
|
||||
143
MQ/CatEstatusOT.aspx
Normal file
143
MQ/CatEstatusOT.aspx
Normal file
@@ -0,0 +1,143 @@
|
||||
<%@ Page Title="Catálogo Operadores" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatEstatusOT.aspx.vb" Inherits="AF_CatEstatusOT" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo Operadores
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarEstatusOT" data-toggle="tooltip" data-placement="left" title="Agregar Estatus" Text="<i class='fa fa-plus'></i> Agregar Estatus"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveEstatusOT,EstatusOT,Estatus" EmptyDataText="No se encontraron Estatus" Width="100%"
|
||||
ToolTip="Listado de Estatus" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Operador">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOperador" runat="server" Text='<%# Eval("EstatusOT") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEsatusString" runat="server" Text='<%# Eval("EstatusString") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-Width="200" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkActualizar" runat="server" OnClick="LnkGvActualizar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ValidationGroup="GrpGV" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DVModalEstatusOT" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalEstatusOT" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalOperdaor" runat="server"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEstatusOT" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtEstatusOT" runat="server" ControlToValidate="TxtEstatusOT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEstatusOT"></asp:RequiredFieldValidator>
|
||||
<label for="TxtEstatusOT">Estatus:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <label for="TxtOperador">Operador:</label>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding: 0px;">
|
||||
<asp:TextBox Width="115px" ID="TxtFecha" runat="server" CssClass="form-control text-size-14" 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>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="TxtFecha" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpOperador"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpOperador"></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>
|
||||
|
||||
<i></i>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<br ID="saltoDeLinea" runat="server" />
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnModalAgregarEstatusOT" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpEstatusOT" />
|
||||
<button id="Button" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
135
MQ/CatEstatusOT.aspx.vb
Normal file
135
MQ/CatEstatusOT.aspx.vb
Normal file
@@ -0,0 +1,135 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatEstatusOT
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Property CveEstatusOT As Integer
|
||||
Get
|
||||
If ViewState("CveEstatusOT") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveEstatusOT").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveEstatusOT") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetEstatusOT(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnAgregarOperador_Click(sender As Object, e As EventArgs) Handles LnkAgregarEstatusOT.Click
|
||||
ResetModalEstatusOT()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DVModalEstatusOT"))
|
||||
End Sub
|
||||
|
||||
Private Sub ResetModalEstatusOT()
|
||||
CveEstatusOT = -1
|
||||
TxtEstatusOT.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
LtlTituloModalOperdaor.Text = "Agregar Etapa"
|
||||
CheckActiveSection.Visible = False
|
||||
|
||||
UpModalEstatusOT.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
|
||||
CveEstatusOT = GvRow.DataKey("CveEstatusOT").ToEntero
|
||||
TxtEstatusOT.Text = GvRow.DataKey("EstatusOT")
|
||||
'TxtFecha.Text = GvRow.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString.ToEntero = 1, True, False)
|
||||
LtlTituloModalOperdaor.Text = "Actualizar Etapa"
|
||||
CheckActiveSection.Visible = True
|
||||
|
||||
UpModalEstatusOT.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DVModalEstatusOT"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnModalAgregarEstatusOT.Click
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If CveEstatusOT = -1 Then
|
||||
If Not ObjAF.AddEstatusOT(TxtEstatusOT.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If(ChkEstatus.Checked, 1, 0)) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
|
||||
If Not ObjAF.UpdateEstatusOT(CveEstatusOT, TxtEstatusOT.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If(ChkEstatus.Checked, 1, 0)) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
Alert($"Etapa { If(CveEstatusOT > 0, "Actualizada", "Agregada") } correctamente.")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DVModalEstatusOT"))
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim CveEstatusOTEliminar As Integer = GvRow.DataKey("CveEstatusOT").ToEntero
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.DeletEstatusOT(CveEstatusOTEliminar, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Etapa eliminado correctamente")
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
123
MQ/CatHerramientasOT.aspx
Normal file
123
MQ/CatHerramientasOT.aspx
Normal file
@@ -0,0 +1,123 @@
|
||||
<%@ Page Title="Catálogo Operadores" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatHerramientasOT.aspx.vb" Inherits="AF_CatHerramientasOT" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Herramientas para Orden de Trabajo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarHerramientas" data-toggle="tooltip" data-placement="left" title="Agregar Herramienta" Text="<i class='fa fa-plus'></i> Agregar Herramienta"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveHerramientaOT,HerramientaOT,Estatus" EmptyDataText="No se encontraron Herramientas" Width="100%"
|
||||
ToolTip="Listado de Herramientas" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Herramienta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlHerramientas" runat="server" Text='<%# Eval("HerramientaOT") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEsatusString" runat="server" Text='<%# Eval("EstatusString") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-Width="200" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkActualizar" runat="server" OnClick="LnkGvActualizar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ValidationGroup="GrpGV" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DVModalHerramientaOT" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalHerramienta" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalOperdaor" runat="server"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHerramientaOT" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtHerramientaOT" runat="server" ControlToValidate="TxtHerramientaOT" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Herramienta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHerramientaOT"></asp:RequiredFieldValidator>
|
||||
<label for="TxtHerramientaOT">Herramienta:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<br ID="saltoDeLinea" runat="server" />
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnModalAgregarHerramientaOT" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpHerramientaOT" />
|
||||
<button id="Button" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
135
MQ/CatHerramientasOT.aspx.vb
Normal file
135
MQ/CatHerramientasOT.aspx.vb
Normal file
@@ -0,0 +1,135 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatHerramientasOT
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Property CveHerramientaOT As Integer
|
||||
Get
|
||||
If ViewState("CveHerramientaOT") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveHerramientaOT").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveHerramientaOT") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetHerramientasOT(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnAgregarOperador_Click(sender As Object, e As EventArgs) Handles LnkAgregarHerramientas.Click
|
||||
ResetModalOperador()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DVModalHerramientaOT"))
|
||||
End Sub
|
||||
|
||||
Private Sub ResetModalOperador()
|
||||
CveHerramientaOT = -1
|
||||
TxtHerramientaOT.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
LtlTituloModalOperdaor.Text = "Agregar Herramienta"
|
||||
CheckActiveSection.Visible = False
|
||||
|
||||
UpModalHerramienta.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
|
||||
CveHerramientaOT = GvRow.DataKey("CveHerramientaOT").ToEntero
|
||||
TxtHerramientaOT.Text = GvRow.DataKey("HerramientaOT")
|
||||
'TxtFecha.Text = GvRow.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString.ToEntero = 1, True, False)
|
||||
LtlTituloModalOperdaor.Text = "Actualizar Herramienta"
|
||||
CheckActiveSection.Visible = True
|
||||
|
||||
UpModalHerramienta.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DVModalHerramientaOT"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnModalAgregarHerramientaOT.Click
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If CveHerramientaOT = -1 Then
|
||||
If Not ObjAF.AddHerramientasOT(TxtHerramientaOT.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If(ChkEstatus.Checked, 1, 0)) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
|
||||
If Not ObjAF.UpdateHerramientasOT(CveHerramientaOT, TxtHerramientaOT.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If(ChkEstatus.Checked, 1, 0)) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
Alert($"Herramienta { If(CveHerramientaOT > 0, "Actualizada", "Agregada") } correctamente.")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DVModalHerramientaOT"))
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim CveHerramientaOTEliminar As Integer = GvRow.DataKey("CveHerramientaOT").ToEntero
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.DeleteHerramientasOT(CveHerramientaOTEliminar, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Herramienta eliminada correctamente")
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
143
MQ/CatOperadores.aspx
Normal file
143
MQ/CatOperadores.aspx
Normal file
@@ -0,0 +1,143 @@
|
||||
<%@ Page Title="Catálogo Operadores" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatOperadores.aspx.vb" Inherits="AF_CatOperadores" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo Operadores
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarOperador" data-toggle="tooltip" data-placement="left" title="Agregar Operador" Text="<i class='fa fa-plus'></i> Agregar Operador"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOperador,Operador,Estatus" EmptyDataText="No se encontraron operadores" Width="100%"
|
||||
ToolTip="Listado de operadores" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Operador">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOperador" runat="server" Text='<%# Eval("Operador") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEsatusString" runat="server" Text='<%# Eval("EstatusString") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-Width="200" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkActualizar" runat="server" OnClick="LnkGvActualizar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ValidationGroup="GrpGV" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DVModalOperador" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalOperador" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalOperdaor" runat="server"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtOperador" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtOperador" runat="server" ControlToValidate="TxtOperador" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Operador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpOperador"></asp:RequiredFieldValidator>
|
||||
<label for="TxtOperador">Operador:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <label for="TxtOperador">Operador:</label>
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding: 0px;">
|
||||
<asp:TextBox Width="115px" ID="TxtFecha" runat="server" CssClass="form-control text-size-14" 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>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="TxtFecha" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpOperador"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpOperador"></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>
|
||||
|
||||
<i></i>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<br ID="saltoDeLinea" runat="server" />
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnModalAgregarOperador" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpOperador" />
|
||||
<button id="Button" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
135
MQ/CatOperadores.aspx.vb
Normal file
135
MQ/CatOperadores.aspx.vb
Normal file
@@ -0,0 +1,135 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatOperadores
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Property CveOperador As Integer
|
||||
Get
|
||||
If ViewState("CveOperador") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveOperador").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOperador") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetOperador(-1, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnAgregarOperador_Click(sender As Object, e As EventArgs) Handles LnkAgregarOperador.Click
|
||||
ResetModalOperador()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DVModalOperador"))
|
||||
End Sub
|
||||
|
||||
Private Sub ResetModalOperador()
|
||||
CveOperador = -1
|
||||
TxtOperador.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
LtlTituloModalOperdaor.Text = "Agregar operador"
|
||||
CheckActiveSection.Visible = False
|
||||
|
||||
UpModalOperador.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
|
||||
CveOperador = GvRow.DataKey("CveOperador").ToEntero
|
||||
TxtOperador.Text = GvRow.DataKey("Operador")
|
||||
'TxtFecha.Text = GvRow.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString.ToEntero = 1, True, False)
|
||||
LtlTituloModalOperdaor.Text = "Actualizar operador"
|
||||
CheckActiveSection.Visible = True
|
||||
|
||||
UpModalOperador.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DVModalOperador"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnModalAgregarOperador.Click
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If CveOperador = -1 Then
|
||||
If Not ObjAF.AddOperador(TxtOperador.Text, If(ChkEstatus.Checked, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
|
||||
If Not ObjAF.UpdateOperador(CveOperador, TxtOperador.Text, If(ChkEstatus.Checked, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
Alert($"Operador { If(CveOperador > 0, "Actualizado", "Agregado") } correctamente.")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DVModalOperador"))
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim CveOperadorEliminar As Integer = GvRow.DataKey("CveOperador").ToEntero
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.RemoveOperador(CveOperadorEliminar, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Operador eliminado correctamente")
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
198
MQ/CatOrdenTrabajo.aspx
Normal file
198
MQ/CatOrdenTrabajo.aspx
Normal file
@@ -0,0 +1,198 @@
|
||||
<%@ Page Title="Catálogo Operadores" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatOrdenTrabajo.aspx.vb" Inherits="AF_CatOrdenTrabajo" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo Ordenes de Trabajo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="" id="Porlet">
|
||||
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate">Obra:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" >
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Folio:</div>
|
||||
<div class="col-md-1">
|
||||
<asp:TextBox runat="server" ID="TxtFolio" CssClass="form-control" Width="50px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" FilterType="Numbers" TargetControlID="TxtFolio" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha de:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha a:
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Etapa:
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlOrdenesTrabajoEstatus" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="EstatusOT" DataValueField="CveEstatusOT">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Equipo A.F.:
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlAF" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="CodDesc" DataValueField="CveActivoFijo" ></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo O.T.:
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlTipoMantenimiento" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="OrdenTrabajoTipo" DataValueField="CveOrdenTrabajoTipo" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoMantenimiento_SelectedIndexChanged"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo:
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlTipoServicio" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveTipoServicio">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">Asignado:</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlOperador" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Operador" DataValueField="CveOperador">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenTrabajo,CveTipoServicio" EmptyDataText="No se Ordenes de Trabajo " Width="100%"
|
||||
ToolTip="Listado de Ordenes de Trabajo" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
|
||||
<asp:BoundField DataField="FechaInicio" HeaderText="Fecha" DataFormatString="{0:dd/MM/yyyy}" />
|
||||
<asp:BoundField DataField="Folio" HeaderText="Folio" />
|
||||
<asp:BoundField DataField="CodigoAF" HeaderText="Unidad" />
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="Obra" />
|
||||
|
||||
<asp:BoundField DataField="EstatusOT" HeaderText="Etapa" />
|
||||
|
||||
<asp:BoundField DataField="OrdenTrabajoTipo" HeaderText="Tipo de O.T." />
|
||||
|
||||
<asp:BoundField DataField="TipoServicio" HeaderText="Tipo" />
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Ir" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<%-- <asp:LinkButton ID="LnkActualizar" runat="server" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" Target="_blank" /> --%>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
179
MQ/CatOrdenTrabajo.aspx.vb
Normal file
179
MQ/CatOrdenTrabajo.aspx.vb
Normal file
@@ -0,0 +1,179 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatOrdenTrabajo
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Property CveOperador As Integer
|
||||
Get
|
||||
If ViewState("CveOperador") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveOperador").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOperador") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
|
||||
|
||||
CargaCombos()
|
||||
'CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub CargaCombos()
|
||||
|
||||
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||
txtFechaI.Text = Now.AddDays(-30).ToString("dd/MM/yyyy")
|
||||
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlSubProyecto.SelectedValueExist(-1)
|
||||
|
||||
|
||||
|
||||
'CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetEstatusOT(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlOrdenesTrabajoEstatus.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlOrdenesTrabajoEstatus.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If ObjAF.GetTiposOT(-1, 1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTipoMantenimiento.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlTipoMantenimiento.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If ObjAF.GetOperador(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlOperador.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlOperador.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If ObjAF.GetOrdenesTrabajoAF(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlAF.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlAF.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
' DdlTipoServicio.DataBind()
|
||||
DdlOrdenesTrabajoEstatus.DataBind()
|
||||
DdlTipoMantenimiento.DataBind()
|
||||
DdlOperador.DataBind()
|
||||
DdlAF.DataBind()
|
||||
|
||||
|
||||
|
||||
DdlOrdenesTrabajoEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlOrdenesTrabajoEstatus.SelectedValueExist(-1)
|
||||
|
||||
DdlOperador.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlOperador.SelectedValueExist(-1)
|
||||
|
||||
DdlTipoMantenimiento.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlTipoMantenimiento.SelectedValueExist(-1)
|
||||
|
||||
DdlAF.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlAF.SelectedValueExist(-1)
|
||||
|
||||
UPFiltros.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
|
||||
Dim Folio As Integer = If(TxtFolio.Text.ToEntero > 0, TxtFolio.Text.ToEntero, -1)
|
||||
|
||||
If ObjAF.GetOrdenesTrabajo(-1, DdlTipoServicio.SelectedValue.ToEntero, Folio, DdlAF.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, -1, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, Nothing, DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlOperador.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.Cells(7).Text = $"<a target='_blank' href='OrdenTrabajo.aspx?CveOrdenTrabajo={e.Row.DataKey("CveOrdenTrabajo").ToString}' class='btn btn-circle btn-sm green' ><i class='fa fa-pencil'></i></a>"
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlTipoMantenimiento_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
If DdlTipoMantenimiento.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposServicios(-1, DdlTipoMantenimiento.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTipoServicio.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlTipoServicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
Else
|
||||
DdlTipoServicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
DdlTipoServicio.DataBind()
|
||||
DdlTipoServicio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
UPFiltros.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
90
MQ/CatOrdenesTrabajoTipos.aspx
Normal file
90
MQ/CatOrdenesTrabajoTipos.aspx
Normal file
@@ -0,0 +1,90 @@
|
||||
<%@ Page Title="AF - Catálogo de Actividades" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="CatOrdenesTrabajoTipos.aspx.cs" Inherits="AF_CatOrdenesTrabajoTipos" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo Tipos Ordenes de Trabajo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregarActividadD" OnClick="BtnAgregarActividadD_Click" data-toggle="tooltip" data-placement="left" title="Agregar un tipo" Text="<i class='fa fa-plus'></i>Agregar Tipo"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveOrdenTrabajoTipo,OrdenTrabajoTipo,CveUsuario,CveEmpresa,Estatus"
|
||||
EmptyDataText="No se encontraron Tipos de ordenes" ToolTip="Listado de Tipos " CssClass="table table-striped table-advance table-hover" Width="50%" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField HeaderText="Tipo" DataField="OrdenTrabajoTipo" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="EstatusStr" />
|
||||
<asp:BoundField HeaderText="Fecha Ingreso" DataField="FechaIng" DataFormatString = "{0:dd/MM/yyyy}" />
|
||||
<asp:BoundField HeaderText="Usuario Ingreso" DataField="Usuario" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditar" OnClick="LnkEditar_Click" runat="server" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Editar' class='fa fa-pencil' title='Editar' ></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></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="DivAgregarTipo" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalTiposD" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalActividad" runat="server">Actividades</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtOrdenTrabajoTipo" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtNombre" runat="server" ControlToValidate="TxtOrdenTrabajoTipo" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||
<label for="TxtNombre">Tipo:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAgregarTipo" OnClick="BtnAgregarTipo_Click" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpTiposD" />
|
||||
<button id="Button3" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
127
MQ/CatOrdenesTrabajoTipos.aspx.cs
Normal file
127
MQ/CatOrdenesTrabajoTipos.aspx.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
|
||||
public partial class AF_CatOrdenesTrabajoTipos : ClsPaginas
|
||||
{
|
||||
private int CveOrdenTrabajoTipo
|
||||
{
|
||||
get
|
||||
{
|
||||
return ViewState["CveOrdenTrabajoTipo"].ToString().ToEntero();
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["CveOrdenTrabajoTipo"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaDatos();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.GetTiposOT(-1, -1, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
GvDatos.DataSource = ObjAF.DtResultados;
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarActividadD_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarTipo.Text = "Agregar";
|
||||
TxtOrdenTrabajoTipo.Text = "";
|
||||
|
||||
LtlTituloModalActividad.Text = "Agregar Tipo";
|
||||
ChkEstatus.Checked = true;
|
||||
CheckActiveSection.Visible = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UpModalTiposD.Update();
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTipo"));
|
||||
}
|
||||
|
||||
protected void LnkEditar_Click(object sender, EventArgs e)
|
||||
{
|
||||
BtnAgregarTipo.Text = "Actualizar";
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveOrdenTrabajoTipo = GvRow.DataKey("CveOrdenTrabajoTipo").ToEntero();
|
||||
TxtOrdenTrabajoTipo.Text = GvRow.DataKey("OrdenTrabajoTipo");
|
||||
|
||||
ChkEstatus.Checked = GvRow.DataKey("Estatus").ToEntero() == 1 ? true : false;
|
||||
CheckActiveSection.Visible = true;
|
||||
|
||||
|
||||
UpModalTiposD.Update();
|
||||
|
||||
LtlTituloModalActividad.Text = "Actualizar Tipo";
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTipo"));
|
||||
}
|
||||
|
||||
protected void LnkEliminar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CveOrdenTrabajoTipo = GvRow.DataKey("CveOrdenTrabajoTipo").ToEntero();
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
if (ObjAF.DeleteTiposOT(CveOrdenTrabajoTipo, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTipo"));
|
||||
Alert("Se eliminó el tipo correctamente");
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
}
|
||||
|
||||
protected void BtnAgregarTipo_Click(object sender, EventArgs e)
|
||||
{
|
||||
ClsAF ObjAF = new ClsAF();
|
||||
|
||||
int Estatus = ChkEstatus.Checked ? 1 : 0;
|
||||
|
||||
if (BtnAgregarTipo.Text == "Agregar")
|
||||
{
|
||||
if (ObjAF.AddTiposOT(TxtOrdenTrabajoTipo.Text, UsuarioActual.CveUsuario, Estatus, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTipo"));
|
||||
Alert("Se agregó el tipo de orden");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ObjAF.UpdateTiposOT(CveOrdenTrabajoTipo, TxtOrdenTrabajoTipo.Text, UsuarioActual.CveUsuario, Estatus, UsuarioActual.CveEmpresa ))
|
||||
{
|
||||
CargaDatos();
|
||||
UpDatos.Update();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTipo"));
|
||||
Alert("Se actualizó el tipo de orden");
|
||||
}
|
||||
}
|
||||
ObjAF.Dispose();
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTipo"));
|
||||
}
|
||||
}
|
||||
80
MQ/CatTipoOrdenTrabajo.aspx
Normal file
80
MQ/CatTipoOrdenTrabajo.aspx
Normal file
@@ -0,0 +1,80 @@
|
||||
<%@ Page Title="Catálogo Operadores" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatTipoOrdenTrabajo.aspx.vb" Inherits="AF_CatTipoOrdenTrabajo" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo Tipos de Ordenes de Trabajo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
|
||||
<a data-toggle="tooltip" data-placement="left" title="Agregar Tipo de Orden de trabajo" href="TipoOrdenTrabajo.aspx" target="_blank" ><i class='fa fa-plus' ></i> Agregar Tipo de Orden de trabajo</a>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveTipoServicio,Nombre" EmptyDataText="No se Ordenes de Trabajo " Width="100%"
|
||||
ToolTip="Listado de Ordenes de Trabajo" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Tipos de O.S." ItemStyle-Width="200" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOrdenTrabajoTipo" runat="server" Text='<%# Eval("OrdenTrabajoTipo") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Descripción">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkActualizar" runat="server" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" Target="_blank" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
73
MQ/CatTipoOrdenTrabajo.aspx.vb
Normal file
73
MQ/CatTipoOrdenTrabajo.aspx.vb
Normal file
@@ -0,0 +1,73 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_CatTipoOrdenTrabajo
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Property CveOperador As Integer
|
||||
Get
|
||||
If ViewState("CveOperador") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveOperador").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOperador") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposServicios(-1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
'Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
' Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
' Dim CveTipoServicio = GvRow.DataKey("CveTipoServicio").ToEntero
|
||||
|
||||
' Response.Redirect($"./TipoOrdenTrabajo.aspx?CveTipoServicio={CveTipoServicio}", True)
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
e.Row.Cells(2).Text = $"<a target='_blank' href='TipoOrdenTrabajo.aspx?CveTipoServicio={e.Row.DataKey("CveTipoServicio").ToString}' class='btn btn-circle btn-sm green' ><i class='fa fa-pencil'></i></a>"
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
4212
MQ/ClsAF.vb
Normal file
4212
MQ/ClsAF.vb
Normal file
File diff suppressed because it is too large
Load Diff
320
MQ/ContratosMaquinariaRentada.aspx
Normal file
320
MQ/ContratosMaquinariaRentada.aspx
Normal file
@@ -0,0 +1,320 @@
|
||||
<%@ Page Title="Contrato Maquinaria Rentada" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ContratosMaquinariaRentada.aspx.vb" Inherits="AF_ContratosMaquinariaRentada" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Contrato Maquinaria Rentada
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<%-- <asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarHorometroDiarioDetalle" data-toggle="tooltip" data-placement="left" title="Agregar Detalle" Text="<i class='fa fa-plus'></i> Agregar Detalle" Visible="false"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpDatosGenerales">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title font-green">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input id="C_chkexpand" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Datos Generales</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlAF" Width="50%" runat="server" CssClass="table-group-action-input form-control input-inline input-sm select2me"
|
||||
AppendDataBoundItems="true" DataTextField="CodDesc" DataValueField="CveActivoFijo" Style="width: 100%;" ValidationGroup="GrpContrato" >
|
||||
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlAF" runat="server" ControlToValidate="DdlAF" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Activo Fijo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpContrato"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlAF.ClientID.ToString()%>">Activo Fijo:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<label for="<%= TxtNumeroEconomico.ClientID.ToString()%>">Numero Económico:</label>
|
||||
<asp:TextBox ID="TxtNumeroEconomico" MaxLength="20" runat="server" Width="120px" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtNumeroEconomico" runat="server" ControlToValidate="TxtNumeroEconomico" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Numero Económico:''</b> es necesario, por favor ingréselo." ValidationGroup="GrpContrato"></asp:RequiredFieldValidator>
|
||||
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="50%" runat="server" CssClass="table-group-action-input form-control input-inline input-sm select2me" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100%;" ValidationGroup="GrpContrato" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione uno" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpContrato"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlSubProyecto.ClientID.ToString()%>">Proyecto:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlOperador" Width="100%" runat="server" CssClass="table-group-action-input form-control input-inline input-sm select2me" AppendDataBoundItems="true" DataTextField="Operador" DataValueField="CveOperador" Style="width: 100%;" ValidationGroup="GrpContrato" >
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlOperador" runat="server" ControlToValidate="DdlOperador" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Operador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpContrato"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlOperador.ClientID.ToString()%>">Operador:</label>
|
||||
</div>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Fecha de llegada:</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="True" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn "><asp:LinkButton ID="ImgCalendarioInicial" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicial" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MEEFechaInicial" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioInicial" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendarioInicial" PopupPosition="BottomRight" BehaviorID="_content_CalendarioInicial"></ajax:CalendarExtender>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpContrato"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpContrato"></asp:CompareValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicial1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px" BehaviorID="_content_VCOFechaInicial1"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicial2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px" BehaviorID="_content_VCOFechaInicial2"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<label for="<%= TxtEntrada.ClientID.ToString()%>">Horómetro de Llegada:</label>
|
||||
<asp:TextBox ID="TxtEntrada" runat="server" Width="120px" MaxLength="5" CssClass="form-control"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtEntrada" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtEntrada" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Horómetro de llegada''</b> es necesario, por favor ingréselo." ValidationGroup="GrpContrato"></asp:RequiredFieldValidator>
|
||||
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<label for="<%= TxtIncluye.ClientID.ToString()%>">Incluye:</label>
|
||||
<asp:TextBox ID="TxtIncluye" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtIncluye" runat="server" ControlToValidate="TxtIncluye" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Incluye''</b> es necesario, por favor ingréselo." ValidationGroup="GrpContrato"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<%-- <div class="col-md-6">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input id="C_chkexpand2" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Horómetro</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
<div class="row ">
|
||||
|
||||
<div class=" form-group form-md-line-input input-iconright col-md-3">
|
||||
|
||||
<label for="<%= TxtEntrada.ClientID.ToString()%>">Entrada:</label>
|
||||
<asp:TextBox ID="TxtEntrada" runat="server" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FILGrpHorometro" runat="server" TargetControlID="TxtEntrada" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVGrpHorometro" runat="server" ControlToValidate="TxtEntrada" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Entrada''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHorometro"></asp:RequiredFieldValidator>
|
||||
|
||||
<i></i>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-3">
|
||||
<label for="<%= TxtSalida.ClientID.ToString()%>">Salida:</label>
|
||||
<asp:TextBox ID="TxtSalida" runat="server" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FILTxtSalida" runat="server" TargetControlID="TxtSalida" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVTxtSalida" runat="server" ControlToValidate="TxtSalida" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Salida''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHorometro"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosDetalle" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row" id="DVDetalles" runat="server" visible ="false">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input id="C_chkexpand3" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Trabajos realizados</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveHorometroDiarioDetalle,CveActividad,Horas" EmptyDataText="No se encontraron Detalles" Width="50%"
|
||||
ToolTip="Listado de Detalles" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Horas" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlHoras" runat="server" Text='<%# Eval("Horas", "{0:###}") %>' ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Actividad" ItemStyle-HorizontalAlign="Left" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEsatusString" runat="server" Text='<%# Eval("Actividad") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkActualizar" runat="server" OnClick="LnkGvActualizar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div style="text-align: center; padding-top: 20px;">
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpContrato" CssClass="btn btn-primary" Visible="true" />
|
||||
|
||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="false" CssClass="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de eliminar el registro?" data-btn-ok-label="si" />
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<%-- <div id="DVModalHorometroDetalle" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalHorometroDetalle" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalDetalle" runat="server"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlActividad" DataTextField="Nombre" DataValueField="CveActividad" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlActividad.ClientID.ToString()%>">Actividad:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlActividad" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlActividad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Actividad''</b> es necesario." InitialValue="-1" ValidationGroup="GrpHorometroDetalle"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHoras" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FILTxtHoras" runat="server" TargetControlID="TxtHoras" FilterType="Numbers" InvalidChars=".+-," />
|
||||
<asp:RequiredFieldValidator ID="EFVTxtHoras" runat="server" ControlToValidate="TxtHoras" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Horas''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHorometroDetalle"></asp:RequiredFieldValidator>
|
||||
|
||||
<label for="TxtHoras">Horas:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br ID="saltoDeLinea" runat="server" />
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnModalAgregarHorometroDetalle" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpHorometroDetalle" />
|
||||
<button id="Button" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
364
MQ/ContratosMaquinariaRentada.aspx.vb
Normal file
364
MQ/ContratosMaquinariaRentada.aspx.vb
Normal file
@@ -0,0 +1,364 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Globalization
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_ContratosMaquinariaRentada
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Property CveHorometroDiario As Integer
|
||||
Get
|
||||
If ViewState("CveHorometroDiario") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveHorometroDiario").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveHorometroDiario") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Property CveHorometroDiarioDetalle As Integer
|
||||
Get
|
||||
If ViewState("CveHorometroDiarioDetalle") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveHorometroDiarioDetalle").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveHorometroDiarioDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargCombos()
|
||||
|
||||
|
||||
If Request("CveHorometroDiario") IsNot Nothing AndAlso Request("CveHorometroDiario").ToString.ToEntero > 0 Then
|
||||
CveHorometroDiario = Request("CveHorometroDiario").ToString.ToEntero
|
||||
|
||||
' LnkAgregarHorometroDiarioDetalle.Visible = True
|
||||
DVDetalles.Visible = True
|
||||
|
||||
CargaDatos()
|
||||
CargaDetalles()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargCombos()
|
||||
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
Dim ObjAF As New ClsAF()
|
||||
|
||||
'If ObjAF.GetOperador(-1, UsuarioActual.CveEmpresa) Then
|
||||
' DdlOperador.DataSource = ObjAF.DtResultados.FiltraParametros("Estatus = 1")
|
||||
'Else
|
||||
' DdlOperador.DataSource = Nothing
|
||||
'End If
|
||||
'ObjAF.Dispose()
|
||||
|
||||
'DdlOperador.DataBind()
|
||||
'DdlOperador.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpDatosGenerales.Update()
|
||||
|
||||
|
||||
|
||||
'ObjAF = New ClsAF()
|
||||
|
||||
'If ObjAF.GetActividades(-1, -1, UsuarioActual.CveEmpresa, 1) Then
|
||||
' DdlActividad.DataSource = ObjAF.DtResultados
|
||||
'Else
|
||||
' DdlActividad.DataSource = Nothing
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
'DdlActividad.DataBind()
|
||||
'DdlActividad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
DdlAF.DataBind()
|
||||
DdlAF.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
'If CveHorometroDiario > 0 Then
|
||||
|
||||
' Dim ObjAF As New ClsAF
|
||||
|
||||
' If ObjAF.GetHorometroDiario(MinFecha, MaxFecha, CveHorometroDiario, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
' DdlAF.SelectedValueExist(ObjAF.DtResultados.Rows(0)("CveActivoFijo").ToString.ToEntero)
|
||||
' 'DdlOperador.SelectedValueExist(ObjAF.DtResultados.Rows(0)("CveOperador").ToString.ToEntero)
|
||||
' DdlSubProyecto.SelectedValueExist(ObjAF.DtResultados.Rows(0)("CveSubProyecto").ToString.ToEntero)
|
||||
|
||||
' TxtFecha.Text = ObjAF.DtResultados.Rows(0)("Fecha").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
' TxtEntrada.Text = ObjAF.DtResultados.Rows(0)("Entrada").ToString
|
||||
' TxtSalida.Text = ObjAF.DtResultados.Rows(0)("Salida").ToString
|
||||
|
||||
' End If
|
||||
|
||||
' ObjAF.Dispose()
|
||||
' UpDatosGenerales.Update()
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDetalles()
|
||||
|
||||
'Dim ObjAF As New ClsAF
|
||||
|
||||
'If ObjAF.GetHorometroDiarioDetalleDetalle(CveHorometroDiario, UsuarioActual.CveEmpresa) Then
|
||||
' GvDatos.DataSource = ObjAF.DtResultados
|
||||
'Else
|
||||
' GvDatos.DataSource = Nothing
|
||||
'End If
|
||||
|
||||
'ObjAF.Dispose()
|
||||
'GvDatos.DataBind()
|
||||
|
||||
'UpDatosDetalle.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
'Protected Sub LnkAgregarHorometroDiarioDetalle_Click(sender As Object, e As EventArgs) Handles LnkAgregarHorometroDiarioDetalle.Click
|
||||
|
||||
|
||||
' CveHorometroDiarioDetalle = -1
|
||||
' 'LtlTituloModalDetalle.Text = "Agregar Detalle"
|
||||
' ResetModalActividades()
|
||||
' RegistraScript($"$('#DVModalHorometroDetalle').modal('show');")
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Sub ResetModalActividades()
|
||||
|
||||
'DdlActividad.SelectedValueExist(-1)
|
||||
' TxtHoras.Text = ""
|
||||
'UpModalHorometroDetalle.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
'' LtlTituloModalDetalle.Text = "Actualizar Detalle"
|
||||
|
||||
'CveHorometroDiarioDetalle = GvRow.DataKey("CveHorometroDiarioDetalle").ToEntero
|
||||
'DdlActividad.SelectedValueExist(GvRow.DataKey("CveActividad").ToString)
|
||||
'TxtHoras.Text = GvRow.DataKey("Horas").ToEntero.ToString
|
||||
|
||||
'UpModalHorometroDetalle.Update()
|
||||
|
||||
'RegistraScript($"$('#DVModalHorometroDetalle').modal('show');")
|
||||
|
||||
End Sub
|
||||
|
||||
'Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnModalAgregarHorometroDetalle.Click
|
||||
|
||||
|
||||
' Dim ObjAF As New ClsAF
|
||||
' Dim ErrorProceso As Boolean = False
|
||||
|
||||
' If CveHorometroDiarioDetalle > 0 Then
|
||||
|
||||
' If ObjAF.UpdateHorometroDiarioDetalle(CveHorometroDiarioDetalle, CveHorometroDiario, DdlActividad.SelectedValue.ToEntero, TxtHoras.Text.ToDecimal) Then
|
||||
' Alert("Detalle agregado correctamente.")
|
||||
' RegistraScript($"$('#DVModalHorometroDetalle').modal('hide');")
|
||||
' ErrorProceso = False
|
||||
' Else
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
|
||||
' Else
|
||||
' If ObjAF.AddHorometroDiarioDetalle(CveHorometroDiario, DdlActividad.SelectedValue.ToEntero, TxtHoras.Text.ToDecimal) Then
|
||||
' Alert("Detalle actualizado correctamente.")
|
||||
' RegistraScript($"$('#DVModalHorometroDetalle').modal('hide');")
|
||||
' ErrorProceso = False
|
||||
' Else
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
' ObjAF.Dispose()
|
||||
|
||||
' If Not ErrorProceso Then
|
||||
' CargaDetalles()
|
||||
' End If
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
'Dim ErrorProceso As Boolean = False
|
||||
|
||||
'Dim ObjAF As New ClsAF
|
||||
'Dim CveHorometroDiarioDetalleEliminar As Integer = GvRow.DataKey("CveHorometroDiarioDetalle").ToEntero
|
||||
|
||||
'If ObjAF.RemoveHorometroDiarioDetalle(CveHorometroDiarioDetalleEliminar) Then
|
||||
' Alert("Detalle eliminado correctamente.")
|
||||
' ErrorProceso = False
|
||||
'Else
|
||||
' ErrorProceso = True
|
||||
'End If
|
||||
|
||||
'ObjAF.Dispose()
|
||||
|
||||
'If Not ErrorProceso Then
|
||||
' CargaDetalles()
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
|
||||
|
||||
|
||||
'If TxtEntrada.Text.ToDecimal > TxtSalida.Text.ToDecimal Then
|
||||
' Alert("La salida no puede ser inferior a la entrada", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
'Dim ErrorProceso As Boolean = False
|
||||
'Dim ObjAF As New ClsAF
|
||||
|
||||
'ObjAF.IniciaTransacSQL()
|
||||
|
||||
|
||||
'Dim Anio As Integer = TxtFecha.Text.ToDate.Year
|
||||
'Dim Semana As Integer = GetIso8601WeekOfYear(TxtFecha.Text.ToDate)
|
||||
'Dim DiaSemana As Integer = GetDayOfWeek(TxtFecha.Text.ToDate.DayOfWeek)
|
||||
|
||||
|
||||
'If CveHorometroDiario > 0 Then
|
||||
|
||||
' If ObjAF.UpdateHorometroDiario(CveHorometroDiario, DdlAF.SelectedValue.ToEntero, DdlOperador.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, TxtFecha.Text.ToDate, TxtEntrada.Text.ToDecimal, TxtSalida.Text.ToDecimal,
|
||||
' UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Anio, Semana, DiaSemana) Then
|
||||
' Alert("Actualizado correctamente.")
|
||||
' Else
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
|
||||
'Else
|
||||
|
||||
' If ObjAF.AddHorometroDiario(DdlAF.SelectedValue.ToEntero, DdlOperador.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, TxtFecha.Text.ToDate, TxtEntrada.Text.ToDecimal, TxtSalida.Text.ToDecimal, UsuarioActual.CveUsuario,
|
||||
' UsuarioActual.CveEmpresa, Anio, Semana, DiaSemana) Then
|
||||
|
||||
' CveHorometroDiario = ObjAF.CveHorometroDiario
|
||||
|
||||
' If CveHorometroDiario > 0 Then
|
||||
|
||||
' ErrorProceso = False
|
||||
' Alert("Regsitro guardado correctamente.", TipoMensaje.MsgInformacion, $"location.href=""HorometroDiario.aspx?CveHorometroDiario={CveHorometroDiario}""")
|
||||
|
||||
' Else
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
' Else
|
||||
' ErrorProceso = True
|
||||
' End If
|
||||
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'If ErrorProceso Then
|
||||
' ObjAF.RollBack()
|
||||
'Else
|
||||
' ObjAF.Commit()
|
||||
'End If
|
||||
|
||||
'ObjAF.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Function GetIso8601WeekOfYear(time As Date) As Integer
|
||||
|
||||
|
||||
' Seriously cheat. If its Monday, Tuesday Or Wednesday, then it'll
|
||||
' be the same week# as whatever Thursday, Friday Or Saturday are,
|
||||
' And we always get those right
|
||||
Dim day As DayOfWeek = CultureInfo.InvariantCulture.Calendar.GetDayOfWeek(time)
|
||||
|
||||
If (day >= DayOfWeek.Monday And day <= DayOfWeek.Wednesday) Then
|
||||
time = time.AddDays(3)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
' Return the week of our adjusted day
|
||||
Return CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(time, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday)
|
||||
|
||||
End Function
|
||||
|
||||
Private Function GetDayOfWeek(Dia As DayOfWeek) As Integer
|
||||
|
||||
Select Case Dia
|
||||
Case DayOfWeek.Monday
|
||||
Return 1
|
||||
Case DayOfWeek.Tuesday
|
||||
Return 2
|
||||
Case DayOfWeek.Wednesday
|
||||
Return 3
|
||||
Case DayOfWeek.Thursday
|
||||
Return 4
|
||||
Case DayOfWeek.Friday
|
||||
Return 5
|
||||
Case DayOfWeek.Saturday
|
||||
Return 6
|
||||
Case DayOfWeek.Sunday
|
||||
Return 7
|
||||
Case Else
|
||||
Return 1
|
||||
End Select
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
284
MQ/HorometroDiario.aspx
Normal file
284
MQ/HorometroDiario.aspx
Normal file
@@ -0,0 +1,284 @@
|
||||
<%@ Page Title="Horometro Diario" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="HorometroDiario.aspx.vb" Inherits="AF_HorometroDiario" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Registro Horómetro Diario
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarHorometroDiarioDetalle" data-toggle="tooltip" data-placement="left" title="Agregar Detalle" Text="<i class='fa fa-plus'></i> Agregar Detalle" Visible="false"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpDatosGenerales">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input id="C_chkexpand" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Datos Generales</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" CssClass="table-group-action-input form-control input-inline input-sm select2me" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100%;" ValidationGroup="GrpHorometro" AutoPostBack="true" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione uno" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHorometro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlSubProyecto.ClientID.ToString()%>">Proyecto:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlAF" Width="100%" runat="server" CssClass="table-group-action-input form-control input-inline input-sm select2me" AppendDataBoundItems="true" DataTextField="CodDesc" DataValueField="CveActivoFijo" Style="width: 100%;" ValidationGroup="GrpHorometro" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione uno" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlAF" runat="server" ControlToValidate="DdlAF" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Activo Fijo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHorometro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlAF.ClientID.ToString()%>">Activo Fijo:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlOperador" Width="100%" runat="server" CssClass="table-group-action-input form-control input-inline input-sm select2me" AppendDataBoundItems="true" DataTextField="Operador" DataValueField="CveOperador" Style="width: 100%;" ValidationGroup="GrpHorometro" >
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlOperador" runat="server" ControlToValidate="DdlOperador" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Operador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHorometro"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlOperador.ClientID.ToString()%>">Operador:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-3 truncate">Fecha :</label>
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="True" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn "><asp:LinkButton ID="ImgCalendarioInicial" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton></span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicial" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" BehaviorID="_content_MEEFechaInicial" Century="2000" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder=""></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioInicial" runat="server" TargetControlID="TxtFecha" PopupButtonID="ImgCalendarioInicial" PopupPosition="BottomRight" BehaviorID="_content_CalendarioInicial"></ajax:CalendarExtender>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpHorometro"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpHorometro"></asp:CompareValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicial1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px" BehaviorID="_content_VCOFechaInicial1"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaInicial2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px" BehaviorID="_content_VCOFechaInicial2"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input id="C_chkexpand2" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Horómetro</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
<div class="row ">
|
||||
|
||||
<div class=" form-group form-md-line-input input-iconright col-md-3">
|
||||
|
||||
<label for="<%= TxtEntrada.ClientID.ToString()%>">Entrada:</label>
|
||||
<asp:TextBox ID="TxtEntrada" runat="server" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FILGrpHorometro" runat="server" TargetControlID="TxtEntrada" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVGrpHorometro" runat="server" ControlToValidate="TxtEntrada" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Entrada''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHorometro"></asp:RequiredFieldValidator>
|
||||
|
||||
<i></i>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright col-md-3">
|
||||
<label for="<%= TxtSalida.ClientID.ToString()%>">Salida:</label>
|
||||
<asp:TextBox ID="TxtSalida" runat="server" Width="70px" CssClass="form-control"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FILTxtSalida" runat="server" TargetControlID="TxtSalida" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RFVTxtSalida" runat="server" ControlToValidate="TxtSalida" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Salida''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHorometro"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosDetalle" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row" id="DVDetalles" runat="server" visible ="false">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet smmallpadding light bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="tools">
|
||||
<a href="javascript;" data-idchekbox="C_chkexpand" class=" collapse" data-original-title="" title=""></a><span class="hidden">
|
||||
<input id="C_chkexpand3" type="checkbox" name="ctl00$C$chkexpand" checked="checked"></span>
|
||||
</div>
|
||||
<div class="caption uppercase" style="position: relative;"><i class="fa fa-info-circle"></i>Trabajos realizados</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveHorometroDiarioDetalle,CveActividad,Horas" EmptyDataText="No se encontraron Detalles" Width="50%"
|
||||
ToolTip="Listado de Detalles" CssClass="table table-striped table-advance table-hover" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Horas" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlHoras" runat="server" Text='<%# Eval("Horas", "{0:###}") %>' ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Actividad" ItemStyle-HorizontalAlign="Left" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEsatusString" runat="server" Text='<%# Eval("Actividad") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkActualizar" runat="server" OnClick="LnkGvActualizar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<div style="text-align: center; padding-top: 20px;">
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpHorometro" CssClass="btn btn-primary" Visible="true" />
|
||||
|
||||
<asp:Button ID="BtnEliminar" runat="server" Text="Eliminar" Visible="false" CssClass="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Esta seguro de eliminar el registro?" data-btn-ok-label="si" />
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DVModalHorometroDetalle" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalHorometroDetalle" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalDetalle" runat="server"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlActividad" DataTextField="Nombre" DataValueField="CveActividad" CausesValidation="true" runat="server" Width="100%" AppendDataBoundItems="true" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<label for="<%= DdlActividad.ClientID.ToString()%>">Actividad:</label>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlActividad" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlActividad" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Actividad''</b> es necesario." InitialValue="-1" ValidationGroup="GrpHorometroDetalle"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHoras" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FILTxtHoras" runat="server" TargetControlID="TxtHoras" FilterType="Numbers" InvalidChars=".+-," />
|
||||
<asp:RequiredFieldValidator ID="EFVTxtHoras" runat="server" ControlToValidate="TxtHoras" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Horas''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHorometroDetalle"></asp:RequiredFieldValidator>
|
||||
|
||||
<label for="TxtHoras">Horas:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<br ID="saltoDeLinea" runat="server" />
|
||||
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnModalAgregarHorometroDetalle" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpHorometroDetalle" />
|
||||
<button id="Button" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
309
MQ/HorometroDiario.aspx.vb
Normal file
309
MQ/HorometroDiario.aspx.vb
Normal file
@@ -0,0 +1,309 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_HorometroDiario
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Property CveHorometroDiario As Integer
|
||||
Get
|
||||
If ViewState("CveHorometroDiario") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveHorometroDiario").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveHorometroDiario") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Property CveHorometroDiarioDetalle As Integer
|
||||
Get
|
||||
If ViewState("CveHorometroDiarioDetalle") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveHorometroDiarioDetalle").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveHorometroDiarioDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargCombos()
|
||||
|
||||
|
||||
If Request("CveHorometroDiario") IsNot Nothing AndAlso Request("CveHorometroDiario").ToString.ToEntero > 0 Then
|
||||
CveHorometroDiario = Request("CveHorometroDiario").ToString.ToEntero
|
||||
|
||||
LnkAgregarHorometroDiarioDetalle.Visible = True
|
||||
DVDetalles.Visible = True
|
||||
|
||||
CargaDatos()
|
||||
CargaDetalles()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargCombos()
|
||||
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa)
|
||||
DdlAF.DataBind()
|
||||
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
Dim ObjAF As New ClsAF()
|
||||
|
||||
If ObjAF.GetOperador(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlOperador.DataSource = ObjAF.DtResultados.FiltraParametros("Estatus = 1")
|
||||
Else
|
||||
DdlOperador.DataSource = Nothing
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
|
||||
DdlOperador.DataBind()
|
||||
DdlOperador.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpDatosGenerales.Update()
|
||||
|
||||
|
||||
|
||||
ObjAF = New ClsAF()
|
||||
|
||||
If ObjAF.GetActividades(-1, -1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlActividad.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlActividad.DataSource = Nothing
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
|
||||
DdlActividad.DataBind()
|
||||
DdlActividad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
If CveHorometroDiario > 0 Then
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetHorometroDiario(MinFecha, MaxFecha, CveHorometroDiario, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
DdlAF.SelectedValueExist(ObjAF.DtResultados.Rows(0)("CveActivoFijo").ToString.ToEntero)
|
||||
DdlOperador.SelectedValueExist(ObjAF.DtResultados.Rows(0)("CveOperador").ToString.ToEntero)
|
||||
DdlSubProyecto.SelectedValueExist(ObjAF.DtResultados.Rows(0)("CveSubProyecto").ToString.ToEntero)
|
||||
|
||||
TxtFecha.Text = ObjAF.DtResultados.Rows(0)("Fecha").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
TxtEntrada.Text = ObjAF.DtResultados.Rows(0)("Entrada").ToString
|
||||
TxtSalida.Text = ObjAF.DtResultados.Rows(0)("Salida").ToString
|
||||
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
UpDatosGenerales.Update()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDetalles()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetHorometroDiarioDetalleDetalle(CveHorometroDiario, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpDatosDetalle.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkAgregarHorometroDiarioDetalle_Click(sender As Object, e As EventArgs) Handles LnkAgregarHorometroDiarioDetalle.Click
|
||||
|
||||
|
||||
CveHorometroDiarioDetalle = -1
|
||||
LtlTituloModalDetalle.Text = "Agregar Detalle"
|
||||
ResetModalActividades()
|
||||
RegistraScript($"$('#DVModalHorometroDetalle').modal('show');")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ResetModalActividades()
|
||||
|
||||
DdlActividad.SelectedValueExist(-1)
|
||||
TxtHoras.Text = ""
|
||||
UpModalHorometroDetalle.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
LtlTituloModalDetalle.Text = "Actualizar Detalle"
|
||||
|
||||
CveHorometroDiarioDetalle = GvRow.DataKey("CveHorometroDiarioDetalle").ToEntero
|
||||
DdlActividad.SelectedValueExist(GvRow.DataKey("CveActividad").ToString)
|
||||
TxtHoras.Text = GvRow.DataKey("Horas").ToEntero.ToString
|
||||
|
||||
UpModalHorometroDetalle.Update()
|
||||
|
||||
RegistraScript($"$('#DVModalHorometroDetalle').modal('show');")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnModalAgregarHorometroDetalle.Click
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If CveHorometroDiarioDetalle > 0 Then
|
||||
|
||||
If ObjAF.UpdateHorometroDiarioDetalle(CveHorometroDiarioDetalle, CveHorometroDiario, DdlActividad.SelectedValue.ToEntero, TxtHoras.Text.ToDecimal) Then
|
||||
Alert("Detalle agregado correctamente.")
|
||||
RegistraScript($"$('#DVModalHorometroDetalle').modal('hide');")
|
||||
ErrorProceso = False
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
Else
|
||||
If ObjAF.AddHorometroDiarioDetalle(CveHorometroDiario, DdlActividad.SelectedValue.ToEntero, TxtHoras.Text.ToDecimal) Then
|
||||
Alert("Detalle actualizado correctamente.")
|
||||
RegistraScript($"$('#DVModalHorometroDetalle').modal('hide');")
|
||||
ErrorProceso = False
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
If Not ErrorProceso Then
|
||||
CargaDetalles()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim CveHorometroDiarioDetalleEliminar As Integer = GvRow.DataKey("CveHorometroDiarioDetalle").ToEntero
|
||||
|
||||
If ObjAF.RemoveHorometroDiarioDetalle(CveHorometroDiarioDetalleEliminar) Then
|
||||
Alert("Detalle eliminado correctamente.")
|
||||
ErrorProceso = False
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
If Not ErrorProceso Then
|
||||
CargaDetalles()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
ObjAF.IniciaTransacSQL()
|
||||
|
||||
If CveHorometroDiario > 0 Then
|
||||
|
||||
If ObjAF.UpdateHorometroDiario(CveHorometroDiario, DdlAF.SelectedValue.ToEntero, DdlOperador.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, TxtFecha.Text.ToDate, TxtEntrada.Text.ToDecimal, TxtSalida.Text.ToDecimal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Actualizado correctamente.")
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If ObjAF.AddHorometroDiario(DdlAF.SelectedValue.ToEntero, DdlOperador.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, TxtFecha.Text.ToDate, TxtEntrada.Text.ToDecimal, TxtSalida.Text.ToDecimal, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
CveHorometroDiario = ObjAF.CveHorometroDiario
|
||||
|
||||
If CveHorometroDiario > 0 Then
|
||||
|
||||
ErrorProceso = False
|
||||
Alert("Regsitro guardado correctamente.", TipoMensaje.MsgInformacion, $"location.href=""HorometroDiario.aspx?CveHorometroDiario={CveHorometroDiario}""")
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If ErrorProceso Then
|
||||
ObjAF.RollBack()
|
||||
Else
|
||||
ObjAF.Commit()
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubProyecto.SelectedIndexChanged
|
||||
|
||||
DdlAF.Items.Clear()
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyecto.SelectedValue}")
|
||||
DdlAF.DataBind()
|
||||
Else
|
||||
DdlAF.DataSource = Nothing
|
||||
DdlAF.DataBind()
|
||||
End If
|
||||
|
||||
DdlAF.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpDatosGenerales.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
621
MQ/OrdenTrabajo.aspx
Normal file
621
MQ/OrdenTrabajo.aspx
Normal file
@@ -0,0 +1,621 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OrdenTrabajo.aspx.vb" Inherits="AF_OrdenTrabajo" EnableEventValidation = "false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Ordenes de Trabajo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGeneral" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 ">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-table font-green"></i>
|
||||
<span class="caption-subject bold uppercase">
|
||||
<asp:Label runat="server" ID="LblSubProyecto2"></asp:Label></span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<%--<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" class="btn btn-success" />--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AutoPostBack="true" OnSelectedIndexChanged="DdlSubProyecto_SelectedIndexChanged"></asp:DropDownList>
|
||||
<label for="<%= DdlSubProyecto.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblSubProyecto" Text=""></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" InitialValue="-1" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlAF" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="CodDesc" DataValueField="CveActivoFijo" ></asp:DropDownList>
|
||||
<label for="<%= DdlAF.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblAF" Text="Equipo A.F."></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlAF" runat="server" InitialValue="-1" ControlToValidate="DdlAF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Equipo A.F.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoMantenimiento" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="OrdenTrabajoTipo" DataValueField="CveOrdenTrabajoTipo" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoMantenimiento_SelectedIndexChanged"></asp:DropDownList>
|
||||
<label for="<%= DdlTipoMantenimiento.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblTipo" Text="Tipo O.T:"></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoServicio" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Nombre" DataValueField="CveTipoServicio">
|
||||
<asp:ListItem Value="-1">Seleccione Uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoServicio.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblTipoServicio" Text="Tipo"></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoServicio" runat="server" InitialValue="-1" ControlToValidate="DdlAF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Equipo A.F.''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox CssClass="form-control" ID="TxtServicio" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtServicio" runat="server" Text="Servicio"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtServicio" runat="server" ControlToValidate="TxtServicio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
--%>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 ">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-table font-green"></i>
|
||||
<span class="caption-subject bold uppercase">
|
||||
<asp:Label runat="server" ID="Label1"></asp:Label></span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<%--<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" class="btn btn-success" />--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="row" runat="server" id="DVFolioAsignado" visible="false" >
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-inline ">
|
||||
<label >Folio: </label>
|
||||
<asp:Label runat="server" ID="LblFolio" ForeColor="Red" CssClass=""></asp:Label>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<%-- <div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= LblAsiganado.ClientID.ToString()%>">Asignado:</label>
|
||||
<asp:Label runat="server" ID="LblAsiganado" CssClass="form-control"></asp:Label>
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrioridad" CssClass="form-control input-sm select2me" Width="100%" runat="server">
|
||||
<asp:ListItem Value="1">Baja</asp:ListItem>
|
||||
<asp:ListItem Value="2">Media</asp:ListItem>
|
||||
<asp:ListItem Value="3">Alta</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPrioridad.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblPrioridad" Text="Prioridad"></asp:Label>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= txtFechaI.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblFechaInicio" Text="Fecha Inicio"></asp:Label>
|
||||
</label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" 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="GrpGuardar"></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="GrpGuardar"></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>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div runat="server" id="DVFechaFin" visible="false" class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= txtFechaF.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblFechaFin" Text="Fecha Fin"></asp:Label>
|
||||
</label>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox Width="100px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></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>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div runat="server" id="DVEstatus" visible="true" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlOrdenesTrabajoEstatus" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="EstatusOT" DataValueField="CveEstatusOT">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlOrdenesTrabajoEstatus.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblEstatus" Text="Estatus"></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlOrdenesTrabajoEstatus" runat="server" InitialValue="-1" ControlToValidate="DdlOrdenesTrabajoEstatus" Display="Dynamic" 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>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlOperador" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="Operador" DataValueField="CveOperador">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlOperador.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblOperador" Text="Asignar a"></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlOperador" runat="server" InitialValue="-1" ControlToValidate="DdlOperador" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Operador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" Visible="false">
|
||||
|
||||
<ajax:TabPanel ID="TabMaterial" runat="server" HeaderText="Material">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvMaterial" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvMaterial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
OnRowDataBound="GvMaterial_RowDataBound"
|
||||
DataKeyNames="CveMaterial,Cantidad,CvePS,Importe,Faltante"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField DataField="Cantidad" ItemStyle-Width="15%" HeaderText="Cantidad" />
|
||||
<asp:BoundField DataField="Abreviatura" ItemStyle-Width="15%" HeaderText="U.M." />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="45%" HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("PS") %>' Width="220px"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="45%" HeaderText="Importe" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" runat="server" Text='<%# Eval("Importe") %>' Width="100px"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="150px" HeaderText="Faltante" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
Faltante
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:Label ID="LtlFaltante" runat="server" Text='<%# Eval("Faltante") %>' ></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:HyperLink Visible="false" ID="HLOC" runat="server" Target="_blank" CssClass="Texto" data-toggle="tooltip" data-placement="top" title="Crear orden de compra" Text="<i class='fa fa-shopping-cart'></i> OC" ></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabActividades" runat="server" HeaderText="Actividades" >
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvActividades" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActividades" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
OnRowDataBound="GvActividades_RowDataBound"
|
||||
DataKeyNames="CveOrdenTrabajoActividad,CveActividad,Terminado" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="Actividad" ItemStyle-Width="30%" HeaderText="Detalle" />
|
||||
<asp:BoundField DataField="Duracion" ItemStyle-Width="30%" HeaderText="Duración (hrs)" />
|
||||
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<ItemStyle Width="300px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtObservaciones" Text='<%# Eval("Observaciones") %>' Width="300px" MaxLength="200"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:BoundField DataField="Nombre" ItemStyle-Width="30%" HeaderText="Actividad" />
|
||||
<asp:BoundField DataField="Puesto" ItemStyle-Width="30%" HeaderText="Puesto" />--%>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabCheckList" runat="server" HeaderText="Check List">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvCheckList" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvCheckList" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
OnRowDataBound="GvCheckList_RowDataBound"
|
||||
DataKeyNames="CveOrdenTrabajoCheckList,CveCheckListActividad,CheckListActividadGrupo,Estatus,Terminado"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="No.">
|
||||
<ItemStyle Width="200px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNROW" runat="server" Text='<%# Eval("NROWO")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Componentes Inspección">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCheckListActividad" runat="server" Text='<%# Eval("CheckListActividad")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Condiciones operativas" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemStyle Width="180px" />
|
||||
<HeaderTemplate>
|
||||
<table style="width:180px">
|
||||
<tr><td colspan="3">Condiciones Operativas</td></tr>
|
||||
<tr>
|
||||
<td style="width:60px">Si</td>
|
||||
<td style="width:60px">No</td>
|
||||
<td style="width:60px">ND</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
|
||||
|
||||
|
||||
<asp:RadioButtonList ID="RDLSINOND" runat="server" RepeatDirection="Horizontal" Width="180px" >
|
||||
<asp:ListItem Value="1" ><label style="width:30px!important"></asp:ListItem>
|
||||
<asp:ListItem Value="2"><label style="width:30px!important"></asp:ListItem>
|
||||
<asp:ListItem Value="3"><label style="width:30px!important"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<ItemStyle Width="300px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtObservaciones" Text='<%# Eval("Observaciones") %>' Width="300px" MaxLength="200"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabHerramientas" runat="server" HeaderText="Herramientas">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpGvHerramientas" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:GridView ID="GvHerramientas" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveOrdenTrabajoHerramienta,CveHerramientaOT,Observaciones" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="HerramientaOT" ItemStyle-Width="30%" HeaderText="Herramienta" />
|
||||
<%--<asp:BoundField DataField="Duracion" ItemStyle-Width="30%" HeaderText="Duración (hrs)" />
|
||||
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<ItemStyle Width="300px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtObservaciones" Text='<%# Eval("Observaciones") %>' Width="300px" MaxLength="200"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabSubContrataciones" runat="server" HeaderText="Sub Contrataciones">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpGvSubContrataciones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:GridView ID="GvSubContrataciones" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveOrdenTrabajoSubContratacion,CveSubContratacion,Observaciones" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="SubContratacion" ItemStyle-Width="30%" HeaderText="Sub Contrataciones" />
|
||||
<%--<asp:BoundField DataField="Duracion" ItemStyle-Width="30%" HeaderText="Duración (hrs)" />
|
||||
|
||||
<asp:TemplateField HeaderText="Observaciones">
|
||||
<ItemStyle Width="300px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtObservaciones" Text='<%# Eval("Observaciones") %>' Width="300px" MaxLength="200"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
<div id="ModalDescargaReporte" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel ID="UpModalTitleModalDescargaReporte" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="LtlModalTitleModalDescargaReporte" runat="server">Descarga reporte </asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalCuerpoModalDescargaReporte" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<p>Metricas guardadas correctamente.</p>
|
||||
<%-- <asp:LinkButton ID="LnkDescargaReporte" runat="server" OnClick="LnkDescargaReporte_Click">
|
||||
<i class="fa fa-arrow-down" style="font-weight:bold;"></i> Descarga Reporte Excel</asp:LinkButton>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<%-- <asp:PostBackTrigger ControlID="LnkDescargaReporte" />--%>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:center">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" Visible="true" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
579
MQ/OrdenTrabajo.aspx.vb
Normal file
579
MQ/OrdenTrabajo.aspx.vb
Normal file
@@ -0,0 +1,579 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class AF_OrdenTrabajo
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region " PROPIEDADES"
|
||||
|
||||
Property CveOrdenTrabajo As Integer
|
||||
Get
|
||||
If ViewState("CveOrdenTrabajo") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveOrdenTrabajo").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOrdenTrabajo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CveOrdenCompra As Integer
|
||||
Get
|
||||
If ViewState("CveOrdenCompra") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveOrdenCompra").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOrdenCompra") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaCombos()
|
||||
|
||||
If Request("CveOrdenTrabajo") IsNot Nothing Then
|
||||
CveOrdenTrabajo = Request("CveOrdenTrabajo").ToEntero
|
||||
|
||||
If CveOrdenTrabajo > 0 Then
|
||||
|
||||
DVFechaFin.Visible = True
|
||||
DVFolioAsignado.Visible = True
|
||||
DVEstatus.Visible = True
|
||||
|
||||
Tab.Visible = True
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA PARAMETROS "
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
|
||||
Protected Sub CargaCombos()
|
||||
|
||||
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlSubProyecto.SelectedValueExist(-1)
|
||||
|
||||
LblSubProyecto.Text = "Obra"
|
||||
|
||||
'CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
|
||||
DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa, -1)
|
||||
DdlAF.DataBind()
|
||||
|
||||
DdlAF.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetEstatusOT(-1, UsuarioActual.CveEmpresa, 1) Then
|
||||
DdlOrdenesTrabajoEstatus.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlOrdenesTrabajoEstatus.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If ObjAF.GetTiposOT(-1, 1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTipoMantenimiento.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlTipoMantenimiento.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
If ObjAF.GetOperador(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlOperador.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlOperador.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
' DdlTipoServicio.DataBind()
|
||||
DdlOrdenesTrabajoEstatus.DataBind()
|
||||
DdlTipoMantenimiento.DataBind()
|
||||
DdlOperador.DataBind()
|
||||
|
||||
|
||||
|
||||
DdlOrdenesTrabajoEstatus.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlOrdenesTrabajoEstatus.SelectedValueExist(-1)
|
||||
|
||||
DdlOperador.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlOperador.SelectedValueExist(-1)
|
||||
|
||||
|
||||
DdlTipoMantenimiento.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlTipoMantenimiento.SelectedValueExist(-1)
|
||||
|
||||
|
||||
|
||||
|
||||
UpGeneral.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlTipoMantenimiento_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
If DdlTipoMantenimiento.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetTiposServicios(-1, DdlTipoMantenimiento.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTipoServicio.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
DdlTipoServicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
Else
|
||||
DdlTipoServicio.DataSource = Nothing
|
||||
End If
|
||||
|
||||
DdlTipoServicio.DataBind()
|
||||
DdlTipoServicio.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
UpGeneral.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region " GV DATOS "
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetOrdenesTrabajo(CveOrdenTrabajo, -1, -1, -1, -1, -1, MinFecha, MaxFecha, Nothing, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
|
||||
If ObjAF.DtResultados IsNot Nothing AndAlso ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
LblFolio.Text = ObjAF.DtResultados(0)("Folio").ToString
|
||||
|
||||
|
||||
DdlSubProyecto.SelectedValueExist(ObjAF.DtResultados(0)("CveSubProyecto").ToString)
|
||||
DdlAF.SelectedValueExist(ObjAF.DtResultados(0)("CveAF").ToString)
|
||||
'DdlTipoServicio.SelectedValueExist(ObjAF.DtResultados(0)("CveTipoServicio").ToString)
|
||||
|
||||
DdlPrioridad.SelectedValueExist(ObjAF.DtResultados(0)("Prioridad").ToString)
|
||||
txtFechaI.Text = ObjAF.DtResultados(0)("FechaInicio").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
DdlOperador.SelectedValueExist(ObjAF.DtResultados(0)("CveOperador").ToString)
|
||||
|
||||
If ObjAF.DtResultados(0)("FechaFin").ToString.Length > 0 Then
|
||||
txtFechaF.Text = ObjAF.DtResultados(0)("FechaFin").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
DdlOrdenesTrabajoEstatus.SelectedValueExist(ObjAF.DtResultados(0)("CveEstatusOT").ToString)
|
||||
|
||||
DdlTipoMantenimiento.SelectedValueExist(ObjAF.DtResultados(0)("CveOrdenTrabajoTipo").ToString)
|
||||
DdlTipoMantenimiento_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
DdlTipoServicio.SelectedValueExist(ObjAF.DtResultados(0)("CveTipoServicio").ToString)
|
||||
|
||||
Else
|
||||
Alert("No se encontro la orden de trabajo", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
CargaMaterial()
|
||||
CargaActividades()
|
||||
CargaCheckList()
|
||||
CargaHerramientas()
|
||||
CargaSubContrataciones()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub LnkEliminarMetricaValor_Click(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If CveOrdenTrabajo <= 0 Then
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
ObjAF.IniciaTransacSQL()
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If Not ObjAF.AddOrdenesTrabajo(DdlTipoServicio.SelectedValue.ToEntero, DdlAF.SelectedValue.ToEntero, "", DdlSubProyecto.SelectedValue.ToEntero, DdlPrioridad.SelectedValue.ToEntero, txtFechaI.Text.ToDate, MaxFecha, MaxFecha, DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlOperador.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
ErrorProceso = True
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjAF.Commit()
|
||||
Alert($"Orden de trabajo guardada corectamente <a href='./OrdenTrabajo.aspx?CveOrdenTrabajo={ObjAF.CveOrdenTrabajo}' class='Texto'> Folio {ObjAF.FolioOT}</a>", TipoMensaje.MsgInformacion, $" document.location.href=""OrdenTrabajo.aspx?CveOrdenTrabajo={CveOrdenTrabajo}"";")
|
||||
Else
|
||||
ObjAF.RollBack()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
Else
|
||||
|
||||
If DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero = 3 Then
|
||||
If txtFechaF.Text.Length = 0 Then
|
||||
Alert("La fecha fin es requerida.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
ObjAF.IniciaTransacSQL()
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
|
||||
Dim FechaFinal As Date = MaxFecha
|
||||
Dim FechaFinReal As Date = MaxFecha
|
||||
|
||||
|
||||
If txtFechaF.Text.ToDate > MinFecha Then
|
||||
FechaFinal = txtFechaF.Text.ToDate
|
||||
End If
|
||||
|
||||
If Not ObjAF.UpdateOrdenesTrabajo(CveOrdenTrabajo, DdlTipoServicio.SelectedValue.ToEntero, DdlAF.SelectedValue.ToEntero, "", DdlSubProyecto.SelectedValue.ToEntero, DdlPrioridad.SelectedValue.ToEntero, txtFechaI.Text.ToDate, FechaFinal, MaxFecha, DdlOrdenesTrabajoEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlOperador.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
For Each GvRow As GridViewRow In GvActividades.Rows
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim TxtObservaciones As TextBox = GvRow.FCTextBox("TxtObservaciones")
|
||||
Dim CveOrdenTrabajoActividad As Integer = GvRow.DataKey("CveOrdenTrabajoActividad").ToEntero
|
||||
|
||||
If Not ObjAF.UpdateOrdenesTrabajoActividades(CveOrdenTrabajoActividad, "-1", If(Chk.Checked, 1, 0), TxtObservaciones.Text, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
For Each GvRow As GridViewRow In GvCheckList.Rows
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim TxtObservaciones As TextBox = GvRow.FCTextBox("TxtObservaciones")
|
||||
Dim CveOrdenTrabajoCheckList As Integer = GvRow.DataKey("CveOrdenTrabajoCheckList").ToEntero
|
||||
Dim RBL As RadioButtonList = GvRow.FCRadioButtonList("RDLSINOND")
|
||||
Dim Estatus As Integer = 0
|
||||
|
||||
If RBL.SelectedValue.ToEntero > 0 Then
|
||||
Estatus = RBL.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
If CveOrdenTrabajoCheckList > 0 Then
|
||||
|
||||
If Not ObjAF.UpdateOrdenesTrabajoCheckList(CveOrdenTrabajoCheckList, "-1", If(Chk.Checked, 1, 0), TxtObservaciones.Text, Estatus, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjAF.Commit()
|
||||
Alert($"Orden de trabajo actualizada correctamente.", TipoMensaje.MsgInformacion, $" document.location.href=""OrdenTrabajo.aspx?CveOrdenTrabajo={CveOrdenTrabajo}"";")
|
||||
Else
|
||||
ObjAF.RollBack()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "FOLIOS"
|
||||
|
||||
|
||||
Private Function CargaFolios() As Boolean
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero() <= 0 Then
|
||||
Alert("No se tienen asignadas sucursales", TipoMensaje.MsgError)
|
||||
Return False
|
||||
Exit Function
|
||||
End If
|
||||
|
||||
Dim ObjFolios As New ClsGralFolios()
|
||||
|
||||
If ObjFolios.GetFolios("OT", UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim DT As DataTable = ObjFolios.DtResultados '.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyecto.SelectedValue))
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
|
||||
Alert("No tiene registrados Folios para " & DdlSubProyecto.SelectedItem.Text & " ", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
DT.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
ObjFolios.Dispose()
|
||||
|
||||
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If CargaFolios() Then
|
||||
BtnGuardar.Enabled = True
|
||||
Else
|
||||
BtnGuardar.Enabled = False
|
||||
End If
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaMaterial()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim MaterialFaltante As Decimal = 0
|
||||
|
||||
If ObjAF.GetOrdenesTrabajoMateriales(CveOrdenTrabajo, UsuarioActual.CveEmpresa) Then
|
||||
GvMaterial.DataSource = ObjAF.DtResultados
|
||||
MaterialFaltante = ObjAF.DtResultados.SUMD("Faltante")
|
||||
Else
|
||||
GvMaterial.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
|
||||
|
||||
If MaterialFaltante > 0 AndAlso CveOrdenCompra <= 0 Then
|
||||
|
||||
GvMaterial.Columns(4).Visible = True
|
||||
End If
|
||||
|
||||
GvMaterial.DataBind()
|
||||
|
||||
UpGvMaterial.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaActividades()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
|
||||
If ObjAF.GetOrdenesTrabajoActividades(CveOrdenTrabajo, UsuarioActual.CveEmpresa) Then
|
||||
GvActividades.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvActividades.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvActividades.DataBind()
|
||||
UpGvActividades.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCheckList()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
|
||||
If ObjAF.GetOrdenesTrabajoCheckList(CveOrdenTrabajo, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
|
||||
GvCheckList.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvCheckList.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvCheckList.DataBind()
|
||||
UpGvCheckList.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaHerramientas()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
|
||||
If ObjAF.GetOrdenesTrabajoHerramientas(CveOrdenTrabajo, UsuarioActual.CveEmpresa) Then
|
||||
GvHerramientas.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvHerramientas.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvHerramientas.DataBind()
|
||||
UpGvHerramientas.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaSubContrataciones()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
|
||||
If ObjAF.GetOrdenesTrabajoSubContrataciones(CveOrdenTrabajo, UsuarioActual.CveEmpresa) Then
|
||||
GvSubContrataciones.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvSubContrataciones.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvSubContrataciones.DataBind()
|
||||
UpGvSubContrataciones.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvMaterial_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If GvMaterial.Columns(4).Visible Then
|
||||
|
||||
If e.Row.DataKey("Faltante").ToDecimal > 0 Then
|
||||
Dim HLOC As HyperLink = e.Row.FCHyperLink("HLOC")
|
||||
HLOC.Visible = True
|
||||
HLOC.NavigateUrl = $"../OC/OC.aspx?CveOrdenTrabajo={CveOrdenTrabajo}"
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub GvActividades_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Chk As CheckBox = e.Row.FCCheckBox("Chk")
|
||||
|
||||
If Boolean.Parse(e.Row.DataKey("Terminado")) Then
|
||||
Chk.Checked = True
|
||||
Else
|
||||
Chk.Checked = False
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub GvCheckList_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim Chk As CheckBox = e.Row.FCCheckBox("Chk")
|
||||
Dim RDLSINOND As RadioButtonList = e.Row.FCRadioButtonList("RDLSINOND")
|
||||
Dim TxtObservaciones As TextBox = e.Row.FCTextBox("TxtObservaciones")
|
||||
|
||||
If e.Row.DataKey("CveOrdenTrabajoCheckList").ToEntero = 0 Then
|
||||
|
||||
e.Row.FCLiteral("LtlNROW").Text = e.Row.DataKey("CheckListActividadGrupo").ToString
|
||||
e.Row.Attributes.Add("style", "background-color:#DDD")
|
||||
|
||||
Chk.Visible = False
|
||||
RDLSINOND.Visible = False
|
||||
TxtObservaciones.Visible = False
|
||||
Else
|
||||
Dim Estatus As String = e.Row.DataKey("Estatus")
|
||||
|
||||
RDLSINOND.SelectedValuesIfExist(Estatus)
|
||||
|
||||
If Boolean.Parse(e.Row.DataKey("Terminado")) Then
|
||||
Chk.Checked = True
|
||||
Else
|
||||
Chk.Checked = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
126
MQ/SubContrataciones.aspx
Normal file
126
MQ/SubContrataciones.aspx
Normal file
@@ -0,0 +1,126 @@
|
||||
<%@ Page Title="Catálogo Operadores" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="SubContrataciones.aspx.vb" Inherits="AF_SubContrataciones" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Catálogo de Sub Contrataciones
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarSubContratacion" data-toggle="tooltip" data-placement="left" title="Agregar Sub Contratación" Text="<i class='fa fa-plus'></i> Agregar Sub Contratación"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveSubContratacion,SubContratacion,Estatus" EmptyDataText="No se encontraron Sub Contrataciones" Width="100%"
|
||||
ToolTip="Listado de Sub Contrataciones" CssClass="table table-striped table-advance table-hover" GridLines="None" >
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Sub Contratación">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlOperador" runat="server" Text='<%# Eval("SubContratacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center" Visible="true">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEsatusString" runat="server" Text='<%# Eval("EstatusString") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-Width="200" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkActualizar" runat="server" OnClick="LnkGvActualizar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" ValidationGroup="GrpGV" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkEliminar" OnClick="LnkGvEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DVModalSubContratacion" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModalOperador" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModalOperdaor" runat="server"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtSubContratacion" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtSubContratacion" runat="server" ControlToValidate="TxtSubContratacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Contratación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpOperador"></asp:RequiredFieldValidator>
|
||||
<label for="TxtSubContratacion">Sub Contratación:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br ID="saltoDeLinea" runat="server" />
|
||||
<div ID="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<label for="ChkEstatus">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="make-switchsd" data-size="small" Text=" " Checked="true" />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnModalAgregarOperador" runat="server" class="btn btn-success" Text="Guardar" ValidationGroup="GrpOperador" />
|
||||
<button id="Button" runat="server" type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
135
MQ/SubContrataciones.aspx.vb
Normal file
135
MQ/SubContrataciones.aspx.vb
Normal file
@@ -0,0 +1,135 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class AF_SubContrataciones
|
||||
Inherits ClsPaginas
|
||||
|
||||
Protected Property CveSubContratacion As Integer
|
||||
Get
|
||||
If ViewState("CveSubContratacion") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return ViewState("CveSubContratacion").ToString.ToEntero
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveSubContratacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.GetSubContratacionOT(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
GvDatos.DataSource = ObjAF.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkAgregarSubContratacion_Click(sender As Object, e As EventArgs) Handles LnkAgregarSubContratacion.Click
|
||||
ResetModalSubContrataciones()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DVModalSubContratacion"))
|
||||
End Sub
|
||||
|
||||
Private Sub ResetModalSubContrataciones()
|
||||
CveSubContratacion = -1
|
||||
TxtSubContratacion.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
LtlTituloModalOperdaor.Text = "Agregar operador"
|
||||
CheckActiveSection.Visible = False
|
||||
|
||||
UpModalOperador.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvActualizar_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
|
||||
CveSubContratacion = GvRow.DataKey("CveSubContratacion").ToEntero
|
||||
TxtSubContratacion.Text = GvRow.DataKey("SubContratacion")
|
||||
'TxtFecha.Text = GvRow.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estatus").ToString.ToEntero = 1, True, False)
|
||||
LtlTituloModalOperdaor.Text = "Actualizar Sub Contratación"
|
||||
CheckActiveSection.Visible = True
|
||||
|
||||
UpModalOperador.Update()
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DVModalSubContratacion"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnModalAgregarOperador.Click
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If CveSubContratacion = -1 Then
|
||||
If Not ObjAF.AddSubContratacionOT(TxtSubContratacion.Text, If(ChkEstatus.Checked, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
|
||||
If Not ObjAF.UpdateSubContratacionOT(CveSubContratacion, TxtSubContratacion.Text, If(ChkEstatus.Checked, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
Alert($"Sub Contratación { If(CveSubContratacion > 0, "Actualizada", "Agregada") } correctamente.")
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DVModalSubContratacion"))
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGvEliminar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ErrorProceso As Boolean = False
|
||||
Dim CveSubContratacionEliminar As Integer = GvRow.DataKey("CveSubContratacion").ToEntero
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
|
||||
If ObjAF.RemoveSubContratacionOT(CveSubContratacionEliminar, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Sub Contratación eliminada correctamente")
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
ObjAF.Dispose()
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
581
MQ/TipoOrdenTrabajo.aspx
Normal file
581
MQ/TipoOrdenTrabajo.aspx
Normal file
@@ -0,0 +1,581 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="TipoOrdenTrabajo.aspx.vb" Inherits="MQ_TipoOrdenTrabajo" EnableEventValidation = "false" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.Widthall {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Tipo de Ordenes de Trabajo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li style="text-align: left!important">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarMaterial" CssClass=" " data-html="true" data-toggle="tooltip" data-placement="left" title="Agregar Material" Text="<i class='fa fa-plus'></i> Agregar Material" OnClick="LnkAgregarMaterial_Click"></asp:LinkButton>
|
||||
</li>
|
||||
<li style="text-align: left!important">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarActividad" CssClass=" " data-html="true" data-toggle="tooltip" data-placement="left" title="Agregar Actividad" Text="<i class='fa fa-plus'></i> Agregar Actividad" OnClick="LnkAgregarActividad_Click"></asp:LinkButton>
|
||||
</li>
|
||||
<li style="text-align: left!important">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarHorramienta" CssClass=" " data-html="true" data-toggle="tooltip" data-placement="left" title="Agregar Herramienta" Text="<i class='fa fa-plus'></i> Agregar Herramienta" OnClick="LnkAgregarHorramienta_Click"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li style="text-align: left!important">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarSubContratacion" CssClass=" " data-html="true" data-toggle="tooltip" data-placement="left" title="Agregar Sub Contratación" Text="<i class='fa fa-plus'></i> Agregar Sub Contratación" OnClick="LnkAgregarSubContratacion_Click"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpFiltro" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 ">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="fa fa-table font-green"></i>
|
||||
<span class="caption-subject bold uppercase">
|
||||
<asp:Label runat="server" ID="LblTitulo">Tipo de Ordenes de Trabajo</asp:Label></span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="portlet-body form">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoMantenimiento" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="OrdenTrabajoTipo" DataValueField="CveOrdenTrabajoTipo"></asp:DropDownList>
|
||||
<label for="<%= DdlTipoMantenimiento.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" ID="LblTipo" Text="Tipo O.T:"></asp:Label>
|
||||
</label>
|
||||
<i></i>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlTipoServicio" runat="server" InitialValue="-1" ControlToValidate="DdlTipoMantenimiento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Mantenimientp''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTipoServicio" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtTipoServicio" runat="server" Text="Descripción:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtTipoServicio" runat="server" ControlToValidate="TxtTipoServicio" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDuracion" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
|
||||
<asp:Label AssociatedControlID="TxtDuracion" runat="server" Text="Duración:"></asp:Label>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtDuracion" runat="server" ControlToValidate="TxtDuracion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Duración''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtDuracion" TargetControlID="TxtDuracion" runat="server" FilterType="Numbers,Custom" InvalidChars="-*+," ValidChars="." />
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" >
|
||||
|
||||
<ajax:TabPanel ID="TabMaterial" runat="server" HeaderText="Material">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:UpdatePanel runat="server" ID="UpGvMaterial" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvMaterial" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveTipoServicioMaterial,CveTipoServicio,Cantidad,CveUM,CvePS,Tipo"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:BoundField DataField="Cantidad" ItemStyle-Width="15%" HeaderText="Cantidad" />
|
||||
<asp:BoundField DataField="Abreviatura" ItemStyle-Width="15%" HeaderText="U.M." />
|
||||
<asp:TemplateField ItemStyle-Width="45%" HeaderText="Producto" >
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" Text='<%# Eval("PS") %>' Width="220px"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarMaterial" runat="server" AlternateText="Eliminar" OnClick="LnkEliminarMaterial_Click" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-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>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabActividades" runat="server" HeaderText="Actividades">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvActividades" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvActividades" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
OnRowDataBound="GvActividades_RowDataBound"
|
||||
DataKeyNames="CveTipoServicioActividad,CveActividadOT,Horas" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" OnCheckedChanged="Chk_CheckedChanged" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Horas" >
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtHoras" Width="100px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtHoras" FilterType="Custom" ValidChars="1234567890." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="ActividadOT" ItemStyle-Width="30%" HeaderText="Actividad" />
|
||||
<asp:BoundField DataField="Puesto" ItemStyle-Width="30%" HeaderText="Puesto" />
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarActividad" runat="server" AlternateText="Eliminar" OnClick="LnkEliminarActividad_Click" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabCheckList" runat="server" HeaderText="Check List">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvCheckList" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCheckList" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
OnRowDataBound="GvCheckList_RowDataBound"
|
||||
DataKeyNames="CveCheckListActividad,CheckListActividadGrupo,CveCheckList,CveTipoServicio"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="No.">
|
||||
<ItemStyle Width="100px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNROW" runat="server" Text='<%# Eval("NROW")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Componentes Inspección">
|
||||
<ItemStyle Width="350px" />
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCheckListActividad" runat="server" Text='<%# Eval("CheckListActividad")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabHerramientas" runat="server" HeaderText="Herramientas">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvHerramientas" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvHerraminetas" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveTipoServicioHerramientaOT,CveTipoServicio,CveHerramientaOT,HerramientaOT" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="HerramientaOT" ItemStyle-Width="80%" HeaderText="Herramienta" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarHerramienta" runat="server" AlternateText="Eliminar" OnClick="LnkEliminarHerramienta_Click" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabSubContratacion" runat="server" HeaderText="Sub Contratación">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpGvSubContratacion" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvSubContratacion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron datos" ToolTip="" CssClass="table table-smallpadding Widthall"
|
||||
DataKeyNames="CveTipoServicioSubContratacion,CveTipoServicio,CveSubContratacion,SubContratacion" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemStyle Width="20px" />
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox runat="server" ID="Chk" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="SubContratacion" ItemStyle-Width="80%" HeaderText="Sub Contratación" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="25%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarSubContratacion" runat="server" AlternateText="Eliminar" OnClick="LnkEliminarSubContratacion_Click" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:center">
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" OnClick="BtnGuardar_Click" Visible="true" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="ModalMateriales" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="Literal1" runat="server">Material </asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalMaterialesBody" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<label for="<%= DdlPS.ClientID.ToString()%>">Producto:</label>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" CssClassDdl="select2me" CssStyle="width: 220px;"/>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control" MaxLength="100"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtCantidad" FilterType="Custom" ValidChars="1234567890." />
|
||||
<asp:RequiredFieldValidator ID="RFVTxtCantidad" runat="server" ControlToValidate="TxtCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterial"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox runat="server" Text="Continuar agregando" ID="ChkContinuarMaterial" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button runat="server" ID="BtnGuardarMaterial" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="GrpMaterial" OnClick="BtnGuardarMaterial_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="ModalActividades" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="LtlModalTituloActividades" runat="server">Agregar Actividades</asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalActividades" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlModalActiviades" CssClass="select2me form-control" DataTextField="ActividadOT" DataValueField="CveActividadOT" Width="150px" ></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlModalActiviades" InitialValue="-1" runat="server" ControlToValidate="DdlModalActiviades" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Actividad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpActividad"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlModalActiviades.ClientID.ToString()%>">Actividad:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<%-- <div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlmodalPuesto" CssClass="select2me form-control" DataTextField="Puesto" DataValueField="CvePuesto" Width="150px" ></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlmodalPuesto" InitialValue="-1" runat="server" ControlToValidate="DdlmodalPuesto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Puesto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpActividad"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlmodalPuesto.ClientID.ToString()%>">Puesto:</label>
|
||||
<i></i>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtmodalHoras" runat="server" CssClass="form-control" MaxLength="5"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtmodalHoras" FilterType="Custom" ValidChars="1234567890." />
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtmodalHoras" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Horas ''</b> es necesario, por favor ingréselo." ValidationGroup="GrpActividad"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtmodalHoras.ClientID.ToString()%>">Horas:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox runat="server" Text="Continuar agregando" ID="chkModalContinuarActividades" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button runat="server" ID="BtnmodalActividad" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="GrpActividad" OnClick="BtnmodalActividad_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="ModalHerramientas" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="LtlModalTituloHerramientas" runat="server">Agregar Herramienta</asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalHerramientas" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList runat="server" ID="DdlModalHerramienta" CssClass="select2me form-control" DataTextField="HerramientaOT" DataValueField="CveHerramientaOT" ></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFvDdlModalHerramienta" InitialValue="-1" runat="server" ControlToValidate="DdlModalHerramienta" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Actividad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpHerramienta"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlModalHerramienta.ClientID.ToString()%>">Herramienta:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox runat="server" Text="Continuar agregando" ID="ChkModalContinuarHerramientas" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button runat="server" ID="BtnModalHerramienta" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="GrpHerramienta" OnClick="BtnModalHerramienta_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="ModalSubContratacion" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Literal ID="Literal2" runat="server">Agregar Sub Contratación</asp:Literal>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalSubContratacion" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList runat="server" ID="DdlModalSubContratacion" CssClass="select2me form-control" DataTextField="SubContratacion" DataValueField="CveSubContratacion" ></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlSubContratacion" InitialValue="-1" runat="server" ControlToValidate="DdlModalSubContratacion" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Contratación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpSubContratacion"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlModalSubContratacion.ClientID.ToString()%>">Sub Contratación:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox runat="server" Text="Continuar agregando" ID="ChkModalContinuarSubcatratacion" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button runat="server" ID="BtnModalSubContratacion" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="GrpSubContratacion" OnClick="BtnModalSubContratacion_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
1264
MQ/TipoOrdenTrabajo.aspx.vb
Normal file
1264
MQ/TipoOrdenTrabajo.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
24
Transportes/RepContratoDetalle.aspx
Normal file
24
Transportes/RepContratoDetalle.aspx
Normal file
@@ -0,0 +1,24 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="true" Title="Transportes V&A - Detalles del Contrato"
|
||||
MasterPageFile="~/Site.master"
|
||||
CodeFile="RepContratoDetalle.aspx.vb"
|
||||
Inherits="RepContratoDetalle" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||
Detalles del Contratos
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
9
Transportes/RepContratoDetalle.aspx.vb
Normal file
9
Transportes/RepContratoDetalle.aspx.vb
Normal file
@@ -0,0 +1,9 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Partial Class RepContratoDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1,361 +0,0 @@
|
||||
<%@ Page Language="VB" AutoEventWireup="true" Title="Transportes V&A - Contratos"
|
||||
MasterPageFile="~/Site.master"
|
||||
CodeFile="RepContratos - Copy.aspx.vb"
|
||||
Inherits="ListadoContratos" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="E" runat="Server">
|
||||
Listado de Contratos
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.my-1 {
|
||||
margin-block: 1rem;
|
||||
}
|
||||
|
||||
.dataTables_scrollHead {
|
||||
background-color: #DDD;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin-top: 0px !important;
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.Texto {
|
||||
text-align: left !important
|
||||
}
|
||||
|
||||
.boton {
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcel" runat="server"><i class="fa fa-file-excel-o"></i>Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LBExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
<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>Fecha Inicial:</label>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaI" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaF" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 200px"
|
||||
CssClassDdl="pxlect2me"
|
||||
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"
|
||||
DataTextField="ContratoEstatus" DataValueField="CveContratoEstatus"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||
OnClick="Consultar" />
|
||||
</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, CveContratosEstatus, CveAF">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Salida
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaI" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Viaje">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cliente">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtNombreComercial" runat="server" Text='<%# Eval("NombreComercial") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Lugar Salida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtUbicacion" runat="server" Text='<%# Eval("Ubicacion") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
Regreso
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaFinal" runat="server" Text='<%# Eval("FechaFinal", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-CssClass="bold">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlEstatus" runat="server"
|
||||
Text='<%# Eval("ContratoEstatus1") %>' Style='<%# "color:" + If(Eval("BackgroundColor") IsNot DBNull.Value, Eval("BackgroundColor").ToString(), String.Empty) %>'>
|
||||
</asp:Label>
|
||||
</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">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<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" Enabled="false"></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"
|
||||
Rows="2"></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 my-1">
|
||||
<label class="col-md-4">Observaciones:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="70" Width="100%"
|
||||
TextMode="MultiLine"
|
||||
Rows="2"></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">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 my-1">
|
||||
<label class="col-md-4">Fecha Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
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 class="row">
|
||||
<label class="col-md-4">Fecha Regreso:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
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 class="row my-1">
|
||||
<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">Costo dólares:</label>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox ID="TxtDolares" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Costo pesos:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtPesos" CssStyle=" form-control" runat="server" type="number"
|
||||
Width="95%"></asp:TextBox>
|
||||
<span class="fa fa-dollar"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Anticipo:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" Width="95%" runat="server"
|
||||
type="decimal"></asp:TextBox>
|
||||
<span class="fa fa-percent"></span>
|
||||
|
||||
</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>
|
||||
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class ListadoContratos
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property CveContrato As Integer
|
||||
Get
|
||||
Return ViewState("CveContrato").ToString().ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
|
||||
If Not IsPostBack Then
|
||||
ViewState("CveContrato") = 0
|
||||
InicializaCombos()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InicializaCombos()
|
||||
'Lista Tipo AF
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTipoAF.DataBind()
|
||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("-", ""))
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
End If
|
||||
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
||||
DdlEstatusConsulta.DataSource = ObjContratos.DtResultados
|
||||
DdlEstatusConsulta.DataBind()
|
||||
DdlEstatusConsulta.Items.Insert(0, New ListItem("-", ""))
|
||||
|
||||
End If
|
||||
UpTitulos.Update()
|
||||
|
||||
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 = "")
|
||||
|
||||
'DdlClientes.SelectedText = Cliente
|
||||
TxtDescripcion.Text = Descripcion
|
||||
TxtUbicacion.Text = Ubicacion
|
||||
TxtFechaSalida.Text = FechaSalida
|
||||
TxtFechaRegreso.Text = FechaRegreso
|
||||
TxtObservaciones.Text = Observaciones
|
||||
TxtUbicacion.Text = Ubicacion
|
||||
DdlTipoAF.SelectedValue = Transporte
|
||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial")
|
||||
DdlClientes.SelectedValue = CveCliente.ToString
|
||||
DdlChofer.SelectedValue = Chofer
|
||||
TxtObservaciones.Text = Observaciones
|
||||
TxtDolares.Text = Math.Round(Dolares.ToDecimal, 2).ToString
|
||||
TxtPesos.Text = Math.Round(Pesos.ToDecimal, 2).ToString
|
||||
TxtAnticipo.Text = Math.Round(Anticipo.ToDecimal * 100, 2).ToString
|
||||
BtnGuardar.Text = Boton
|
||||
myModalLabel.InnerHtml = $"{Boton} Contrato"
|
||||
UpModal.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||
End Sub
|
||||
Private Sub LBAgregarContrato_Click(sender As Object, e As EventArgs) Handles LBAgregarContrato.Click
|
||||
MostrarModal()
|
||||
End Sub
|
||||
Protected Sub AddContrato(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlClientes.SelectedValue = "" Then
|
||||
Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
|
||||
'Agregar contrato
|
||||
If BtnGuardar.Text = "Guardar" Then
|
||||
If 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:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
'Actualizar contrato
|
||||
If BtnGuardar.Text = "Editar" Then
|
||||
If 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) Then
|
||||
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
End If
|
||||
End If
|
||||
|
||||
TxtDescripcion.Text = ""
|
||||
TxtFechaSalida.Text = ""
|
||||
TxtFechaRegreso.Text = ""
|
||||
TxtObservaciones.Text = ""
|
||||
TxtUbicacion.Text = ""
|
||||
DdlClientes.SelectedText = ""
|
||||
DdlTipoAF.SelectedValue = ""
|
||||
DdlChofer.SelectedValue = ""
|
||||
TxtDolares.Text = ""
|
||||
TxtPesos.Text = ""
|
||||
TxtAnticipo.Text = ""
|
||||
BtnGuardar.Text = "Guardar"
|
||||
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LBExcel_Click(sender As Object, e As EventArgs) Handles LBExcel.Click
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
Dim fechaInicial As String = txtFechaI.Text
|
||||
Dim fechaFinal As String = txtFechaF.Text
|
||||
|
||||
Dim cliente As String = If(DdlClientesConsulta.SelectedValue = "", "", $"C.CveCliente = {DdlClientesConsulta.SelectedValue} AND")
|
||||
Dim estatus As String = ""
|
||||
Dim nombreEstatus As String = ""
|
||||
Dim innerEstatus As String = ""
|
||||
If (DdlEstatusConsulta.SelectedValue <> "") Then
|
||||
estatus = $"C.CveContratosEstatus = {DdlEstatusConsulta.SelectedValue} AND"
|
||||
nombreEstatus = ", CE.ContratoEstatus As ContratoEstatus1"
|
||||
innerEstatus = "INNER JOIN Con_ContratosEstatus CE with(nolock) ON CE.CveContratoEstatus = C.CveContratosEstatus
|
||||
"
|
||||
End If
|
||||
Dim intervalo As String = If(DdlEstatusConsulta.SelectedValue = "" And DdlClientesConsulta.SelectedValue = "", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'")
|
||||
|
||||
|
||||
Dim query As String = $"SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial {nombreEstatus} FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente {innerEstatus} WHERE {cliente} {estatus} {intervalo}"
|
||||
|
||||
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Using command As New SqlCommand(query, connection)
|
||||
connection.Open()
|
||||
Dim reader As SqlDataReader = command.ExecuteReader()
|
||||
GvContratos.DataSource = reader
|
||||
GvContratos.DataBind()
|
||||
End Using
|
||||
End Using
|
||||
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -14,85 +14,131 @@
|
||||
}
|
||||
|
||||
.consulta {
|
||||
padding: 1rem 2rem;
|
||||
background-color: #95A5A6;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 1rem 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.consulta_linea {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-block: .5rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.consulta_campo {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.consulta_campo label {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.expandir {
|
||||
width: 2.5rem;
|
||||
font-size: 2.5rem;
|
||||
font-weight: 900;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UPPAcciones" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBAgregarContrato" runat="server"><i class='fa fa-plus'></i>Agregar Contrato</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBExcel" runat="server"><i class="fa fa-file-excel-o"></i>Generar Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LBExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
<%-- Filtros --%>
|
||||
<div class="consulta">
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
<div class="consulta_linea">
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
<asp:TextBox Width="150px" ID="txtFechaI" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaI" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
<asp:TextBox Width="150px" ID="txtFechaF" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 200px"
|
||||
CssClassDdl="select2me"
|
||||
UsaWebService="true"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaF" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 200px"
|
||||
CssClassDdl="pxlect2me"
|
||||
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"
|
||||
DataTextField="ContratoEstatus" DataValueField="CveContratoEstatus"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
</asp:DropDownList>
|
||||
<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"
|
||||
DataTextField="ContratoEstatus" DataValueField="CveContratoEstatus"
|
||||
AppendDataBoundItems="true" Width="200px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="consulta_campo">
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||
OnClick="Consultar" />
|
||||
<asp:LinkButton ID="BtnExpandir" runat="server" Text="↓" CssClass="expandir"
|
||||
OnClick="Expandir" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||
OnClick="Consultar" />
|
||||
<asp:Panel runat="server" Visible="false" ID="PnExpandirConsulta" CssClass="consulta_linea">
|
||||
<div class="consulta_campo">
|
||||
<label>Centro Costos:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCentroCostos" runat="server"
|
||||
DataTextField="" DataValueField=""
|
||||
AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="200px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Tipo Unidad:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTIpoUnidad" runat="server"
|
||||
DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo"
|
||||
AppendDataBoundItems="true"
|
||||
Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="200px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Chofer:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlChofer" runat="server"
|
||||
DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto"
|
||||
AppendDataBoundItems="true"
|
||||
Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="200px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<%-- Listado de Contratos --%>
|
||||
<asp:UpdatePanel ID="UpTitulos" runat="server" UpdateMode="Conditional">
|
||||
@@ -101,9 +147,9 @@
|
||||
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, CveContratosEstatus, CveAF">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<asp:TemplateField HeaderText="Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
|
||||
<asp:LinkButton runat="server" Text='<%# Eval("NumeroContrato") %>' OnClick="GoContratoDetalle"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -170,7 +216,11 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:Label runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Folio</label>
|
||||
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<div class="col-md-8">
|
||||
@@ -243,7 +293,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cantidad de pasajeros</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" CssStyle="col-md-8 form-control" runat="server"
|
||||
@@ -258,7 +308,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<div class="row">
|
||||
<label class="col-md-4">Tipo Unidad</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoAF" AppendDataBoundItems="true" DataTextField="TipoActivoFijo"
|
||||
@@ -274,7 +324,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row my-1">
|
||||
<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"
|
||||
@@ -283,7 +333,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<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"
|
||||
@@ -292,7 +342,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Anticipo</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtAnticipo" CssStyle=" form-control" Width="95%" runat="server"
|
||||
|
||||
@@ -4,10 +4,21 @@ Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports Extensiones
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class ListadoContratos
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedad"
|
||||
Private Property DtAvanceDocumento As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtAvanceDocumento"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtAvanceDocumento") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
txtFechaF.Text = DateTime.Now.AddDays(7).ToString("MM/dd/yyyy").Replace(" ", "T")
|
||||
@@ -22,16 +33,19 @@ Partial Class ListadoContratos
|
||||
DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTipoAF.DataBind()
|
||||
DdlTipoAF.Items.Insert(0, New ListItem("-", ""))
|
||||
|
||||
DdlTIpoUnidad.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa)
|
||||
DdlTIpoUnidad.DataBind()
|
||||
DdlTIpoUnidad.Items.Insert(0, New ListItem("-", ""))
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) 'solo puesto operador.y activos
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(188)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("-", ""))
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=34) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
End If
|
||||
@@ -41,15 +55,16 @@ Partial Class ListadoContratos
|
||||
DdlEstatusConsulta.DataBind()
|
||||
DdlEstatusConsulta.Items.Insert(0, New ListItem("-", ""))
|
||||
End If
|
||||
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "EsMatriz = 1").ToEntero
|
||||
'Generamos Folio - NumeroContrato
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||
Dim ObjFolio As New ClsGralFolios
|
||||
If ObjFolio.GetFolios("Con", UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto) Then
|
||||
If ObjFolio.DtResultados.Rows.Count > 0 Then
|
||||
Dim drr As DataRow = ObjFolio.DtResultados.FiltroPrimero("")
|
||||
LbFolio.Text = drr("FActual").ToString
|
||||
LbFolio.Text = $"{drr("Serie").ToString}-{drr("FActual").ToString}"
|
||||
End If
|
||||
End If
|
||||
|
||||
UpTitulos.Update()
|
||||
|
||||
End Sub
|
||||
@@ -66,14 +81,23 @@ Partial Class ListadoContratos
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Aumentamos Folio
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||
Dim ObjFolios As New ClsGralFolios
|
||||
If ObjFolios.UpdateFolioActual(CveSubProyecto, "Con", True, UsuarioActual.CveEmpresa) Then
|
||||
ObjFolios.Dispose()
|
||||
End If
|
||||
|
||||
'Agregamos Contrato
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
If 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:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
||||
If ObjContratos.AddContratos(LbFolio.Text, TxtDescripcion.Text, "", UsuarioActual.CveProveedor, DdlClientes.SelectedValue.ToEntero, -1, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, TxtUbicacion.Text, "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34, CveContratosEstatus:=50, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Agregado Correctamente.")
|
||||
End If
|
||||
ObjContratos.Dispose()
|
||||
|
||||
'Reiniciamos modal
|
||||
TxtDescripcion.Text = ""
|
||||
TxtFechaSalida.Text = ""
|
||||
TxtFechaRegreso.Text = ""
|
||||
@@ -86,16 +110,34 @@ Partial Class ListadoContratos
|
||||
TxtAnticipo.Text = ""
|
||||
TxtCantidadPasajeros.Text = ""
|
||||
|
||||
ObjContratos.Dispose()
|
||||
UpModal.Update()
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LBExcel_Click(sender As Object, e As EventArgs) Handles LBExcel.Click
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||
Dim Imagen As New IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim Cliente As String = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim dt As DataTable = ObjContratos.DtResultados
|
||||
Dim params As New List(Of ReportParameter) From {
|
||||
New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa),
|
||||
New ReportParameter("FechaInicio", "-1"),
|
||||
New ReportParameter("FechaFin", "-1"),
|
||||
New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa),
|
||||
New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre),
|
||||
New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString),
|
||||
New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))
|
||||
}
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepContratos.rdlc", dt, params, NombreArchivo:="Reporte Contratos")
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
Dim fechaInicial As String = txtFechaI.Text
|
||||
Dim fechaFinal As String = txtFechaF.Text
|
||||
@@ -104,12 +146,34 @@ Partial Class ListadoContratos
|
||||
Dim estatus As String = ""
|
||||
Dim nombreEstatus As String = ""
|
||||
Dim innerEstatus As String = ""
|
||||
|
||||
Dim tipoUnidad As String = ""
|
||||
Dim nombreTipoUnidad As String = ""
|
||||
Dim innerTipoUnidad As String = ""
|
||||
|
||||
Dim chofer As String = ""
|
||||
Dim nombreChofer As String = ""
|
||||
Dim innerChofer As String = ""
|
||||
|
||||
If (DdlEstatusConsulta.SelectedValue <> "") Then
|
||||
estatus = $"C.CveContratosEstatus = {DdlEstatusConsulta.SelectedValue} AND"
|
||||
nombreEstatus = ", CE.ContratoEstatus As ContratoEstatus1"
|
||||
innerEstatus = "INNER JOIN Con_ContratosEstatus CE with(nolock) ON CE.CveContratoEstatus = C.CveContratosEstatus
|
||||
"
|
||||
innerEstatus = " INNER JOIN Con_ContratosEstatus CE with(nolock) ON CE.CveContratoEstatus = C.CveContratosEstatus "
|
||||
End If
|
||||
|
||||
If (DdlTIpoUnidad.SelectedValue <> "") Then
|
||||
'tipoUnidad = $"C.CveContratosEstatus = {DdlTIpoUnidad.SelectedValue} AND"
|
||||
'nombreTipoUnidad = ", CE.ContratoTipoUnidad As ContratoTipoUnidad1"
|
||||
'innerTipoUnidad = " INNER JOIN Con_ContratosTipoUnidad CE with(nolock) ON CE.CveContratoTipoUnidad = C.CveContratosEstatus "
|
||||
End If
|
||||
|
||||
If (DdlChofer.SelectedValue <> "") Then
|
||||
'tipoUnidad = $"C.CveContratosEstatus = {DdlTIpoUnidad.SelectedValue} AND"
|
||||
'nombreTipoUnidad = ", CE.ContratoTipoUnidad As ContratoTipoUnidad1"
|
||||
'innerTipoUnidad = " INNER JOIN Con_ContratosTipoUnidad CE with(nolock) ON CE.CveContratoTipoUnidad = C.CveContratosEstatus "
|
||||
End If
|
||||
|
||||
|
||||
Dim intervalo As String = If(DdlEstatusConsulta.SelectedValue = "" And DdlClientesConsulta.SelectedValue = "", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'")
|
||||
|
||||
|
||||
@@ -126,5 +190,20 @@ Partial Class ListadoContratos
|
||||
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
Protected Sub Expandir(sender As Object, e As EventArgs)
|
||||
If PnExpandirConsulta.Visible Then
|
||||
PnExpandirConsulta.Visible = False
|
||||
BtnExpandir.Text = "↑"
|
||||
Else
|
||||
PnExpandirConsulta.Visible = True
|
||||
BtnExpandir.Text = "↓"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GoContratoDetalle(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveContrato As String = GvRow.DataKey("CveContrato")
|
||||
Response.Redirect(String.Format("~/Transportes/RepContratoDetalle.aspx?CveContrato={0}", CveContrato))
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -15,35 +15,41 @@
|
||||
margin-block: 1rem;
|
||||
}
|
||||
|
||||
.miGrid {
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.consulta {
|
||||
padding: 1rem 2rem;
|
||||
background-color: #95A5A6;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 1rem 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.consulta_linea {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-block: .5rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.consulta_campo {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.consulta_campo label {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.miGrid {
|
||||
.expandir {
|
||||
width: 2.5rem;
|
||||
font-size: 2.5rem;
|
||||
font-weight: 900;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.miGrid thead {
|
||||
color: black;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
@@ -51,6 +57,14 @@
|
||||
Calendario de Viajes
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:Panel ID="PnlGeneral" runat="server">
|
||||
@@ -77,6 +91,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="portlet-body" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,65 +117,102 @@
|
||||
<%--Contratos Tab--%>
|
||||
<ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Contratos">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="consulta">
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaI" runat="server" CssClass="form-control" type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
|
||||
<asp:TextBox Width="150px" ID="txtFechaF" runat="server" CssClass="form-control" type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 200px"
|
||||
CssClassDdl="pxlect2me"
|
||||
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"
|
||||
DataValueField="CveContratoEstatus"
|
||||
DataTextField="ContratoEstatus"
|
||||
AppendDataBoundItems="true"
|
||||
Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||
OnClick="Consultar"
|
||||
ValidationGroup="GrpConsulta" />
|
||||
<%-- Filtros --%>
|
||||
<div class="consulta">
|
||||
<div class="consulta_linea">
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
<asp:TextBox Width="150px" ID="txtFechaI" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Fecha Inicial:</label>
|
||||
<asp:TextBox Width="150px" ID="txtFechaF" runat="server" CssClass="form-control"
|
||||
type="datetime"
|
||||
MaxLength="10"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Cliente</label>
|
||||
<ADS:Dropdownlost ID="DdlClientesConsulta" data-metodo="getcliente"
|
||||
runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 200px"
|
||||
CssClassDdl="select2me"
|
||||
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"
|
||||
DataTextField="ContratoEstatus" DataValueField="CveContratoEstatus"
|
||||
AppendDataBoundItems="true" Width="200px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<asp:Button ID="BtnConsulta" runat="server" Text="Consultar" class="btn btn-primary"
|
||||
OnClick="Consultar" />
|
||||
<asp:LinkButton ID="BtnExpandir" runat="server" Text="↓" CssClass="expandir"
|
||||
OnClick="Expandir" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:Panel runat="server" Visible="false" ID="PnExpandirConsulta" CssClass="consulta_linea">
|
||||
<div class="consulta_campo">
|
||||
<label>Centro Costos:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCentroCostos" runat="server"
|
||||
DataTextField="" DataValueField=""
|
||||
AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="200px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Tipo Unidad:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTIpoUnidad" runat="server"
|
||||
DataTextField="TipoActivoFijo"
|
||||
DataValueField="CveTipoActivoFijo"
|
||||
AppendDataBoundItems="true"
|
||||
Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="200px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="consulta_campo">
|
||||
<label>Chofer:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DropDownList1" runat="server"
|
||||
DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto"
|
||||
AppendDataBoundItems="true"
|
||||
Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="200px">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
<%-- Contratos --%>
|
||||
<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, CveAF">
|
||||
data-sort="true" DataKeyNames="CveContrato, NumeroContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente,NombreComercial, CveTipoAF, Importe, ImporteMin, ImporteMax, Observaciones, CveAF, CveChofer, CveChofer2, CveContratosEstatus, CantidadPasajeros">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<asp:TemplateField HeaderText="Contrato">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCveContrato" runat="server" Text='<%# Eval("CveContrato") %>'></asp:Literal>
|
||||
<asp:LinkButton ForeColor="White" Font-Bold="true" runat="server" Text='<%# Eval("NumeroContrato") %>' OnClick="GoContratoDetalle"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="120px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
@@ -170,6 +222,7 @@
|
||||
<asp:Literal ID="LtlFechaI" runat="server" Text='<%# Eval("FechaInicial", "{0:dd/MM/yyyy HH:mm}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Viaje">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescripcionContrato" runat="server" Text='<%# Eval("DescripcionContrato") %>'></asp:Literal>
|
||||
@@ -184,14 +237,22 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Chofer">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlChofer" runat="server" Text='<%# Eval("NombreCompleto") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlChofer" runat="server" Text='<%# Eval("NombreChofer") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Chofer2">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlChofer2" runat="server" Text='<%# Eval("NombreChofer2") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAF" runat="server" Text='<%# Eval("CveAF") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlAF" runat="server" Text='<%# Eval("NombreAF") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Final" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
Fecha<br />
|
||||
@@ -216,7 +277,6 @@
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -225,13 +285,12 @@
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</asp:Panel>
|
||||
|
||||
<%-- Modal --%>
|
||||
<div id="ModalActualizar" 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>
|
||||
@@ -240,6 +299,20 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Folio:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFolio" runat="server" ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Numero de Pasajeros:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Cliente</label>
|
||||
<div class="col-md-8">
|
||||
@@ -271,8 +344,7 @@
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Lugar de Salida:</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" Width="100%" ReadOnly="true"></asp:TextBox>
|
||||
|
||||
<asp:TextBox ID="TxtUbicacion" runat="server" ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -281,7 +353,7 @@
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox ID="TxtFechaSalida" runat="server" CssClass="form-control"
|
||||
type="datetime-local" ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -291,7 +363,7 @@
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:TextBox ID="TxtFechaRegreso" runat="server" CssClass="form-control"
|
||||
type="datetime-local" ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
ReadOnly="true" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -310,7 +382,7 @@
|
||||
<label class="col-md-4">Unidad</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlAF" DataValueField="CveActivoFijo"
|
||||
DataTextField="CodigoDescripcion" Class="table-group-action-input form-control input-inline select2me"
|
||||
DataTextField="Descripcion" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAF" runat="server" ControlToValidate="DdlAF"
|
||||
@@ -341,19 +413,30 @@
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Chofer 2</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlChofer1" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
<asp:DropDownList ID="DdlChofer2" AppendDataBoundItems="true" DataValueField="CvePersonal"
|
||||
DataTextField="NombreCompleto" Class="table-group-action-input form-control input-inline select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVChofer1" runat="server" ControlToValidate="DdlChofer1"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer1''</b> es necesario, por favor ingréselo."
|
||||
<asp:RequiredFieldValidator ID="RFVChofer2" runat="server" ControlToValidate="DdlChofer2"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Chofer 2''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer1" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer1" Width="400px">
|
||||
<ajax:ValidatorCalloutExtender ID="VCEChofer2" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVChofer2" Width="400px">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<asp:Label ID="LbEstatus" runat="server" class="col-md-4">Estatus:</asp:Label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEstatusContrato" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true" DataValueField="CveContratoEstatus"
|
||||
DataTextField="ContratoEstatus"
|
||||
Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row hidden">
|
||||
<label class="col-md-4">Costo dólares:</label>
|
||||
<div class="col-md-8">
|
||||
@@ -374,17 +457,6 @@
|
||||
<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">Estatus:</asp:Label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlEstatusContrato" runat="server" Class="table-group-action-input form-control input-inline select2me"
|
||||
AppendDataBoundItems="true" DataValueField="CveContratoEstatus"
|
||||
DataTextField="ContratoEstatus"
|
||||
Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
@@ -393,7 +465,6 @@
|
||||
ValidationGroup="GrpGuardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -431,7 +502,8 @@
|
||||
}
|
||||
|
||||
function updateEvent(event, element) {
|
||||
console.log(event)
|
||||
$('#<%=TxtCantidadPasajeros.ClientID%>').val(event.CantidadPasajeros);
|
||||
$('#<%=TxtFolio.ClientID%>').val(event.NumeroContrato);
|
||||
$('#<%=TxtObservaciones.ClientID%>').val(event.title);
|
||||
$('#<%=TxtDescripcion.ClientID%>').val(event.title);
|
||||
$('#<%=TxtUbicacion.ClientID%>').val(event.NombreAcercamiento);
|
||||
@@ -440,6 +512,8 @@
|
||||
$('#<%=DdlClientes.ClientID%>').val(event.CveCliente);
|
||||
$('#<%=DdlAF.ClientID%>').val(event.CveActivoFijo);
|
||||
$('#<%=DdlChofer.ClientID%>').val(event.CvePersonal);
|
||||
$('#<%=DdlChofer2.ClientID%>').val(event.CvePersonal2);
|
||||
$('#<%=DdlEstatusContrato.ClientID%>').val(event.CveEventoEstatus);
|
||||
$('#<%=TxtDolares.ClientID%>').val(event.Dolares);
|
||||
$('#<%=TxtPesos.ClientID%>').val(event.Pesos);
|
||||
$('#<%=TxtAnticipo.ClientID%>').val(event.Anticipo);
|
||||
@@ -453,8 +527,6 @@
|
||||
}
|
||||
|
||||
function updateEventOnDropResize(event, allDay) {
|
||||
|
||||
//alert("allday: " + allDay);
|
||||
var eventToUpdate = {
|
||||
id: event.id,
|
||||
start: event.start
|
||||
@@ -466,8 +538,6 @@
|
||||
else {
|
||||
eventToUpdate.end = event.end;
|
||||
}
|
||||
|
||||
// FullCalendar 2.x
|
||||
var endDate;
|
||||
if (!event.allDay) {
|
||||
endDate = new Date(eventToUpdate.end + 60 * 60000);
|
||||
@@ -519,8 +589,8 @@
|
||||
};
|
||||
}
|
||||
|
||||
$('#calendar').fullCalendar('destroy'); // destroy the calendar
|
||||
$('#calendar').fullCalendar({ //re-initialize the calendar
|
||||
$('#calendar').fullCalendar('destroy');
|
||||
$('#calendar').fullCalendar({
|
||||
header: h,
|
||||
monthNames: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
|
||||
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
|
||||
|
||||
@@ -1,13 +1,32 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports ADSNetLibrary.SIGAPI.Helpers
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class RepContratosCalendario
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Public Property DtAvance() As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtAvance"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtAvance") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Contrato As String
|
||||
Get
|
||||
Return ViewState("Contrato").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Contrato") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -24,14 +43,16 @@ Partial Class RepContratosCalendario
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||
GvContratos.HeaderStyle.ForeColor = Drawing.Color.Black
|
||||
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=34) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
End If
|
||||
|
||||
DtAvance = ObjContratos.DtResultados
|
||||
|
||||
If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
||||
DdlEstatusConsulta.DataSource = ObjContratos.DtResultados
|
||||
DdlEstatusConsulta.DataBind()
|
||||
@@ -66,9 +87,9 @@ Partial Class RepContratosCalendario
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("-", ""))
|
||||
DdlChofer1.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer1.DataBind()
|
||||
DdlChofer1.Items.Insert(0, New ListItem("-", ""))
|
||||
DdlChofer2.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer2.DataBind()
|
||||
DdlChofer2.Items.Insert(0, New ListItem("-", ""))
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -82,6 +103,43 @@ Partial Class RepContratosCalendario
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
If ObjContratos.UpdateContratos(Contrato.ToEntero, TxtFolio.Text, 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:=34, CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero, CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero) Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
Else
|
||||
ObjContratos.RollBack()
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
UpTitulos.Update()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub UpdateModal(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
TxtFolio.Text = GvRow.DataKey("NumeroContrato")
|
||||
TxtCantidadPasajeros.Text = GvRow.DataKey("CantidadPasajeros")
|
||||
DdlClientes.SelectedValue = GvRow.DataKey("CveCliente")
|
||||
DdlClientes.SelectedText = GvRow.DataKey("NombreComercial")
|
||||
TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato")
|
||||
TxtObservaciones.Text = GvRow.DataKey("Observaciones")
|
||||
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
|
||||
TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy hh:mm:ss tt")
|
||||
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy hh:mm:ss tt")
|
||||
'Requeridos
|
||||
ViewState("Contrato") = GvRow.DataKey("CveContrato")
|
||||
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
|
||||
DdlChofer.SelectedValue = GvRow.DataKey("CveChofer")
|
||||
DdlChofer2.SelectedValue = GvRow.DataKey("CveChofer2")
|
||||
DdlEstatusContrato.SelectedValue = GvRow.DataKey("CveContratosEstatus")
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
End Sub
|
||||
Protected Sub Consultar(sender As Object, e As EventArgs)
|
||||
Dim fechaInicial As String = txtFechaI.Text
|
||||
Dim fechaFinal As String = txtFechaF.Text
|
||||
@@ -90,16 +148,38 @@ Partial Class RepContratosCalendario
|
||||
Dim estatus As String = ""
|
||||
Dim nombreEstatus As String = ""
|
||||
Dim innerEstatus As String = ""
|
||||
|
||||
Dim tipoUnidad As String = ""
|
||||
Dim nombreTipoUnidad As String = ""
|
||||
Dim innerTipoUnidad As String = ""
|
||||
|
||||
Dim chofer As String = ""
|
||||
Dim nombreChofer As String = ""
|
||||
Dim innerChofer As String = ""
|
||||
|
||||
If (DdlEstatusConsulta.SelectedValue <> "") Then
|
||||
estatus = $"C.CveContratosEstatus = {DdlEstatusConsulta.SelectedValue} AND"
|
||||
nombreEstatus = ", CE.ContratoEstatus As ContratoEstatus1"
|
||||
innerEstatus = "INNER JOIN Con_ContratosEstatus CE with(nolock) ON CE.CveContratoEstatus = C.CveContratosEstatus
|
||||
"
|
||||
innerEstatus = " INNER JOIN Con_ContratosEstatus CE with(nolock) ON CE.CveContratoEstatus = C.CveContratosEstatus "
|
||||
End If
|
||||
|
||||
If (DdlTIpoUnidad.SelectedValue <> "") Then
|
||||
'tipoUnidad = $"C.CveContratosEstatus = {DdlTIpoUnidad.SelectedValue} AND"
|
||||
'nombreTipoUnidad = ", CE.ContratoTipoUnidad As ContratoTipoUnidad1"
|
||||
'innerTipoUnidad = " INNER JOIN Con_ContratosTipoUnidad CE with(nolock) ON CE.CveContratoTipoUnidad = C.CveContratosEstatus "
|
||||
End If
|
||||
|
||||
If (DdlChofer.SelectedValue <> "") Then
|
||||
'tipoUnidad = $"C.CveContratosEstatus = {DdlTIpoUnidad.SelectedValue} AND"
|
||||
'nombreTipoUnidad = ", CE.ContratoTipoUnidad As ContratoTipoUnidad1"
|
||||
'innerTipoUnidad = " INNER JOIN Con_ContratosTipoUnidad CE with(nolock) ON CE.CveContratoTipoUnidad = C.CveContratosEstatus "
|
||||
End If
|
||||
|
||||
|
||||
Dim intervalo As String = If(DdlEstatusConsulta.SelectedValue = "" And DdlClientesConsulta.SelectedValue = "", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'", $"FechaInicial BETWEEN '{fechaInicial}' AND '{fechaFinal}'")
|
||||
|
||||
|
||||
Dim query As String = $"SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreCompleto {nombreEstatus} FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente {innerEstatus} WHERE {cliente} {estatus} {intervalo}"
|
||||
Dim query As String = $"SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial {nombreEstatus} FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente {innerEstatus} WHERE {cliente} {estatus} {intervalo}"
|
||||
|
||||
Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Using command As New SqlCommand(query, connection)
|
||||
@@ -112,35 +192,43 @@ Partial Class RepContratosCalendario
|
||||
|
||||
UpTitulos.Update()
|
||||
End Sub
|
||||
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
|
||||
Dim fechaS As Date = TxtFechaSalida.Text.ToDate
|
||||
Dim fechaR As Date = TxtFechaRegreso.Text.ToDate
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
If ObjContratos.UpdateContratos(CveContrato.Value.ToEntero, "", TxtDescripcion.Text, "", -1, DdlClientes.SelectedValue.ToEntero, -1, fechaS, fechaR, 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, CveAF:=DdlTipoAF.SelectedValue.ToEntero) Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Actualizado Correctamente.")
|
||||
Protected Sub Expandir(sender As Object, e As EventArgs)
|
||||
If PnExpandirConsulta.Visible Then
|
||||
PnExpandirConsulta.Visible = False
|
||||
BtnExpandir.Text = "↑"
|
||||
Else
|
||||
ObjContratos.RollBack()
|
||||
PnExpandirConsulta.Visible = True
|
||||
BtnExpandir.Text = "↓"
|
||||
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Protected Sub UpdateModal(sender As Object, e As EventArgs)
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
|
||||
End Sub
|
||||
Protected Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then
|
||||
Dim Imagen As New IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim Cliente As String = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim dt As DataTable = ObjContratos.DtResultados
|
||||
Dim params As New List(Of ReportParameter) From {
|
||||
New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa),
|
||||
New ReportParameter("FechaInicio", "-1"),
|
||||
New ReportParameter("FechaFin", "-1"),
|
||||
New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa),
|
||||
New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre),
|
||||
New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString),
|
||||
New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))
|
||||
}
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepContratos.rdlc", dt, params, NombreArchivo:="Reporte Contratos")
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GoContratoDetalle(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("MM/dd/yyyy")
|
||||
TxtFechaRegreso.Text = GvRow.DataKey("FechaFinal").ToDateTime.ToString("MM/dd/yyyy")
|
||||
DdlClientes.SelectedValue = GvRow.DataKey("CveCliente")
|
||||
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
|
||||
DdlChofer.SelectedValue = GvRow.DataKey("CveChofer")
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#ModalActualizar').modal('show');")
|
||||
Dim CveContrato As String = GvRow.DataKey("CveContrato")
|
||||
Response.Redirect(String.Format("~/Transportes/RepContratoDetalle.aspx?CveContrato={0}", CveContrato))
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
.masivo {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.masivo_block {
|
||||
padding: 1rem;
|
||||
border: #E1E5EC 1px solid;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
@@ -28,251 +33,190 @@
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvViajes.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvViajes.ClientID) %>"
|
||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||
</i></a>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row my-1" style="margin-right: 10px; margin-top: 10px;" align="right">
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>"
|
||||
style="display: inline-block; margin-right: -10px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvContratos.ClientID) %>"
|
||||
style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier">
|
||||
</i></a>
|
||||
</div>
|
||||
<%-- Listado de Viajes --%>
|
||||
<asp:GridView ID="GvContratos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontró ningún viaje registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="">
|
||||
<Columns>
|
||||
|
||||
<asp:GridView ID="GvViajes" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontró ningún viaje registrado"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None"
|
||||
data-sort="true" DataKeyNames="CveViaje, CveRuta, Fecha, CveAF, CvePersonal, CveEmpresa, CvePartida, CveDestino, CveMasivo, Ruta">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Ruta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlRuta" runat="server" Text='<%# Eval("Ruta") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Ruta">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlRuta" runat="server" Text='<%# Eval("Ruta") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Partida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Partida">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPartida" runat="server" Text='<%# Eval("Partida") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Destino">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDestino" runat="server" Text='<%# Eval("Destino") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaInicial", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Masivo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlMasivo" runat="server" Text='<%# If(Eval("CveMasivo").ToString = "", "", "Sí") %>'
|
||||
CssClass='<%# If(Eval("Estatus").ToString = "", "", "text-success bold") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LltAF" runat="server" Text='<%# Eval("Unidad") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Chofer">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlChofer" runat="server" Text='<%# Eval("NombreCompleto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Masivo">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtlMasivo" runat="server" Text='<%# Eval("CveMasivo") %>'>></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" OnClick="UpdateViaje" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveViaje" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("CveMasivo").ToString <> "", "Eliminación masiva", "Confirmar") %>'
|
||||
data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="BtnBoletos" runat="server" AlternateText="Boletos"
|
||||
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-ticket'></i>"
|
||||
OnClick="GoBoletos" />
|
||||
<asp:LinkButton ID="BtnViaje" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
||||
OnClick="GoViaje" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Acciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="BtnEditar" runat="server" AlternateText="Editar"
|
||||
CssClass="btn btn-circle btn-sm green" OnClick="UpdateViaje" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="BtnEliminar" runat="server" AlternateText="Eliminar"
|
||||
CssClass="btn btn-circle btn-sm red" OnClick="RemoveViaje" Text="<i class='fa fa-trash'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title='<%# If(Eval("CveMasivo").ToString <> "", "Eliminación masiva", "Confirmar") %>'
|
||||
data-btn-ok-label="si" />
|
||||
<asp:LinkButton ID="BtnBoletos" runat="server" AlternateText="Boletos"
|
||||
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-ticket'></i>"
|
||||
OnClick="GoBoletos" />
|
||||
<asp:LinkButton ID="BtnViaje" runat="server" AlternateText="Viaje"
|
||||
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
||||
OnClick="GoViaje" />
|
||||
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
<%-- Modal --%>
|
||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div id="UpAddChofer" class="modal-content rowpadding" tabindex="-1"
|
||||
runat="server">
|
||||
|
||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div id="UpAddChofer" class="modal-content rowpadding" tabindex="-1"
|
||||
runat="server">
|
||||
|
||||
<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="ModalLabel" runat="server">Agregar Viaje</h4>
|
||||
<h4 class="modal-title" id="ModalLabel" runat="server">Agregar Nuevo Viaje</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="portlet-body">
|
||||
<div class="row margin-bottom-5" id="TrAF" runat="server">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Transporte:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlTransporte" AppendDataBoundItems="true" DataTextField="Descripcion"
|
||||
DataValueField="CveActivoFijo" Class="form-control input-sm select2me"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTransporte" runat="server" ControlToValidate="DdlTransporte"
|
||||
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" BehaviorID="_content_VCETransporte">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5" id="TrRutas" runat="server">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Ruta:"></asp:Label></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>''Rutas''</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 margin-bottom-5" id="TrDestino" runat="server">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Destino:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlDestino" AppendDataBoundItems="true" DataTextField="Destino"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="DdlDestino"
|
||||
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="400px" BehaviorID="_content_VCEDestino">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5" id="TrPartida" runat="server">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Partida:"></asp:Label></label><div
|
||||
class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlPartida" AppendDataBoundItems="true" DataTextField="Destino"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me"
|
||||
Width="200px" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPartida" runat="server" ControlToValidate="DdlPartida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Partida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPartida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVPartida" Width="400px" BehaviorID="_content_VCEPartida">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5" id="TrChofer" runat="server">
|
||||
<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="form-control input-sm select2me"
|
||||
Width="200px" 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" BehaviorID="_content_VCEChofer">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row margin-bottom-5">
|
||||
<label class="col-md-4">
|
||||
<asp:Label runat="server" Text="Fecha Viaje:"></asp:Label></label>
|
||||
<div class="col-md-8">
|
||||
<div class="">
|
||||
<asp:TextBox ID="TxtFechaViaje" runat="server" Class="form-control input-sm select2me"
|
||||
Width="200px" CausesValidation="True"
|
||||
type="date"
|
||||
MaxLength="10">
|
||||
</asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaViaje" runat="server" ControlToValidate="TxtFechaViaje"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Viaje''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaViaje" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaViaje" Width="400px" BehaviorID="_content_VCETxtFechaViaje">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1 truncate">
|
||||
<asp:CheckBox CssClass="col-md-4" ID="IsMasivo" runat="server" Text="Generar Viajes Masivo"
|
||||
Visible="true"
|
||||
OnCheckedChanged="ToggleMasivo" AutoPostBack="true" />
|
||||
</div>
|
||||
|
||||
<div class="row my-1 truncate">
|
||||
<asp:Panel ID="DivFechaMasivo" runat="server" Visible="false" CssClass="col-md-8">
|
||||
<div class="row my-1 truncate date date-picker">
|
||||
<label class="col-md-4 bold">Fecha Inicial:</label>
|
||||
<asp:TextBox CssClass="col-md-8" ID="TxtFechaInicial" runat="server" type="date"
|
||||
Width="150px"></asp:TextBox>
|
||||
</div>
|
||||
<div class="row my-1 truncate">
|
||||
<label class="col-md-4 bold">Lapso</label>
|
||||
<asp:TextBox CssClass="col-md-8" ID="TxtFrecuencia" runat="server" type="number"
|
||||
Width="150px"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4 bold text-primary">Folio</label>
|
||||
<asp:Label class="col-md-8" runat="server" ID="LbFolio" Text="Folio"></asp:Label>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="AddViaje" runat="server" CssClass="btn btn-primary"
|
||||
ValidationGroup="GrpGuardar"
|
||||
Text="Guardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
<div class="row">
|
||||
<label class="col-md-4">Ruta</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlRutas" AppendDataBoundItems="true" DataTextField="Ruta"
|
||||
DataValueField="CveRuta" Class="form-control input-sm select2me"
|
||||
Width="100%" 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>''Rutas''</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">Destino</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlDestino" AppendDataBoundItems="true" DataTextField="Destino"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDestino" runat="server" ControlToValidate="DdlDestino"
|
||||
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="400px" BehaviorID="_content_VCEDestino">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<label class="col-md-4">Partida</label>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlPartida" AppendDataBoundItems="true" DataTextField="Destino"
|
||||
DataValueField="CveDestino" Class="form-control input-sm select2me"
|
||||
Width="100%" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVPartida" runat="server" ControlToValidate="DdlPartida"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Partida''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPartida" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVPartida" Width="400px" BehaviorID="_content_VCEPartida">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<label class="col-md-4">Fecha Viaje</label>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtFechaViaje" runat="server" Class="form-control input-sm select2me"
|
||||
Width="100%" CausesValidation="True"
|
||||
type="date"
|
||||
MaxLength="10">
|
||||
</asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTxtFechaViaje" runat="server" ControlToValidate="TxtFechaViaje"
|
||||
Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Viaje''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtFechaViaje" runat="server" HighlightCssClass="vco"
|
||||
TargetControlID="RFVTxtFechaViaje" Width="400px" BehaviorID="_content_VCETxtFechaViaje">
|
||||
</ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row my-1">
|
||||
<asp:CheckBox CssClass="col-md-4" ID="IsMasivo" runat="server" Text="Generar Viajes Masivo"
|
||||
Visible="true"
|
||||
OnCheckedChanged="ToggleMasivo" AutoPostBack="true" />
|
||||
<asp:Panel ID="DivFechaMasivo" runat="server" Visible="false" CssClass="col-md-7 masivo_block">
|
||||
<div class="row my-1 truncate date date-picker">
|
||||
<label class="col-md-4 bold">Fecha Inicial:</label>
|
||||
<asp:TextBox CssClass="col-md-8" ID="TxtFechaInicial" runat="server" type="date"
|
||||
Width="150px"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
<div class="row my-1 truncate">
|
||||
<label class="col-md-4 bold">Lapso(días)</label>
|
||||
<asp:TextBox CssClass="col-md-8" ID="TxtFrecuencia" runat="server" type="number"
|
||||
Width="150px"></asp:TextBox>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="AddViaje" runat="server" CssClass="btn btn-primary"
|
||||
ValidationGroup="GrpGuardar"
|
||||
Text="Guardar"></asp:Button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones.ModExtensiones
|
||||
|
||||
Partial Class ListadoViajes
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
Private Property CveViaje As String
|
||||
Private Property CveContrato As String
|
||||
Get
|
||||
Return ViewState("CveViaje").ToString()
|
||||
Return ViewState("CveContrato").ToString()
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("CveViaje") = value
|
||||
ViewState("CveContrato") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property Ruta As String
|
||||
@@ -32,18 +33,6 @@ Partial Class ListadoViajes
|
||||
|
||||
End Sub
|
||||
Private Sub InicializaCombos()
|
||||
'Lista Activos Fijos'
|
||||
Dim ObjAF As New ClsAF()
|
||||
If ObjAF.GetActivosFijos(-1, 13, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, 1, "-1", -1, -1, -1) Then
|
||||
If ObjAF.DtResultados.Rows.Count > 0 Then
|
||||
DdlTransporte.DataSource = ObjAF.DtResultados
|
||||
DdlTransporte.DataBind()
|
||||
|
||||
DdlTransporte.Items.Insert(0, New ListItem("Seleccione Transporte", ""))
|
||||
End If
|
||||
End If
|
||||
ObjAF.Dispose()
|
||||
|
||||
'Lista Rutas'
|
||||
Dim ObjRutas As New ClsTransportes()
|
||||
If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
|
||||
@@ -55,7 +44,6 @@ Partial Class ListadoViajes
|
||||
End If
|
||||
End If
|
||||
'Lista Destinos'
|
||||
|
||||
If ObjRutas.GetDestinos() Then
|
||||
|
||||
If ObjRutas.DtResultados.Rows.Count > 0 Then
|
||||
@@ -70,29 +58,25 @@ Partial Class ListadoViajes
|
||||
End If
|
||||
ObjRutas.Dispose()
|
||||
|
||||
'Lista Chofer'
|
||||
DdlChofer.DataSource = GlobalDTRHPersonal(185)
|
||||
DdlChofer.DataBind()
|
||||
DdlChofer.Items.Insert(0, New ListItem("Seleccione Chofer", ""))
|
||||
|
||||
End Sub
|
||||
Private Sub GvViajes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvViajes.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("CveMasivo") <> "" Then
|
||||
e.Row.FCLabel("LtlMasivo").Text = "Sí"
|
||||
e.Row.FCLabel("LtlMasivo").ForeColor = Drawing.Color.Green
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
'Carga Viajes
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
If ObjTransportes.GetViajes(-1, UsuarioActual.CveEmpresa) Then
|
||||
GvViajes.DataSource = ObjTransportes.DtResultados
|
||||
ObjTransportes.Dispose()
|
||||
GvViajes.DataBind()
|
||||
If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=35) Then
|
||||
GvContratos.DataSource = ObjContratos.DtResultados
|
||||
GvContratos.DataBind()
|
||||
End If
|
||||
|
||||
'Generar Folio
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||
Dim ObjFolio As New ClsGralFolios
|
||||
If ObjFolio.GetFolios("Con", UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto) Then
|
||||
If ObjFolio.DtResultados.Rows.Count > 0 Then
|
||||
Dim drr As DataRow = ObjFolio.DtResultados.FiltroPrimero("")
|
||||
LbFolio.Text = $"{drr("Serie").ToString}-{drr("FActual").ToString}"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LBAgregarViaje_Click(sender As Object, e As EventArgs) Handles LBAgregarViaje.Click
|
||||
@@ -102,20 +86,17 @@ Partial Class ListadoViajes
|
||||
Public Sub MostrarModal()
|
||||
IsMasivo.Visible = True
|
||||
DdlRutas.Text = ""
|
||||
DdlTransporte.Text = ""
|
||||
DdlChofer.Text = ""
|
||||
TxtFechaViaje.Text = ""
|
||||
DdlPartida.Text = ""
|
||||
DdlDestino.SelectedValue = ""
|
||||
BtnGuardar.Text = "Guardar"
|
||||
BtnGuardar.Text = "Agregar"
|
||||
ModalLabel.InnerHtml = "Agregar Nuevo Viaje"
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||
End Sub
|
||||
|
||||
Protected Sub AddViaje(sender As Object, e As EventArgs)
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
|
||||
'Generador de Viajes Masivos
|
||||
If IsMasivo.Checked = True Then
|
||||
If TxtFechaInicial.Text = "" Or TxtFrecuencia.Text = "" Then
|
||||
Alert("Es necesario agregar la fecha inicial y la frecuencia", TipoMensaje.MsgAdvertencia)
|
||||
@@ -123,68 +104,88 @@ Partial Class ListadoViajes
|
||||
End If
|
||||
|
||||
Dim CveMasivo As Integer = DateTimeOffset.Now.ToUnixTimeSeconds().ToEntero
|
||||
|
||||
Dim fechaInicial As DateTime = DateTime.Parse(TxtFechaInicial.Text)
|
||||
Dim frecuencia As Integer = Integer.Parse(TxtFrecuencia.Text)
|
||||
Dim fechaInicial As DateTime = TxtFechaInicial.Text.ToDate
|
||||
Dim fechasGeneradas As New List(Of DateTime)()
|
||||
|
||||
While fechaInicial.Year = DateTime.Now.Year
|
||||
fechasGeneradas.Add(fechaInicial)
|
||||
fechaInicial = fechaInicial.AddDays(frecuencia)
|
||||
fechaInicial = fechaInicial.AddDays(TxtFrecuencia.Text.ToEntero)
|
||||
End While
|
||||
|
||||
For Each fecha As DateTime In fechasGeneradas
|
||||
Try
|
||||
Dim CveContratoHijo As Integer = -1
|
||||
CveContratoHijo = ObjTransportes.AddViajes(DdlRutas.Text.ToEntero, DdlTransporte.Text.ToEntero, DdlChofer.Text.ToEntero, UsuarioActual.CveEmpresa, fecha, DdlPartida.Text.ToEntero, DdlDestino.Text.ToEntero, IsMasivo:=True, CveMasivo:=CveMasivo)
|
||||
|
||||
If CveContratoHijo > 0 Then
|
||||
ObjTransportes.Commit()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError)
|
||||
End Try
|
||||
Next
|
||||
|
||||
DdlRutas.Text = ""
|
||||
DdlTransporte.Text = ""
|
||||
DdlChofer.Text = ""
|
||||
TxtFechaViaje.Text = ""
|
||||
DdlPartida.Text = ""
|
||||
DdlDestino.SelectedValue = ""
|
||||
ObjTransportes.Dispose()
|
||||
CargaDatos()
|
||||
Alert("El viaje masivo se registró correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Try
|
||||
If BtnGuardar.Text = "Guardar" Then
|
||||
Dim CveContratoHijo As Integer = -1
|
||||
CveContratoHijo = ObjTransportes.AddViajes(DdlRutas.Text.ToEntero, DdlTransporte.Text.ToEntero, DdlChofer.Text.ToEntero, UsuarioActual.CveEmpresa, TxtFechaViaje.Text.ToDate, DdlPartida.Text.ToEntero, DdlDestino.Text.ToEntero)
|
||||
For Each fecha As DateTime In fechasGeneradas
|
||||
Dim ObjFolio As New ClsGralFolios
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
If CveContratoHijo > 0 Then
|
||||
ObjTransportes.Commit()
|
||||
Alert("El Viaje se registró Correctamente.", TipoMensaje.MsgInformacion)
|
||||
DdlRutas.Text = ""
|
||||
DdlTransporte.Text = ""
|
||||
DdlChofer.Text = ""
|
||||
TxtFechaViaje.Text = ""
|
||||
DdlPartida.Text = ""
|
||||
DdlDestino.SelectedValue = ""
|
||||
'Generamos folio
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||
If ObjFolio.GetFolios("Con", UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto) Then
|
||||
If ObjFolio.DtResultados.Rows.Count > 0 Then
|
||||
Dim drr As DataRow = ObjFolio.DtResultados.FiltroPrimero("")
|
||||
LbFolio.Text = $"{drr("Serie").ToString}-{drr("FActual").ToString}"
|
||||
End If
|
||||
End If
|
||||
'Agregamos contrato
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, fecha, fecha, "", "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CveRuta:=DdlRutas.Text.ToEntero, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero, CveMasivo:=CveMasivo) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
End If
|
||||
'Actualizamos Folio
|
||||
If ObjFolio.UpdateFolioActual(CveSubProyecto, "Con", True, UsuarioActual.CveEmpresa) Then
|
||||
ObjFolio.Dispose()
|
||||
End If
|
||||
Next
|
||||
Alert("Viajes Masivos generados correctamente.")
|
||||
Catch ex As Exception
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.RollBack()
|
||||
Alert("Ocurrió un error al generar viajes masivo", TipoMensaje.MsgError)
|
||||
Finally
|
||||
DdlRutas.Text = ""
|
||||
TxtFechaViaje.Text = ""
|
||||
DdlPartida.Text = ""
|
||||
DdlDestino.SelectedValue = ""
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.Dispose()
|
||||
CargaDatos()
|
||||
End Try
|
||||
Else
|
||||
Dim ObjContratos As New ClsContratos
|
||||
ObjContratos.IniciaTransacSQL()
|
||||
|
||||
Try
|
||||
'Agregamos Viaje
|
||||
If BtnGuardar.Text = "Agregar" Then
|
||||
If ObjContratos.AddContratos(LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaViaje.Text.ToDate, TxtFechaViaje.Text.ToDate, "", "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CveRuta:=DdlRutas.Text.ToEntero, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) > 0 Then
|
||||
ObjContratos.Commit()
|
||||
Alert("Viaje agregado correctamente.")
|
||||
End If
|
||||
Else
|
||||
|
||||
If ObjTransportes.UpdateViajes(CveViaje.ToEntero, DdlRutas.Text.ToEntero, DdlTransporte.Text.ToEntero, DdlChofer.Text.ToEntero, UsuarioActual.CveEmpresa, TxtFechaViaje.Text.ToDate, DdlPartida.Text.ToEntero, DdlDestino.Text.ToEntero) = True Then
|
||||
Alert("El viaje se modificó correctamente.", TipoMensaje.MsgInformacion)
|
||||
ObjTransportes.Commit()
|
||||
CargaDatos()
|
||||
'Actualizamos Viaje
|
||||
If ObjContratos.UpdateContratos(CveContrato.ToEntero, LbFolio.Text, "", "", UsuarioActual.CveProveedor, -1, -1, TxtFechaInicial.Text.ToDate, TxtFechaInicial.Text.ToDate, "", "", 10, -1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, -1, -1, 0, CveContratoTipo:=35, CveContratosEstatus:=50, CveRuta:=DdlRutas.Text.ToEntero, CvePartida:=DdlPartida.SelectedValue.ToEntero, CveDestino:=DdlDestino.SelectedValue.ToEntero) = True Then
|
||||
ObjContratos.Commit()
|
||||
Alert("El viaje se actualizó correctamente.")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ObjTransportes.RollBack()
|
||||
Alert("Ocurrió un error al generar viaje", TipoMensaje.MsgError)
|
||||
ObjContratos.RollBack()
|
||||
Finally
|
||||
DdlRutas.Text = ""
|
||||
TxtFechaViaje.Text = ""
|
||||
DdlPartida.Text = ""
|
||||
DdlDestino.SelectedValue = ""
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", "TipoSucursal = 1").ToEntero
|
||||
Dim ObjFolios As New ClsGralFolios
|
||||
If ObjFolios.UpdateFolioActual(CveSubProyecto, "Con", True, UsuarioActual.CveEmpresa) Then
|
||||
ObjFolios.Dispose()
|
||||
End If
|
||||
CargaDatos()
|
||||
ObjTransportes.Dispose()
|
||||
ObjContratos.Dispose()
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub UpdateViaje(sender As Object, e As EventArgs)
|
||||
@@ -192,12 +193,10 @@ Partial Class ListadoViajes
|
||||
DivFechaMasivo.Visible = False
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
DdlTransporte.SelectedValue = GvRow.DataKey("CveAF")
|
||||
DdlRutas.SelectedValue = GvRow.DataKey("CveRuta")
|
||||
DdlDestino.SelectedValue = GvRow.DataKey("CveDestino")
|
||||
DdlPartida.SelectedValue = GvRow.DataKey("CvePartida")
|
||||
DdlChofer.SelectedValue = GvRow.DataKey("CvePersonal")
|
||||
ViewState("CveViaje") = GvRow.DataKey("CveViaje")
|
||||
ViewState("CveContrato") = GvRow.DataKey("CveContrato")
|
||||
ViewState("Ruta") = GvRow.DataKey("Ruta")
|
||||
Dim fecha As DateTime
|
||||
|
||||
@@ -205,38 +204,40 @@ Partial Class ListadoViajes
|
||||
TxtFechaViaje.Text = fecha.ToString("yyyy-MM-dd").Replace(" ", "T")
|
||||
End If
|
||||
|
||||
BtnGuardar.Text = "Editar"
|
||||
BtnGuardar.Text = "Actualizar"
|
||||
ModalLabel.InnerHtml = "Actualizar Viaje"
|
||||
|
||||
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "ModalAgregar"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub RemoveViaje(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveMasivo As String = GvRow.DataKey("CveMasivo")
|
||||
'Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
'Dim CveMasivo As String = GvRow.DataKey("CveMasivo")
|
||||
|
||||
Dim ObjTransportes As New ClsTransportes
|
||||
'Dim ObjTransportes As New ClsTransportes
|
||||
|
||||
ObjTransportes.IniciaTransacSQL()
|
||||
If CveMasivo = "" Then
|
||||
Try
|
||||
ObjTransportes.RemoveViaje(CveViaje:=GvRow.DataKey("CveViaje").ToEntero)
|
||||
ObjTransportes.Commit()
|
||||
Catch ex As Exception
|
||||
Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError)
|
||||
End Try
|
||||
Else
|
||||
Try
|
||||
ObjTransportes.RemoveViaje(CveMasivo:=CveMasivo.ToEntero)
|
||||
ObjTransportes.Commit()
|
||||
Catch ex As Exception
|
||||
Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError)
|
||||
'ObjTransportes.IniciaTransacSQL()
|
||||
'If CveMasivo = "" Then
|
||||
' Try
|
||||
' ObjTransportes.RemoveViaje(CveViaje:=GvRow.DataKey("CveViaje").ToEntero)
|
||||
' ObjTransportes.Commit()
|
||||
' Catch ex As Exception
|
||||
' Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError)
|
||||
' End Try
|
||||
'Else
|
||||
' Try
|
||||
' ObjTransportes.RemoveViaje(CveMasivo:=CveMasivo.ToEntero)
|
||||
' ObjTransportes.Commit()
|
||||
' Catch ex As Exception
|
||||
' Alert($"Ocurrió un error {ex}", TipoMensaje.MsgError)
|
||||
|
||||
End Try
|
||||
End If
|
||||
Alert("Viaje eliminado correctamente")
|
||||
CargaDatos()
|
||||
ObjTransportes.Dispose()
|
||||
' End Try
|
||||
'End If
|
||||
'Alert("Viaje eliminado correctamente")
|
||||
'CargaDatos()
|
||||
'ObjTransportes.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -255,6 +256,5 @@ Partial Class ListadoViajes
|
||||
Dim CveViaje As String = GvRow.DataKey("CveViaje")
|
||||
Dim Ruta As String = GvRow.DataKey("Ruta")
|
||||
Response.Redirect(String.Format("~/Transportes/RepBoletos.aspx?CveViaje={0}&Ruta={1}", CveViaje, Ruta))
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -65,25 +65,44 @@ Partial Class Ventas_CatPreciosLista
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnAgregarCatalogo_Click(sender As Object, e As EventArgs) Handles BtnAgregarCatalogo.Click
|
||||
Dim ObjVta As New ClsVentas
|
||||
Dim ActualizarFranquicias As Boolean = False
|
||||
|
||||
If EsEditar = 0 Then
|
||||
If ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, ChkPredeterminada.Checked, 0) > 0 Then
|
||||
Alert("El Precio de Lista se agregó correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar el Precio de Lista", TipoMensaje.MsgError)
|
||||
End If
|
||||
ElseIf EsEditar = 1 Then
|
||||
If ObjVta.UpdatePrecioLista(TxtPrecioLista.Text, chkEstatus.Checked, UsuarioActual.CveUsuario, 0, ChkPredeterminada.Checked, CvePrecioLista) Then
|
||||
Alert("El Precio de Lista se editó correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al editar al Precio de Lista", TipoMensaje.MsgError)
|
||||
End If
|
||||
EsEditar = 0
|
||||
dvEstatus.Visible = False
|
||||
BtnAgregarCatalogo.Text = "Agregar"
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
ActualizarFranquicias = True
|
||||
End If
|
||||
|
||||
Dim ObjVta As New ClsVentas
|
||||
ObjVta.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
Try
|
||||
If EsEditar = 0 Then
|
||||
If ObjVta.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, ChkPredeterminada.Checked, 0, UpdateFranquicia:=ActualizarFranquicias) > 0 Then
|
||||
Alert("El Precio de Lista se agregó correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al agregar el Precio de Lista", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
End If
|
||||
ElseIf EsEditar = 1 Then
|
||||
If ObjVta.UpdatePrecioLista(TxtPrecioLista.Text, chkEstatus.Checked, UsuarioActual.CveUsuario, 0, ChkPredeterminada.Checked, CvePrecioLista, UpdateFranquicia:=ActualizarFranquicias) Then
|
||||
Alert("El Precio de Lista se editó correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al editar al Precio de Lista", TipoMensaje.MsgError)
|
||||
TieneError = True
|
||||
End If
|
||||
EsEditar = 0
|
||||
dvEstatus.Visible = False
|
||||
BtnAgregarCatalogo.Text = "Agregar"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
GuardaLog(ex.ToString())
|
||||
End Try
|
||||
|
||||
If TieneError Then
|
||||
ObjVta.RollBack()
|
||||
Else
|
||||
ObjVta.Commit()
|
||||
End If
|
||||
GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
RegistraScript("$('#divAgregar').modal('hide')")
|
||||
ObjVta.Dispose()
|
||||
@@ -94,6 +113,7 @@ Partial Class Ventas_CatPreciosLista
|
||||
UpDatos.Update()
|
||||
UpBodyCo.Update()
|
||||
|
||||
RecargaGlobal()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
@@ -105,6 +125,8 @@ Partial Class Ventas_CatPreciosLista
|
||||
ObjPrecioLista.Dispose()
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
|
||||
RecargaGlobal()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
@@ -131,155 +153,158 @@ Partial Class Ventas_CatPreciosLista
|
||||
dvEstatus.Visible = False
|
||||
UpBodyCo.Update()
|
||||
UpFooter.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
Private Sub RecargaGlobal()
|
||||
GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing
|
||||
End Sub
|
||||
|
||||
#Region "VIEJO"
|
||||
' Public Property PuedeEliminar As Boolean
|
||||
' Get
|
||||
' Return CBool(ViewState("PuedeEditar"))
|
||||
' End Get
|
||||
' Set(value As Boolean)
|
||||
' ViewState("PuedeEditar") = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
' If Not Page.IsPostBack Then
|
||||
|
||||
' CargaDatos()
|
||||
|
||||
' 'Permiso Registro
|
||||
' If UsuarioActual.TienePermisoProceso(132) Then LbAgregar.Enabled = True Else LbAgregar.Enabled = False
|
||||
|
||||
' 'Permiso Eliminar
|
||||
' If UsuarioActual.TienePermisoProceso(134) Then GvDatos.Columns(5).Visible = True Else GvDatos.Columns(6).Visible = False
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
' Private Sub CargaDatos()
|
||||
' Dim ObjListas As New ClsVentas
|
||||
' If ObjListas.GetPrecioListas(CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
' GvDatos.DataSource = ObjListas.DtResultados
|
||||
' GvDatos.DataBind()
|
||||
' Else
|
||||
' Me.GvDatos.DataSource = Nothing
|
||||
' End If
|
||||
|
||||
' If ObjListas.GetPrecioListas(-1) Then
|
||||
' GlobalDTPrecioListas(-1) = ObjListas.DtResultados
|
||||
' End If
|
||||
|
||||
' ObjListas.Dispose()
|
||||
' OrdenaDatos()
|
||||
' End Sub
|
||||
|
||||
' Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
' Dim ObjListas As New ClsVentas
|
||||
|
||||
' If HdnModalidad.Value = "I" Then
|
||||
' If ObjListas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text.Trim, TxtPorcentaje.Text.Trim.ToDouble) Then
|
||||
' TxtPrecioLista.Text = ""
|
||||
' TxtPorcentaje.Text = ""
|
||||
' Alert("La nueva Lista se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' UpTitulos.Update()
|
||||
' CargaDatos()
|
||||
' UpDatos.Update()
|
||||
' OcultaDiv()
|
||||
' End If
|
||||
' ObjListas.Dispose()
|
||||
' Else
|
||||
' If HdnID.Value.ToEntero <> -1 Then
|
||||
' If ObjListas.UpdatePrecioLista(TxtPrecioLista.Text.Trim, True, UsuarioActual.CveUsuario, TxtPorcentaje.Text.Trim.ToDouble, HdnID.Value.ToEntero) Then
|
||||
' TxtPrecioLista.Text = ""
|
||||
' TxtPorcentaje.Text = ""
|
||||
' Alert("La lista se actualizó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' UpTitulos.Update()
|
||||
' CargaDatos()
|
||||
' UpDatos.Update()
|
||||
' OcultaDiv()
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End Sub
|
||||
|
||||
'#Region "G V D A T O S"
|
||||
' Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
' Dim URL As String = String.Format("javascript:CleanObjects();SetValue('HdnModalidad', 'U');SetValue('HdnID', '{0}'); SetObjects('{1}','{2}');ShowDivRegistro();return false;", e.Row.DBCampo("CvePrecioLista").ToEntero, e.Row.DBCampo("PrecioLista"), e.Row.DBCampo("Porcentaje"))
|
||||
|
||||
' 'GeneroLigas
|
||||
' Dim Liga As String = String.Format("<a class=""LinkBlanco"" href=""{0}"">", URL)
|
||||
' e.Row.VerticalAlign = VerticalAlign.Middle
|
||||
' e.Row.FCLinkButton("ImgE").OnClientClick = URL
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
' End Sub
|
||||
|
||||
' Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
' Dim ObjListas As New ClsVentas
|
||||
' If ObjListas.RemovePrecioLista(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
' GvDatos.EditIndex = -1
|
||||
' ViewState("DTPrecioListas") = ObjListas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' Alert("La Lista se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' End If
|
||||
|
||||
' If ObjListas.GetPrecioListas(-1) Then
|
||||
' GlobalDTPrecioListas(-1) = ObjListas.DtResultados
|
||||
' End If
|
||||
|
||||
' ObjListas.Dispose()
|
||||
|
||||
' CargaDatos()
|
||||
' UpDatos.Update()
|
||||
' End Sub
|
||||
|
||||
|
||||
|
||||
' Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
' Dim ObjListas As New ClsVentas
|
||||
' Dim PrecioLista As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPrecioLista"), TextBox).Text.Trim
|
||||
' Dim Porcentaje As Double = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPorcentaje"), TextBox).Text.Trim.ToDouble
|
||||
' Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
' Dim CvePrecioLista As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
' If ObjListas.UpdatePrecioLista(PrecioLista, Estatus, UsuarioActual.CveUsuario, Porcentaje, CvePrecioLista) Then
|
||||
' GvDatos.EditIndex = -1
|
||||
' ViewState("DTPrecioListas") = ObjListas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
' End If
|
||||
|
||||
' If ObjListas.GetPrecioListas(-1) Then
|
||||
' GlobalDTPrecioListas(-1) = ObjListas.DtResultados
|
||||
' End If
|
||||
|
||||
' ObjListas.Dispose()
|
||||
|
||||
' OrdenaDatos()
|
||||
' End Sub
|
||||
|
||||
'#End Region
|
||||
|
||||
|
||||
'#Region " O R D E N A M I E N T O JAVASCRIPT"
|
||||
' Private Sub OrdenaDatos()
|
||||
' If (GvDatos.Rows.Count > 0) Then
|
||||
' GvDatos.UseAccessibleHeader = True
|
||||
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
' RegistraScript("OrdenarGV();")
|
||||
' End If
|
||||
' End Sub
|
||||
'#End Region
|
||||
|
||||
|
||||
|
||||
' Private Sub OcultaDiv()
|
||||
' ScriptManager.RegisterStartupScript(Me, Me.GetType, "Llave", "HideDivRegistro();", True)
|
||||
' End Sub
|
||||
' Public Property PuedeEliminar As Boolean
|
||||
' Get
|
||||
' Return CBool(ViewState("PuedeEditar"))
|
||||
' End Get
|
||||
' Set(value As Boolean)
|
||||
' ViewState("PuedeEditar") = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
' If Not Page.IsPostBack Then
|
||||
|
||||
' CargaDatos()
|
||||
|
||||
' 'Permiso Registro
|
||||
' If UsuarioActual.TienePermisoProceso(132) Then LbAgregar.Enabled = True Else LbAgregar.Enabled = False
|
||||
|
||||
' 'Permiso Eliminar
|
||||
' If UsuarioActual.TienePermisoProceso(134) Then GvDatos.Columns(5).Visible = True Else GvDatos.Columns(6).Visible = False
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
' Private Sub CargaDatos()
|
||||
' Dim ObjListas As New ClsVentas
|
||||
' If ObjListas.GetPrecioListas(CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
' GvDatos.DataSource = ObjListas.DtResultados
|
||||
' GvDatos.DataBind()
|
||||
' Else
|
||||
' Me.GvDatos.DataSource = Nothing
|
||||
' End If
|
||||
|
||||
' If ObjListas.GetPrecioListas(-1) Then
|
||||
' GlobalDTPrecioListas(-1) = ObjListas.DtResultados
|
||||
' End If
|
||||
|
||||
' ObjListas.Dispose()
|
||||
' OrdenaDatos()
|
||||
' End Sub
|
||||
|
||||
' Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
' Dim ObjListas As New ClsVentas
|
||||
|
||||
' If HdnModalidad.Value = "I" Then
|
||||
' If ObjListas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text.Trim, TxtPorcentaje.Text.Trim.ToDouble) Then
|
||||
' TxtPrecioLista.Text = ""
|
||||
' TxtPorcentaje.Text = ""
|
||||
' Alert("La nueva Lista se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' UpTitulos.Update()
|
||||
' CargaDatos()
|
||||
' UpDatos.Update()
|
||||
' OcultaDiv()
|
||||
' End If
|
||||
' ObjListas.Dispose()
|
||||
' Else
|
||||
' If HdnID.Value.ToEntero <> -1 Then
|
||||
' If ObjListas.UpdatePrecioLista(TxtPrecioLista.Text.Trim, True, UsuarioActual.CveUsuario, TxtPorcentaje.Text.Trim.ToDouble, HdnID.Value.ToEntero) Then
|
||||
' TxtPrecioLista.Text = ""
|
||||
' TxtPorcentaje.Text = ""
|
||||
' Alert("La lista se actualizó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' UpTitulos.Update()
|
||||
' CargaDatos()
|
||||
' UpDatos.Update()
|
||||
' OcultaDiv()
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End Sub
|
||||
|
||||
'#Region "G V D A T O S"
|
||||
' Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
' If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
' Dim URL As String = String.Format("javascript:CleanObjects();SetValue('HdnModalidad', 'U');SetValue('HdnID', '{0}'); SetObjects('{1}','{2}');ShowDivRegistro();return false;", e.Row.DBCampo("CvePrecioLista").ToEntero, e.Row.DBCampo("PrecioLista"), e.Row.DBCampo("Porcentaje"))
|
||||
|
||||
' 'GeneroLigas
|
||||
' Dim Liga As String = String.Format("<a class=""LinkBlanco"" href=""{0}"">", URL)
|
||||
' e.Row.VerticalAlign = VerticalAlign.Middle
|
||||
' e.Row.FCLinkButton("ImgE").OnClientClick = URL
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
' End Sub
|
||||
|
||||
' Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
' Dim ObjListas As New ClsVentas
|
||||
' If ObjListas.RemovePrecioLista(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
' GvDatos.EditIndex = -1
|
||||
' ViewState("DTPrecioListas") = ObjListas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' Alert("La Lista se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' End If
|
||||
|
||||
' If ObjListas.GetPrecioListas(-1) Then
|
||||
' GlobalDTPrecioListas(-1) = ObjListas.DtResultados
|
||||
' End If
|
||||
|
||||
' ObjListas.Dispose()
|
||||
|
||||
' CargaDatos()
|
||||
' UpDatos.Update()
|
||||
' End Sub
|
||||
|
||||
|
||||
|
||||
' Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
' Dim ObjListas As New ClsVentas
|
||||
' Dim PrecioLista As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPrecioLista"), TextBox).Text.Trim
|
||||
' Dim Porcentaje As Double = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtPorcentaje"), TextBox).Text.Trim.ToDouble
|
||||
' Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
' Dim CvePrecioLista As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
|
||||
|
||||
' If ObjListas.UpdatePrecioLista(PrecioLista, Estatus, UsuarioActual.CveUsuario, Porcentaje, CvePrecioLista) Then
|
||||
' GvDatos.EditIndex = -1
|
||||
' ViewState("DTPrecioListas") = ObjListas.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
|
||||
' End If
|
||||
|
||||
' If ObjListas.GetPrecioListas(-1) Then
|
||||
' GlobalDTPrecioListas(-1) = ObjListas.DtResultados
|
||||
' End If
|
||||
|
||||
' ObjListas.Dispose()
|
||||
|
||||
' OrdenaDatos()
|
||||
' End Sub
|
||||
|
||||
'#End Region
|
||||
|
||||
|
||||
'#Region " O R D E N A M I E N T O JAVASCRIPT"
|
||||
' Private Sub OrdenaDatos()
|
||||
' If (GvDatos.Rows.Count > 0) Then
|
||||
' GvDatos.UseAccessibleHeader = True
|
||||
' GvDatos.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
' RegistraScript("OrdenarGV();")
|
||||
' End If
|
||||
' End Sub
|
||||
'#End Region
|
||||
|
||||
|
||||
|
||||
' Private Sub OcultaDiv()
|
||||
' ScriptManager.RegisterStartupScript(Me, Me.GetType, "Llave", "HideDivRegistro();", True)
|
||||
' End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -781,7 +781,7 @@ Partial Class Clientes
|
||||
|
||||
'JM 05-02-19: CRM
|
||||
'If UsuarioActual.Empresa.UsaCRM Then
|
||||
If GlobalDTCRMTipoProceso(UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||
If GlobalDTCRMTipoProceso(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTCRMTipoProceso(UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||
VerificaVinculacion()
|
||||
UpAccionesCRM.Update()
|
||||
End If
|
||||
@@ -2618,6 +2618,10 @@ Partial Class Clientes
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not ErrorProceso AndAlso UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
ErrorProceso = Not ActualizarClienteFranquicia(ObjClientes, CveClienteNuevo)
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
@@ -2671,6 +2675,10 @@ Partial Class Clientes
|
||||
If Not ErrorProceso AndAlso Not GuardarDocumentosClientes(objDoc, Me.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If Not ErrorProceso AndAlso UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
ErrorProceso = Not ActualizarClienteFranquicia(ObjClientes, Me.CveCliente)
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
@@ -2773,6 +2781,23 @@ Partial Class Clientes
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function ActualizarClienteFranquicia(ByRef ObjClientes As ClsClientes, CveClienteRef As Integer) As Boolean
|
||||
Dim TieneError As Boolean = False
|
||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||
|
||||
Dim Franquicias As String() = FranquiciasStr.Split(","c)
|
||||
|
||||
For Each Franquicia As String In Franquicias
|
||||
Dim CveEmpresaFranquicia As Integer = Franquicia.ToEntero
|
||||
If Not ObjClientes.UpdateClienteFranquicia(CveClienteRef, UsuarioActual.CveEmpresa, CveEmpresaFranquicia) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Not TieneError
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -2415,7 +2415,11 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
|
||||
If DTCuentas.Rows.Count > 0 Then
|
||||
CuentaBeneficiario = DTCuentas.Rows(0)("NumCuenta").ToString
|
||||
If String.IsNullOrEmpty(DTCuentas.Rows(0)("CLABE").ToString) Then
|
||||
CuentaBeneficiario = DTCuentas.Rows(0)("NumCuenta").ToString
|
||||
Else
|
||||
CuentaBeneficiario = DTCuentas.Rows(0)("CLABE").ToString
|
||||
End If
|
||||
Else
|
||||
Alert("No se pudo encontrar la cuenta", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
|
||||
@@ -263,7 +263,9 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
drr("SerieFolio") = resp.SerieFolio
|
||||
dtt.Rows.Add(drr)
|
||||
|
||||
DescargarFactura(resp.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)
|
||||
'DescargarFactura(resp.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)
|
||||
GenerarPDFVenta(resp.CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False)
|
||||
|
||||
Archivo = String.Format("{0}PDF/ING/{1}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), resp.SerieFolio)
|
||||
If File.Exists(Archivo) Then
|
||||
archiveZip.CreateEntryFromFile(Archivo, resp.SerieFolio & ".pdf")
|
||||
|
||||
@@ -3194,7 +3194,7 @@ Partial Class ProductosyServicios
|
||||
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero()
|
||||
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
|
||||
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
|
||||
EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
|
||||
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveEmpresaFranquicia, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
|
||||
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
||||
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked,
|
||||
VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal,
|
||||
|
||||
@@ -2551,7 +2551,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N2}" ItemStyle-Width="10%" />
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete"
|
||||
@@ -4376,7 +4376,9 @@
|
||||
</b>
|
||||
</td>
|
||||
<td><b>
|
||||
<asp:Label ID="LblUtilidadPorcentaje" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></b></td>
|
||||
<asp:Label ID="LblUtilidadPorcentaje" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></b>
|
||||
 
|
||||
<asp:Label ID="LblPrecioCompra" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
||||
@@ -13524,7 +13524,7 @@ Partial Class Ventas
|
||||
CargaNCDT(factura.CveVentaPadre, DdlTipoComprobante.SelectedValue, factura.Total, NuevaFactura:=NuevaFactura, ObjVentas:=ObjVentas)
|
||||
End If
|
||||
|
||||
Dim EsatusAlmacen As Integer = If(RBLTipoVenta.SelectedValue = "5" AndAlso EsVentaMedica AndAlso DdlTipoComprobante.SelectedValue = "Ped", 1, 0) ', EstatusAlmacen:=EsatusAlmacen
|
||||
Dim EsatusAlmacen As Integer = If(RBLTipoVenta.SelectedValue.Contiene("5", "6") AndAlso EsVentaMedica AndAlso DdlTipoComprobante.SelectedValue = "Ped", 1, 0) ', EstatusAlmacen:=EsatusAlmacen
|
||||
'Se agregan los PS
|
||||
For Each Row As DataRow In TmpDTDetalle.Rows
|
||||
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("CveUM").ToString().ToEntero(),
|
||||
@@ -23977,6 +23977,7 @@ Partial Class Ventas
|
||||
Dim PrecioCompra = ObjPS.GetUltimoPrecioCompra(UsuarioActual.CveEmpresa, GvRow.DataKey("CvePS").ToEntero())
|
||||
If PrecioCompra > 0 Then
|
||||
HdnTotalCompra.Value = (PrecioCompra * GvRow.DataKey("Cantidad").ToDouble() * 1.16).ToString()
|
||||
LblPrecioCompra.Text = $"PU Compra: {(PrecioCompra * 1.16).FormatoNumero(2)}"
|
||||
End If
|
||||
End Using
|
||||
|
||||
@@ -36390,7 +36391,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
Select Case RBLTipoVenta.SelectedValue
|
||||
Case "1", "5" '1 Fuera de linea || 5 Consignación - Uso material
|
||||
Case "1", "5", "6" '1 Fuera de linea || 5 Consignación - Uso material || A-Vista - Material Utilizado
|
||||
ChkRequiereTecnicoModal.Checked = True
|
||||
ChkRequiereTecnicoModal.Enabled = True
|
||||
DvModalRequiereOSFecha.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user