diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 50a1a372d..4e6bc3267 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -474,11 +474,11 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState Select Case estatus Case 1 - cevent.backgroundColor = "#45B6AF" + cevent.backgroundColor = "#00A56A" Case 2 - cevent.backgroundColor = "#89C4F4" + cevent.backgroundColor = "#2B4FD6" Case 3 - cevent.backgroundColor = "#F3565D" + cevent.backgroundColor = "#EE602E" End Select diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx index d0e466fec..3fed8c7ef 100644 --- a/Transportes/RepContratos.aspx +++ b/Transportes/RepContratos.aspx @@ -33,7 +33,7 @@ .consulta { padding: 1rem 2rem; - background-color: #2C3E50; + background-color: #95A5A6; display: flex; justify-content: space-around; align-items: center; @@ -71,15 +71,6 @@ - - <%--
- " - style="display: inline-block; margin-right: -10px; width: 150px;" /> - " - style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> - -
--%> -
diff --git a/Transportes/RepContratosCalendario.aspx b/Transportes/RepContratosCalendario.aspx index a09dd79df..f0efcab04 100644 --- a/Transportes/RepContratosCalendario.aspx +++ b/Transportes/RepContratosCalendario.aspx @@ -14,6 +14,37 @@ .my-1 { margin-block: 1rem; } + + .consulta { + padding: 1rem 2rem; + background-color: #95A5A6; + display: flex; + justify-content: space-around; + align-items: center; + margin-bottom: 1rem; + } + + .consulta_campo { + display: flex; + gap: 1rem; + align-items: center; + width: 100%; + } + + .consulta_campo label { + color: white; + font-weight: bold; + } + + .miGrid { + color: white; + text-align: center; + } + + .miGrid thead { + color: black; + text-align: center; + } @@ -55,70 +86,185 @@ <%--Contratos Tab--%> - - + + +
+
+ + +
- - - - - +
+ +
+ + + + + + + + + +
+
- - - - - +
+ +
+
+
+ + + + +
+ + + + + + + + + +
+
+
- - - - - +
+ +
+
+ + + + +
+ + + + + + + + + +
+
- - - - - + +
+
+
- - - - - + + + + - - - Fecha
- Salida -
- - - -
+ + + + + - - - Fecha
- Regreso -
- - - -
+ + + + + - - - - - + + + + + -
-
+ + + + + + + + + + + + + + + Fecha
+ Salida +
+ + + +
+ + + + Fecha
+ Regreso +
+ + + +
+ + + + + + + + + + + + + + +
+
+
+
diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb index 112fb33dc..035bf17e9 100644 --- a/Transportes/RepContratosCalendario.aspx.vb +++ b/Transportes/RepContratosCalendario.aspx.vb @@ -1,5 +1,6 @@ Option Explicit On Option Strict On +Imports System.Data.SqlClient Imports ADSNetLibrary.SIGAPI.Helpers Imports Extensiones.ModExtensiones @@ -49,11 +50,53 @@ Partial Class RepContratosCalendario DirectCast(Master.FindControl("TSM"), ScriptManager).EnablePageMethods = True End Sub + Private Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Dim estatusContrato As String = DataBinder.Eval(e.Row.DataItem, "EstatusContrato").ToString() + + Select Case estatusContrato + Case "1" + e.Row.BackColor = Drawing.Color.FromArgb(0, 165, 106) + Case "2" + e.Row.BackColor = Drawing.Color.FromArgb(43, 79, 214) + Case "3" + e.Row.BackColor = Drawing.Color.FromArgb(238, 96, 46) + End Select + End If + End Sub Protected Sub MostrarModal(sender As Object, e As System.EventArgs) RegistraScript("$('#ModalActualizar').modal('show');") - End Sub + Protected Sub Consultar(sender As Object, e As EventArgs) + If DdlClientesConsulta.SelectedValue = "" Then + Alert("Debe seleccionar al cliente", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + Dim cliente As Integer = DdlClientesConsulta.SelectedValue.ToEntero + Dim estatus As Integer = DdlEstatusConsulta.SelectedValue.ToEntero + Dim fechaInicial As DateTime = txtFechaI.Text.ToDate + Dim fechaFinal As DateTime = txtFechaF.Text.ToDate + + Dim query As String = "SELECT *, ISNULL(Cli.NombreComercial,'') AS NombreComercial, RH.NombreCompleto AS NombreCompleto FROM Con_Contratos C LEFT JOIN Clientes Cli with(nolock) ON Cli.CveCliente = C.CveCliente LEFT JOIN RH_Personal RH with(nolock) ON C.CveChofer = RH.CvePersonal WHERE C.CveCliente = @Cliente AND EstatusContrato = @Estatus AND FechaInicial BETWEEN @FechaInicial AND @FechaFinal" + + Using connection As New SqlConnection(ConfigurationManager.ConnectionStrings("Conexion").ConnectionString) + Using command As New SqlCommand(query, connection) + command.Parameters.AddWithValue("@Cliente", cliente) + command.Parameters.AddWithValue("@Estatus", estatus) + command.Parameters.AddWithValue("@FechaInicial", fechaInicial) + command.Parameters.AddWithValue("@FechaFinal", fechaFinal) + + connection.Open() + Dim reader As SqlDataReader = command.ExecuteReader() + GvContratos.DataSource = reader + GvContratos.DataBind() + End Using + End Using + + UpTitulos.Update() + End Sub Protected Sub UpdateContrato(sender As Object, e As EventArgs) If DdlClientes.SelectedValue = "" Then @@ -78,8 +121,21 @@ Partial Class RepContratosCalendario ObjContratos.Dispose() CargaDatos() End Try - End Sub + Protected Sub UpdateModal(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + TxtObservaciones.Text = GvRow.DataKey("Observaciones") + TxtDescripcion.Text = GvRow.DataKey("DescripcionContrato") + TxtUbicacion.Text = GvRow.DataKey("Ubicacion") + TxtFechaSalida.Text = GvRow.DataKey("FechaInicial").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") + TxtFechaRegreso.Text = GvRow.DataKey("FechaFinal").ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") + DdlClientes.SelectedValue = GvRow.DataKey("CveCliente") + DdlAF.SelectedValue = GvRow.DataKey("CveAF") + DdlChofer.SelectedValue = GvRow.DataKey("CveChofer") + + UpModal.Update() + RegistraScript("$('#ModalActualizar').modal('show');") + End Sub End Class