From 39019737293a98aabcaa8d3a0d79ce0f109d2bda Mon Sep 17 00:00:00 2001 From: Ernesto Empty Date: Tue, 7 May 2019 12:16:09 +0000 Subject: [PATCH] Mostrar progreso (NumRegistro/TotalRegistro) en log --- LectorVerdnatura/sdklector.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/LectorVerdnatura/sdklector.cs b/LectorVerdnatura/sdklector.cs index 5540fbd..e6cf0e2 100644 --- a/LectorVerdnatura/sdklector.cs +++ b/LectorVerdnatura/sdklector.cs @@ -73,7 +73,10 @@ namespace LectorVerdnatura if (hayconexion) { retorno = true; - if (ContarRecordsLector() > 0) + int NumRegistro = 0; + int TotalRegistros = ContarRecordsLector(); + + if (TotalRegistros > 0) { db = new database(); @@ -82,8 +85,9 @@ namespace LectorVerdnatura while (clector.SSR_GetGeneralLogData(iddevice, out sdwEnrollNumber, out idwVerifyMode, out idwInOutMode, out idwYear, out idwMonth, out idwDay, out idwHour, out idwMinute, out idwSecond, ref idwWorkcode)) { + NumRegistro++; String FechaRegistro = idwYear.ToString() + "-" + String.Format("{0:0#}", idwMonth) + "-" + String.Format("{0:0#}", idwDay) + " " + String.Format("{0:0#}", idwHour) + ":" + String.Format("{0:0#}", idwMinute) + ":" + String.Format("{0:0#}", idwSecond); - nuevoregistro = "Registro --> NIS=" + sdwEnrollNumber + " --> WH: " + warehouseFk.ToString() + " --> " + FechaRegistro; + nuevoregistro = "Registro (" + NumRegistro + "/" + TotalRegistros + ") -- > NIS=" + sdwEnrollNumber + " --> WH: " + warehouseFk.ToString() + " --> " + FechaRegistro; DateTime fecha = DateTime.Parse(FechaRegistro);