validar exportar excel

This commit is contained in:
2020-03-06 15:22:21 -07:00
parent af784981d6
commit c47e61bd1b
2 changed files with 14 additions and 7 deletions

View File

@@ -247,12 +247,15 @@ Partial Class Inventarios_KardexAlmacen
Imprimir("Excel")
End Sub
Private Sub Imprimir(Optional reporte As String = "PDF")
' Demo()
Dim StrFiltro As New StringBuilder
If DdlProveedor.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat("Proveedor: {0},", DdlProveedor.SelectedText)
If ddlProducto2.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Producto/Servicio: {0},", ddlProducto2.SelectedText)
If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", TxtFechaF.Text)
GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Existencias Almacen", UsuarioActual, StrFiltro.ToString, 100, 200)
If GvDatos.Rows.Count > 0 Then
Dim StrFiltro As New StringBuilder
If DdlProveedor.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat("Proveedor: {0},", DdlProveedor.SelectedText)
If ddlProducto2.SelectedValue.ToEntero > 0 Then StrFiltro.AppendFormat(" Producto/Servicio: {0},", ddlProducto2.SelectedText)
If TxtFechaF.Text <> "" Then StrFiltro.AppendFormat(" Fecha Fin: {0}", TxtFechaF.Text)
GvDatos.ExportToExcelG("ExistenciasHorizontal.xlsx", "Existencias Almacen", UsuarioActual, StrFiltro.ToString, 100, 200)
Else
Alert("Debe consultar para generar un excel", TipoMensaje.MsgAdvertencia)
End If
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
End Sub