3 XLS Biosistemas
This commit is contained in:
@@ -7568,6 +7568,28 @@ Public Class ClsVentas
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Public Function GetRepVentasBiosistemas(CveEmpresa As Integer, Opcion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasBiosistemasGetRep")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el Reporte de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#Region "IDisposable Support"
|
||||
|
||||
|
||||
|
||||
@@ -101,9 +101,20 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGeneraXLS1" OnClick="LnkGeneraXLS1_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 1</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGeneraXLS2" OnClick="LnkGeneraXLS2_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 2</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" />
|
||||
<asp:PostBackTrigger ControlID="LnkGeneraXLS1" />
|
||||
<asp:PostBackTrigger ControlID="LnkGeneraXLS2" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -153,6 +153,12 @@ Partial Class Ventas_RepVentas
|
||||
PrePersonalizacion()
|
||||
CargaPersonalizacion()
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 199 Then
|
||||
LnkGeneraXLS1.Visible = True
|
||||
LnkGeneraXLS2.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -1058,4 +1064,41 @@ Partial Class Ventas_RepVentas
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkGeneraXLS1_Click(sender As Object, e As EventArgs)
|
||||
RepVentasBioSistemas(1)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkGeneraXLS2_Click(sender As Object, e As EventArgs)
|
||||
RepVentasBioSistemas(2)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub RepVentasBioSistemas(OpcionReporte As Integer)
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
Dim DTResultados As New DataTable
|
||||
|
||||
If ObjVentas.GetRepVentasBiosistemas(UsuarioActual.CveEmpresa, OpcionReporte) Then
|
||||
DTResultados = ObjVentas.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
Dim NombreReporte As String = "Reporte 1"
|
||||
Dim TituloReporte As String = "Reporte 1"
|
||||
DTResultados.TableName = "Reporte1"
|
||||
|
||||
If OpcionReporte = 2 Then
|
||||
NombreReporte = "Reporte 2"
|
||||
TituloReporte = "Reporte1 2"
|
||||
DTResultados.TableName = "Reporte2"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DTResultados.ExportToExcelG(NombreReporte, TituloReporte, UsuarioActual, "")
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user