public static String commArchivage(String idF) { ActionsFichier act = new ActionsFichier(); HangFireUtil hang = new HangFireUtil(act); Fichier f = act.getFichierById(Int32.Parse(idF)); f.commArch = 1; act.modifier(f); f.type = new ActionsType().getTypeById(f.idType); if (f.type.DUAselon == "DateAjout") { f.dateSuppression = f.dateAjout.AddDays(f.type.duree); act.modifier(f); if (f.type.action == "Destruction") { hang.DestructionSelonAjout(f); } else if (f.type.action == "Conservation") { hang.ConservationSelonAjout(f); } } else if (f.type.DUAselon == "DateDernierAcces") { if (f.type.action == "Destruction") { hang.DestructionSelonDernerAcces(f); } else if (f.type.action == "Conservation") { hang.ConservationSelonDernerAcces(f); } } Historique h = new Historique(); h.textHistorique = "les regles de conservation sont applique pour l archive " + f.Nom; h.IdFichier = f.idFichier; h.date = DateTime.Now; new ActionsHistorique().ajouterHistorique(h); if (f.sortFinalComm == 0) { return(RetentionArchives.ArchiveInfoGenerateur(f)); } else if (f.sortFinalComm == 1) { return(RetentionArchives.ArchiveInfoGenerateur(f)); } else { return("verifiez votre connection"); } }
public void AccesAuFichier(Fichier f) { if (f.type.action == "Destruction") { hangFireUtil.DestructionSelonDernerAcces(f); } else if (f.type.action == "Conservation") { hangFireUtil.ConservationSelonDernerAcces(f); } }