VyA asignar uno o dos choferes

This commit is contained in:
rakcsle
2024-07-30 10:07:02 -07:00
parent 12d31c5e3c
commit 9dcc6683aa
7 changed files with 210 additions and 24 deletions

View File

@@ -202,10 +202,22 @@ Partial Class RepContratosCalendario
End Sub
Private Sub OnRowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim BackgroundColor As String = DataBinder.Eval(e.Row.DataItem, "BackgroundColor").ToString()
If e.Row.RowType = DataControlRowType.DataRow Then
Dim BackgroundColor As String = DataBinder.Eval(e.Row.DataItem, "BackgroundColor").ToString()
e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BackgroundColor)
e.Row.Cells(1).Attributes.Add("data-order", e.Row.DBCampo("FechaInicial").ToDate.Ticks.ToString)
Dim BGC_Atencion As String = "#bc9b1b"
Dim TipoEstatus As Integer = e.Row.DataKey("TipoEstatus").ToEntero
If TipoEstatus <> 4 AndAlso TipoEstatus <> 3 Then
If e.Row.DataKey("CveChofer").ToEntero <= 0 Or (e.Row.DataKey("CveChofer2").ToEntero <= 0 And e.Row.DataKey("NumChoferes").ToEntero = 2) Or e.Row.DataKey("CveAF").ToEntero <= 0 Then
e.Row.BackColor = Drawing.ColorTranslator.FromHtml(BGC_Atencion)
End If
End If
End If
End Sub
@@ -289,10 +301,22 @@ Partial Class RepContratosCalendario
DdlTipoAF.SelectedValueExist(GvRow.DataKey("CveTipoAF"))
DdlTipoAF_SelectedIndexChanged(Nothing, Nothing)
DdlAF.SelectedValueExist(GvRow.DataKey("CveAF"))
CveContrato = GvRow.DataKey("CveContrato").ToEntero
DdlAF.SelectedValueExist(GvRow.DataKey("CveAF"))
HypRemision.Text = GvRow.DataKey("RemisionSerieFolio")
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={GvRow.DataKey("CveVentaRemision")}"
If GvRow.DataKey("RemisionSaldo").ToDecimal > 0 Then
LblSaldo.Text = $"Saldo {GvRow.DataKey("RemisionSaldo").ToDecimal.ToString("###,###,###.00")}"
Else
LblSaldo.Text = ""
End If
CveContrato = GvRow.DataKey("CveContrato").ToEntero
OcultarMostrarSegundoChofer()
UpCommando.Update()
@@ -316,6 +340,19 @@ Partial Class RepContratosCalendario
OcultarMostrarSegundoChofer()
HypRemision.Text = HidRemisionSerieFolio.Value
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={HidCveVentaRemision.Value}"
If HidRemisionSaldo.Value.ToDecimal > 0 Then
LblSaldo.Text = $"Saldo {HidRemisionSaldo.Value.ToDecimal.ToString("###,###,###.00")}"
Else
LblSaldo.Text = ""
End If
UpModal.Update()
RegistraScript("$('#ModalActualizar').modal('show');")