コード例 #1
0
ファイル: RapportTrace.cs プロジェクト: paulkornikov/Pragonas
 public RapportTrace(TraceLog trace)
 {
     Id = trace.Id;
     Type = trace.Type;
     Libelle = trace.Libelle;
     DateCreation = trace.DateCreation;
     Rapport = trace.Rapport;
     Resultat = trace.Resultat;
 }
コード例 #2
0
        // WriteRapport
        public string WriteRapport(TraceLog _trace)
        {
            // Trace
            trace = _trace;

            // Writer
            ITraceRapportWriter _writer;

            // Init
            switch (trace.Type)
            {
                case "AnnulationImputation":
                    _writer = new WriterRapportAnnulationImputation(uow, groupeId, trace.Resultat, trace.Rapport);
                    break;

                case "Archivage":
                    _writer = new WriterRapportArchivage(uow, groupeId, trace.Resultat, trace.Rapport);
                    break;

                case "Chargement":
                    _writer = new WriterRapportChargement(uow, groupeId, trace.Resultat, trace.Rapport);
                    break;

                case "ConversionBatchEcheance":
                    _writer = new WriterRapportConversionBatchEcheance(uow, groupeId, trace.Resultat, trace.Rapport);
                    break;

                case "ProlongationBudget":
                    _writer = new WriterRapportProlongationBudget(uow, groupeId, trace.Resultat, trace.Rapport);
                    break;

                case "Provision":
                    _writer = new WriterRapportProvision(uow, groupeId, trace.Resultat, trace.Rapport);
                    break;

                case "Rapprochement":
                    _writer = new WriterRapportRapprochement(uow, groupeId, trace.Resultat, trace.Rapport);
                    break;

                default:
                    _writer = new WriterRapportAnnulationImputation(uow, groupeId, trace.Resultat, trace.Rapport);
                    break;
            }

            // Ecriture du rapport
            return _writer.WriteRapport();
        }