public static string searchArchives(String search) { if (search != "") { List <Fichier> fichiers = new ActionsFichier().rechercheGenerale(search); String s = ""; s += generatebtnRetour(); foreach (var f in fichiers) { if (f.sortFinalComm == 1) { s += CalendrierAdmin.GenerateArchive(f); } } if (s == "") { s = "Aucun Archive trouve"; } return(s); } else { String s = "Veuillez entrer un type a rechercher,un nom ou l'index que vous avez creer"; return(s); } }
public static String getArchives(String idtype) { int type = 0; Int32.TryParse(idtype, out type); String s = ""; List <Fichier> fichiers = new ActionsFichier().listerFichiersArchive(); s += generatebtnRetour(); foreach (var f in fichiers) { if (f.idType == type) { s += CalendrierAdmin.GenerateArchive(f); } } return(s); }
public static String getArchives(String date, String typeD, String typeS) { String s = ""; ActionsFichier actionsFichier = new ActionsFichier(); List <Fichier> listF; if (typeS == "1")//tous { listF = actionsFichier.listerFichiersParDate(date); if (typeD == "1")// selon date ajout { foreach (var f in listF) { String dato = f.dateAjout.ToString("yyyy/MM/dd"); if (dato == date) { if (f.sortFinalComm == 0) { s += CalendrierAdmin.GenerateArchive(f); } } } } else if (typeD == "2") { foreach (var f in listF) { String dato = f.dateDernierAcces.ToString("yyyy/MM/dd"); if (dato == date) { if (f.sortFinalComm == 0) { s += CalendrierAdmin.GenerateArchive(f); } } } } else if (typeD == "3") { foreach (var f in listF) { String dato = f.dateModification.ToString("yyyy/MM/dd"); if (dato == date) { if (f.sortFinalComm == 0) { s += CalendrierAdmin.GenerateArchive(f); } } } } else if (typeD == "4") { foreach (var f in listF) { if (f.dateSuppression.ToString() == date) { if (f.sortFinalComm == 0) { s += CalendrierAdmin.GenerateArchive(f); } } } } return(s); } if (s == "") { s = "<h1>rien trouve</h1>"; } return(s); }