mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-17 18:26:11 +00:00
- VERSION 4.11.20
- Se modificó el codigo de carga local (proyecto recuperacion) para que por default restaure el respaldo del día ANTERIOR
This commit is contained in:
@@ -193,20 +193,21 @@ End Sub
|
||||
'RD - Copia la tabla CAT_GUNAPROD de rkmt.db al celular.
|
||||
Sub RD_restaura_cat_gunaprod
|
||||
Private inicio As String = DateTime.Now
|
||||
' Log("Restaurando CAT_GUNAPROD ...")
|
||||
' Log($"FECHA RESTAURACION: ${RD_fechaRestauracion}"$)
|
||||
Log("Restaurando CAT_GUNAPROD ...")
|
||||
Log($"FECHA RESTAURACION: ${RD_fechaRestauracion}"$)
|
||||
fechaRestauracion = RD_fechaRestauracionSQL(RD_fechaRestauracion)
|
||||
Private lasCols As String = getTableColumnListName(rkmt, "CAT_GUNAPROD")
|
||||
Log(">>>>>>>> fechaRestauracion GP: " & fechaRestauracion)
|
||||
lasCols = lasCols.Replace(", FECHA", "") 'Quitamos la imagen del respaldo.
|
||||
Private c As Cursor = rkmt.ExecQuery($"select distinct fecha from CAT_GUNAPROD ${fechaRestauracion} order by fecha desc"$) ' where fecha <> '${fechaHoy}' 'Traemos la ultima fecha antes de hoy.
|
||||
' Log(c.RowCount)
|
||||
Log($"select distinct fecha from CAT_GUNAPROD ${fechaRestauracion} order by fecha desc"$)
|
||||
Log(c.RowCount)
|
||||
If c.RowCount > 0 Then
|
||||
c.Position = 0
|
||||
' Log(c.GetString("FECHA"))
|
||||
skmt.ExecNonQuery("delete from CAT_GUNAPROD")
|
||||
skmt.ExecNonQuery($"insert into CAT_GUNAPROD (${lasCols}) select ${lasCols} from rkmt1.CAT_GUNAPROD where fecha = '${c.GetString("FECHA")}'"$)
|
||||
' Log($"insert into CAT_GUNAPROD (${lasCols}) select ${lasCols} from rkmt1.CAT_GUNAPROD where fecha = '${c.GetString("FECHA")}'"$)
|
||||
Log($"insert into CAT_GUNAPROD (${lasCols}) select ${lasCols} from rkmt1.CAT_GUNAPROD where fecha = '${c.GetString("FECHA")}'"$)
|
||||
Else
|
||||
If fechaRestauracion.Length > 0 Then
|
||||
ToastMessageShow($"No hay respaldo GP para la fecha ${fechaRestauracion.SubString(fechaRestauracion.Length - 10)}"$, True)
|
||||
@@ -467,7 +468,7 @@ Sub RD_restaura_promos_comp
|
||||
End If
|
||||
End If
|
||||
c.Close
|
||||
Log("R-KMT: " & ((DateTime.Now - inicio)/1000) & " segs")
|
||||
Log("R-PC: " & ((DateTime.Now - inicio)/1000) & " segs")
|
||||
End Sub
|
||||
|
||||
'RD - Copia la tabla cat_rmi a rkmt.db en la tarjeta del celular.
|
||||
|
||||
Reference in New Issue
Block a user