private void Procesar_Respuesta_Lote(LoteControlAcceso lote, LoteResponse lote_resp) { txtBitcora.Text += "Resultado lote " + lote.id + ": "; if (lote_resp.resultado.ToUpper() == "OK") { txtBitcora.Text += "Todos los registros del lote fueron informados correctamente." + System.Environment.NewLine; } else { txtBitcora.Text += "Se produjo un error en el procesamiento remoto (" + lote_resp.resultado + ")." + System.Environment.NewLine; } this.Refresh(); return; }
private bool Marcar_Registros_Informados(LoteControlAcceso lote, LoteResponse lote_resp) { var error = false; foreach (var reg in lote.registros) { try { if (!reg.Marcar_Como_Informado()) { throw new Exception(); } } catch { error = true; txtBitcora.Text += "* Error al grabar el registro " + reg.id.ToString() + " del lote " + lote.id + " no pudo ser marcado como informado." + System.Environment.NewLine; this.Refresh(); } } return(error); }