- carga de excel del detalle
This commit is contained in:
@@ -1137,8 +1137,7 @@
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-2" style="text-align: left">
|
||||
|
||||
<asp:LinkButton ID="LbDescargarExcelConceptos" runat="server" CssClass="btn btn-warning" Text="Descargar Plantilla" />
|
||||
<asp:LinkButton ID="LbDescargarExcelConceptos" OnClick="LbDescargarExcelConceptos_Click" runat="server" CssClass="btn btn-warning" Text="Descargar Plantilla" />
|
||||
|
||||
</div>
|
||||
<div class="col-md-10" style="text-align: center">
|
||||
|
||||
@@ -4934,6 +4934,41 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LbDescargarExcelConceptos_Click(sender As Object, e As EventArgs)
|
||||
DescargarFormato()
|
||||
End Sub
|
||||
|
||||
Public Sub DescargarFormato()
|
||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoRecepcionAlmacen.xlsx"
|
||||
Dim dtt As New DataTable
|
||||
dtt = DtInv.Copy()
|
||||
dtt.Columns.Remove("Cantidad")
|
||||
dtt.Columns("CantidadF").ColumnName = "Cantidad"
|
||||
dtt.Columns("PS").ColumnName = "Producto"
|
||||
dtt.Columns("Codigo").ColumnName = "Código"
|
||||
|
||||
Dim existingcol As New List(Of String) '= {"Cantidad", "Producto", "Código"}
|
||||
|
||||
For Each col As DataColumn In dtt.Columns
|
||||
If Not col.ColumnName.Contiene("Cantidad", "Producto", "Código") Then
|
||||
existingcol.Add(col.ColumnName)
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each colName As String In existingcol
|
||||
dtt.Columns.Remove(colName)
|
||||
Next
|
||||
|
||||
dtt.Columns("Cantidad").SetOrdinal(0)
|
||||
dtt.Columns("Código").SetOrdinal(1)
|
||||
dtt.Columns("Producto").SetOrdinal(2)
|
||||
|
||||
dtt.Columns.Add("Serie", GetType(String))
|
||||
dtt.ExportToExcel("FormatoRecepcionAlmacen.xlsx")
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
'Protected Sub BtnGuardarDocumento_Click(sender As Object, e As EventArgs)
|
||||
@@ -5041,4 +5076,5 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user