This commit is contained in:
2023-01-05 08:56:08 -07:00
22 changed files with 352 additions and 329 deletions

View File

@@ -83,15 +83,15 @@ Partial Class OS_RepOrdenesServicios
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(50)
e.Row.Cells(1).Width = Unit.Pixel(200)
e.Row.Cells(2).Width = Unit.Pixel(130)
'e.Row.Cells(3).Width = Unit.Pixel(100)
e.Row.Cells(4).Width = Unit.Pixel(100)
e.Row.Cells(5).Width = Unit.Pixel(100)
'e.Row.Cells(6).Width = Unit.Pixel(100)
End If
'If e.Row.RowIndex = 0 Then
' e.Row.Cells(0).Width = Unit.Pixel(50)
' e.Row.Cells(1).Width = Unit.Pixel(200)
' e.Row.Cells(2).Width = Unit.Pixel(130)
' 'e.Row.Cells(3).Width = Unit.Pixel(100)
' e.Row.Cells(4).Width = Unit.Pixel(100)
' e.Row.Cells(5).Width = Unit.Pixel(100)
' 'e.Row.Cells(6).Width = Unit.Pixel(100)
'End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.FCLiteral("LtlFolio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLiteral("LtlFolio").Text & "</a>"
@@ -102,9 +102,9 @@ Partial Class OS_RepOrdenesServicios
'e.Row.FCLiteral("LtlEstatusOrdenServicio").Text = "<a class=""Texto"" href=""/OS/OrdenesServicios.aspx?CveOS=" & e.Row.DBCampo("CveOS") & """>" & e.Row.FCLiteral("LtlEstatusOrdenServicio").Text & "</a>"
End If
End Sub
Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
GvDatos.ExportToExcel("RepOrdenesServicio_" & Now.ToShortDateString)
End Sub
'Protected Sub ImgExcel_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImgExcel.Click
' GvDatos.ExportToExcel("RepOrdenesServicio_" & Now.ToShortDateString)
'End Sub
#Region "O R D E N A M I E N T O"
Private Sub OrdenaDatos()
@@ -120,4 +120,22 @@ Partial Class OS_RepOrdenesServicios
CargaDatos()
UpDatos.Update()
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
Imprimir("Excel")
End Sub
Private Sub Imprimir(Optional reporte As String = "PDF")
If GvDatos.Rows.Count > 0 Then
Dim StrFiltro As New StringBuilder
If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", txtFechaF.Text)
ExportToExcelG(GvDatos, "OrdenesServicio .xlsx", "Ordenes de Servicio ", UsuarioActual, StrFiltro.ToString, 100, 150)
Else
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
End If
End Sub
End Class