recuperar bitácora
This commit is contained in:
@@ -63,6 +63,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="LnkCargarExcel" runat="server" NavigateUrl="#" data-toggle="modal" data-target="#DivCargaExcelConceptos" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color: #686868;"></i> Cargar Conceptos</asp:HyperLink>
|
<asp:HyperLink ID="LnkCargarExcel" runat="server" NavigateUrl="#" data-toggle="modal" data-target="#DivCargaExcelConceptos" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color: #686868;"></i> Cargar Conceptos</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:Linkbutton ID="HplCargaBitacora" runat="server" OnClick="HplCargaBitacora_Click" Style="color: #686868;"><i class="fa fa-file-load-o" style="color: #686868;"></i> Cargar Bitácora</asp:Linkbutton>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
|||||||
@@ -159,6 +159,15 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
ViewState("FolioBusqueda") = value
|
ViewState("FolioBusqueda") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -173,6 +182,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
RVFechaRecepcion.MaximumValue = Now.ToShortDateString
|
RVFechaRecepcion.MaximumValue = Now.ToShortDateString
|
||||||
Folio = 0
|
Folio = 0
|
||||||
CveMovimientoTimbrado = -1
|
CveMovimientoTimbrado = -1
|
||||||
|
ArchivoBitacora = UsuarioActual.Empresa.Ruta & "Temp\Traspaso_" & UsuarioActual.CveUsuario & ".xml"
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
divGastoIndirecto.Visible = False
|
divGastoIndirecto.Visible = False
|
||||||
@@ -287,6 +297,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
dt.Columns.Add("Embalaje")
|
dt.Columns.Add("Embalaje")
|
||||||
dt.Columns.Add("PesoKg", Type.GetType("System.Decimal"))
|
dt.Columns.Add("PesoKg", Type.GetType("System.Decimal"))
|
||||||
|
|
||||||
|
dt.TableName = "TablaTraspaso"
|
||||||
|
|
||||||
DtMovimientos = dt
|
DtMovimientos = dt
|
||||||
|
|
||||||
@@ -701,10 +712,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
DtMovimientos.Rows.Add(registro)
|
DtMovimientos.Rows.Add(registro)
|
||||||
RegistraScript("playsonidito('beep-07.wav')")
|
RegistraScript("playsonidito('beep-07.wav')")
|
||||||
|
IO.Path.GetDirectoryName(ArchivoBitacora).DirectoryExistsCreate 'verifica que exista la ruta
|
||||||
|
ActualizaBitacora()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
CargaGvDatos()
|
CargaGvDatos()
|
||||||
|
|
||||||
If Limpia Then
|
If Limpia Then
|
||||||
@@ -715,6 +726,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
TxtnSerie.Focus()
|
TxtnSerie.Focus()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub ActualizaBitacora(Optional Eliminar As Boolean = False)
|
||||||
|
If Not Eliminar Then
|
||||||
|
DtMovimientos.WriteXml(ArchivoBitacora, XmlWriteMode.WriteSchema)
|
||||||
|
Else
|
||||||
|
File.Delete(ArchivoBitacora)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub LimpiaAgregar()
|
Private Sub LimpiaAgregar()
|
||||||
'DdlClasificacion.SelectedValue = "-1"
|
'DdlClasificacion.SelectedValue = "-1"
|
||||||
@@ -1355,8 +1374,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
ChkTransitorio.Enabled = True
|
ChkTransitorio.Enabled = True
|
||||||
TxtGastoIndirecto.Text = ""
|
TxtGastoIndirecto.Text = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DivMov.Visible = False
|
DivMov.Visible = False
|
||||||
CargadoDeMov = False
|
CargadoDeMov = False
|
||||||
|
|
||||||
@@ -1364,6 +1381,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
UpMov.Update()
|
UpMov.Update()
|
||||||
|
|
||||||
DtMovimientos.Rows.Clear()
|
DtMovimientos.Rows.Clear()
|
||||||
|
ActualizaBitacora()
|
||||||
CargaGvDatos()
|
CargaGvDatos()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
@@ -1477,9 +1495,12 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||||
|
|
||||||
GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||||
|
TdSerie.Visible = GvDatos.Columns(5).Visible : ThSerie.Visible = GvDatos.Columns(5).Visible
|
||||||
GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||||
|
TdLote.Visible = GvDatos.Columns(6).Visible : ThLote.Visible = GvDatos.Columns(6).Visible
|
||||||
GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||||
GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||||
|
TdFechaCaducidad.Visible = GvDatos.Columns(7).Visible : ThFechaCaducidad.Visible = GvDatos.Columns(7).Visible
|
||||||
GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||||
|
|
||||||
''TxtnSerie.Visible = False
|
''TxtnSerie.Visible = False
|
||||||
@@ -1581,6 +1602,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
DbRow = DtMovimientos.Rows(e.RowIndex)
|
DbRow = DtMovimientos.Rows(e.RowIndex)
|
||||||
|
|
||||||
DtMovimientos.Rows.Remove(DbRow)
|
DtMovimientos.Rows.Remove(DbRow)
|
||||||
|
ActualizaBitacora()
|
||||||
CargaGvDatos()
|
CargaGvDatos()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -3057,6 +3079,17 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub HplCargaBitacora_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
If IO.File.Exists(ArchivoBitacora) Then
|
||||||
|
DtMovimientos.ReadXml(ArchivoBitacora)
|
||||||
|
CargaGvDatos()
|
||||||
|
Alert("Registro(s) Recuperados", TipoMensaje.ToastInformacion)
|
||||||
|
Else
|
||||||
|
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user