Entrega Almacen: Bitácora de carga. Que se guarde en un xml, las series que se vayan registrando, y se puedan recuperar. En acciones, cargar bitácora
This commit is contained in:
@@ -48,6 +48,14 @@
|
|||||||
Entrega Almacén (Surtir Mercancia)
|
Entrega Almacén (Surtir Mercancia)
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="uppCargaBitacora" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="HplCargaBitacora" runat="server" Visible="false" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-file-load-o" style="color: #686868;"></i> Cargar Bitácora</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@@ -268,7 +268,30 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ViewState("FormaPaqueteria") = value
|
ViewState("FormaPaqueteria") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
'Private Property IndexSeccionAlmacen As Integer
|
||||||
|
' Get
|
||||||
|
' Return CType(ViewState("IndexSeccionAlmacen"), Integer)
|
||||||
|
' End Get
|
||||||
|
' Set(value As Integer)
|
||||||
|
' ViewState("IndexSeccionAlmacen") = value
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
Private Property ArchivoBitacora As String
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("ArchivoBitacora"), String)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("ArchivoBitacora") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property ArchivoBitacoraDetalle As String
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("ArchivoBitacoraDetalle"), String)
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("ArchivoBitacoraDetalle") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -318,7 +341,10 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
||||||
DdlAlmacen.SelectedValue = "-1"
|
DdlAlmacen.SelectedValue = "-1"
|
||||||
DdlAlmacen.DataBind()
|
DdlAlmacen.DataBind()
|
||||||
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
If UsuarioActual.CveAlmacen > 0 Then
|
||||||
|
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
|
||||||
|
RecargaporAlmacenes()
|
||||||
|
End If
|
||||||
|
|
||||||
DdlAlmacenTransitorio.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3)
|
DdlAlmacenTransitorio.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3)
|
||||||
DdlAlmacenTransitorio.DataBind()
|
DdlAlmacenTransitorio.DataBind()
|
||||||
@@ -551,6 +577,15 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If ObjInventario.EntregaAlmacenGet(CveVenta, CveAlmacen) Then
|
If ObjInventario.EntregaAlmacenGet(CveVenta, CveAlmacen) Then
|
||||||
If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
||||||
|
ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
||||||
|
If ArchivoBitacora <> "" Then
|
||||||
|
Dim Archivo = New System.IO.FileInfo(ArchivoBitacora)
|
||||||
|
If Archivo.Exists() Then
|
||||||
|
HplCargaBitacora.Visible = True
|
||||||
|
uppCargaBitacora.Update()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
DtDatos = ObjInventario.DtResultados
|
DtDatos = ObjInventario.DtResultados
|
||||||
If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer))
|
If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer))
|
||||||
@@ -1280,6 +1315,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidad.Text, MinFecha.ToShortDateString)
|
Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidad.Text, MinFecha.ToShortDateString)
|
||||||
|
|
||||||
DtDatosDetalle.Rows.Add(Row)
|
DtDatosDetalle.Rows.Add(Row)
|
||||||
|
ActualizaBitacora()
|
||||||
RegistraScript("playsonidito('beep-07.wav')", "Sonidito")
|
RegistraScript("playsonidito('beep-07.wav')", "Sonidito")
|
||||||
|
|
||||||
If Tipo = 1 Then
|
If Tipo = 1 Then
|
||||||
@@ -1307,11 +1343,44 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
DtDatosDetalle.AcceptChanges()
|
DtDatosDetalle.AcceptChanges()
|
||||||
|
ActualizaBitacora()
|
||||||
CargaSerie()
|
CargaSerie()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
#Region "Bitacora"
|
||||||
|
Private Sub ActualizaBitacora(Optional Eliminar As Boolean = False)
|
||||||
|
If Not Eliminar Then
|
||||||
|
DtDatos.TableName = "DtDatos"
|
||||||
|
DtDatosDetalle.TableName = "DtDatosDetalle"
|
||||||
|
DtDatos.WriteXml(ArchivoBitacora, XmlWriteMode.WriteSchema)
|
||||||
|
DtDatosDetalle.WriteXml(ArchivoBitacoraDetalle, XmlWriteMode.WriteSchema)
|
||||||
|
Else
|
||||||
|
File.Delete(ArchivoBitacora)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub HplCargaBitacora_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If IO.File.Exists(ArchivoBitacora) Then
|
||||||
|
'DtInv.Clear()
|
||||||
|
'DtDatosDetalle.Clear()
|
||||||
|
DtDatos.ReadXml(ArchivoBitacora)
|
||||||
|
If IO.File.Exists(ArchivoBitacoraDetalle) Then
|
||||||
|
Dim dtt As New DataTable
|
||||||
|
dtt.ReadXml(ArchivoBitacoraDetalle)
|
||||||
|
DtDatosDetalle = dtt
|
||||||
|
Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion)
|
||||||
|
End If
|
||||||
|
CargaGvDatos()
|
||||||
|
|
||||||
|
Else
|
||||||
|
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
#Region " AGREGA CON LOTE BATCH "
|
#Region " AGREGA CON LOTE BATCH "
|
||||||
|
|
||||||
Private Sub CreaDtDetalleLote()
|
Private Sub CreaDtDetalleLote()
|
||||||
@@ -3894,7 +3963,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
RegistraScript("$('#ModalVerSugerencias').modal('hide')")
|
RegistraScript("$('#ModalVerSugerencias').modal('hide')")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacen.SelectedIndexChanged
|
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) 'Handles DdlAlmacen.SelectedIndexChanged
|
||||||
|
RecargaporAlmacenes()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RecargaporAlmacenes()
|
||||||
If DdlAlmacen.SelectedValue <> "-1" Then
|
If DdlAlmacen.SelectedValue <> "-1" Then
|
||||||
CargaGvDatos(DdlAlmacen.SelectedValue.ToEntero)
|
CargaGvDatos(DdlAlmacen.SelectedValue.ToEntero)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -18,11 +18,13 @@
|
|||||||
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Cargar Excel</asp:HyperLink>
|
<asp:HyperLink ID="HlAgregarExcel" NavigateUrl="#" Visible="true" data-toggle="modal" data-target="#DivCargaExcel" runat="server"><i class='fa fa-server'></i> Cargar Excel</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="uppCargaBitacora" runat="server" UpdateMode="Conditional" RenderMode="Inline"><ContentTemplate>
|
<asp:UpdatePanel ID="uppCargaBitacora" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
<li>
|
<ContentTemplate>
|
||||||
<asp:Linkbutton ID="HplCargaBitacora" runat="server" Visible="false" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-file-load-o" style="color: #686868;"></i> Cargar Bitácora</asp:Linkbutton>
|
<li>
|
||||||
|
<asp:LinkButton ID="HplCargaBitacora" runat="server" Visible="false" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-file-load-o" style="color: #686868;"></i> Cargar Bitácora</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate></asp:UpdatePanel>
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
|||||||
Reference in New Issue
Block a user