This commit is contained in:
AbrahamCastilloV
2024-02-17 16:44:50 -07:00
parent 753812f2c4
commit 8562cd0cb4
6 changed files with 614 additions and 575 deletions

View File

@@ -42,11 +42,12 @@ Partial Class RepContratosCalendario
End Sub
Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos
' GvContratos.HeaderStyle.ForeColor = Drawing.Color.Black
Dim CveCliente As Integer = DdlClientesFiltro.SelectedValue.ToEntero
'EL fondo de las líneas es blanco, por eso cambio el color a negro de la cabecera
GvContratos.HeaderStyle.ForeColor = Drawing.Color.Black
Dim CveCliente As Integer = DdlCliente.SelectedValue.ToEntero
If CveCliente = 0 Then CveCliente = -1
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientesFiltro.SelectedValue.ToEntero, CveEstatus:=DdlEstatusConsulta.SelectedValue.ToEntero, CveTipoContrato:=34) Then
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, CveEstatus:=DdlEstatusConsulta.SelectedValue.ToEntero, CveTipoContrato:=34) Then
GvContratos.DataSource = ObjContratos.DtResultados
GvContratos.DataBind()
End If
@@ -101,7 +102,7 @@ Partial Class RepContratosCalendario
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
'CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
End Sub
@@ -142,6 +143,7 @@ Partial Class RepContratosCalendario
TxtUbicacion.Text = GvRow.DataKey("Ubicacion")
TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy hh:mm tt")
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy hh:mm tt")
TxtMoneda.Text = GvRow.DataKey("CveMoneda")
'Requeridos
ViewState("Contrato") = GvRow.DataKey("CveContrato")
DdlAF.SelectedValue = GvRow.DataKey("CveAF")
@@ -153,7 +155,9 @@ Partial Class RepContratosCalendario
RegistraScript("$('#ModalActualizar').modal('show');")
End Sub
Protected Sub Consultar(sender As Object, e As EventArgs)
End Sub
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
GvContratos.ExportToExcel("ReporteCompras" & NowADS().ToShortDateString)
End Sub