// Tracer échec private void TracerEchec(DateTime current) { var traceur = new ChargementTraceur(groupeId); var rapportEchec = traceur.SaveForRapportEchec(current); var traceEchec = traceur.Echec(current, 0, rapportEchec); uow.TraceLog.Add(traceEchec); }
// Tracer Success private void TracerSucces(DateTime current, ICollection<OperationRawSG> _raws) { var traceur = new ChargementTraceur(groupeId); var rapport1 = traceur.SaveForRapportSuccess(current, _raws.AsQueryable<OperationRawSG>()); int nb = _raws.Count(); var trace1 = traceur.Success(current, nb, rapport1); uow.TraceLog.Add(trace1); }
private void TracerChargementsGroupe() { IQueryable<Chargement> chargements = context.Chargement //.Where(o => o.Active == true) // non annulée //.Where(o => o.GroupeId == 2) // Groupe2 .OrderBy(o => o.DateValeur) ; foreach (var chargement in chargements) { var raws = context.OperationRawSG .Where(m => m.ChargementId == chargement.Id) ; // Création de la trace à partir de la provision DateTime dateCreation = chargement.DateValeur; var traceur = new ChargementTraceur(chargement.Compte.GroupeId); var rapport1 = traceur.SaveForRapportSuccess(dateCreation, raws.AsQueryable<OperationRawSG>()); int nb = raws.Count(); var trace = traceur.Success(dateCreation, nb, rapport1); // Ajout au context context.TraceLog.Add(trace); } }