Ahora siempre muestra en log la hora del terminal

Recortada descripcion al ya existir registro en BDD
This commit is contained in:
Ernesto Abarca Ortiz 2019-04-15 16:37:56 +02:00
parent c6147efbb6
commit 9076f107ee
3 changed files with 10 additions and 2 deletions

View File

@ -269,6 +269,7 @@ namespace LectorVerdnatura
this.Name = "frmPrincipal";
this.Text = "Lector Verdnatura";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmPrincipal_FormClosing);
this.Load += new System.EventHandler(this.frmPrincipal_Load);
this.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.frmPrincipal_MouseDoubleClick);
this.Resize += new System.EventHandler(this.frmPrincipal_Resize);
this.contextMenuStrip1.ResumeLayout(false);

View File

@ -298,5 +298,10 @@ namespace LectorVerdnatura
txtMaxRegistros.Text = "300";
}
}
private void frmPrincipal_Load(object sender, EventArgs e)
{
}
}//lector
}//namespace

View File

@ -110,7 +110,7 @@ namespace LectorVerdnatura
// Ignoramos el error, la base de datos esta preparada para esto y nos permite verificar cuando NO borramos el log del
// fichador si un registro antiguo ya ha sido insertado en la BDD o no.
// logevent.logeventwritefile("Error SQL 2601: Registro con clave duplicada. Ignorando!. SQL: " + SqlInsert);
nuevoregistro += " Nota: Error SQL 2601: registro ya existe en la BDD. (Normal si no vaciamos el fichador). Ignorando...";
nuevoregistro += " Registro ya existe en la BDD. Ignorando...";
}
catch (Exception ex)
{
@ -150,7 +150,7 @@ namespace LectorVerdnatura
if (clector.ClearGLog(iddevice))
{
clector.RefreshData(iddevice);//se borrar los logs
clector.RefreshData(iddevice); //se borran los logs
logevent.logeventwritefile("Logs borrados del terminal " + Lipaddr);
}
else
@ -203,6 +203,8 @@ namespace LectorVerdnatura
String FechaLector=idwYear.ToString()+"-"+String.Format("{0:00}",idwMonth)+"-"+String.Format("{0:00}",idwDay);
String FechaHoraLector = FechaLector + " " + String.Format("{0:00}", idwHour) + ":" + String.Format("{0:00}", idwMinute);
logevent.logeventwritefile("Comprobando hora del lector --> " + FechaHoraLector + " y del PC --> " + PCFechaHoraActual);
/*
if (PCFechaHoraActual!=FechaHoraLector) {
logevent.logeventwritefile ("Fecha del lector --> "+FechaHoraLector +" y del PC --> "+PCFechaHoraActual + " son distintas. A continuación se sincronizarán");