diff --git a/Transportes/RepContratos.aspx b/Transportes/RepContratos.aspx index 5c7abfa40..339d007a1 100644 --- a/Transportes/RepContratos.aspx +++ b/Transportes/RepContratos.aspx @@ -75,44 +75,20 @@
-
-
-
- - - - -
- - - -
-
+ + +
- -
-
- - - - -
- - - -
+ + + +
@@ -129,17 +105,7 @@ - - - - - - -
@@ -154,14 +120,14 @@ + data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, CveContratosEstatus, CveAF"> - + Fecha
@@ -177,19 +143,19 @@
+ + - - Fecha
@@ -202,19 +168,9 @@ - - - - - - - - + +
@@ -306,14 +262,15 @@
- - - - + + + +
@@ -357,7 +314,8 @@
- + @@ -383,17 +341,6 @@
- -
- Estatus: -
- - - -
-
@@ -161,7 +153,7 @@ + data-sort="true" DataKeyNames="CveContrato, DescripcionContrato, Ubicacion, FechaInicial, FechaFinal, CveCliente, CveTipoAF, Importe, ImporteMin, ImporteMax,CveChofer, Observaciones, CveAF"> @@ -212,7 +204,8 @@ - + + @@ -370,7 +363,8 @@ Estatus:
diff --git a/Transportes/RepContratosCalendario.aspx.vb b/Transportes/RepContratosCalendario.aspx.vb index d5480858d..c01c47982 100644 --- a/Transportes/RepContratosCalendario.aspx.vb +++ b/Transportes/RepContratosCalendario.aspx.vb @@ -11,8 +11,8 @@ Partial Class RepContratosCalendario #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") - txtFechaF.Text = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T") + txtFechaI.Text = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd").Replace(" ", "T") + txtFechaF.Text = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd").Replace(" ", "T") If Not IsPostBack Then CargaCombos() @@ -29,10 +29,21 @@ Partial Class RepContratosCalendario Dim ObjContratos As New ClsContratos If ObjContratos.GetContratos(-1, UsuarioActual.CveEmpresa, TipoContrato:=2) Then GvContratos.DataSource = ObjContratos.DtResultados + GvContratos.DataBind() End If - ObjContratos.Dispose() - GvContratos.DataBind() + If ObjContratos.GetContratosEstatus(UsuarioActual.CveEmpresa) Then + DdlEstatusConsulta.DataSource = ObjContratos.DtResultados + DdlEstatusConsulta.DataBind() + DdlEstatusConsulta.Items.Insert(0, New ListItem("-", "")) + + DdlEstatusContrato.DataSource = ObjContratos.DtResultados + DdlEstatusContrato.DataBind() + DdlEstatusContrato.Items.Insert(0, New ListItem("-", "")) + + End If + + ObjContratos.Dispose() End Sub Private Sub InicializaCalendar() @@ -56,22 +67,12 @@ Partial Class RepContratosCalendario DdlChofer.DataBind() DdlChofer.Items.Insert(0, New ListItem("-", "")) - 'Lista de Estatus - 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 + Dim BackgroundColor As String = DataBinder.Eval(e.Row.DataItem, "BackgroundColor").ToString() + e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BackgroundColor) End If End Sub Protected Sub MostrarModal(sender As Object, e As System.EventArgs)