public List <Dossier> Searchuser(string nom, Utulisateur user) { List <Dossier> ds = new List <Dossier>(); string nom2 = nom; int i = 0; if (user.Getlistdossier() != null) { int p = user.Getlistdossier().Length; while (i < p) { if (user.Getlistdossier()[i].GetNom().Equals(nom)) { ds.Add(user.Getlistdossier()[i]); } //ds = Searchussersdirectory(nom2, user.Getlistdossier()[i], user,ds); i++; } return(ds); } else { return(ds); } }
public Dossier getthefolder(string name, Utulisateur user) { Dossier[] list = user.Getlistdossier(); int i = 0; int stop = list.Length - 1; while (i < stop) { Dossier d = list[i]; string nom; while ((d != null) && (i < stop)) { nom = d.GetNom().Trim(); if (nom.Equals(name)) { return(d); } else { i++; } } return(null); } return(null); }
public void Chargerlesdossierdsd(Utulisateur u) { int stop = u.Getlistdossier().Length - 1; int i = 0; if (stop == 0) { return; } else { while (stop > i) { chargerdossierdsd(u, u.Getlistdossier()[i]); i++; } } }
public void chargerlesfichier(Utulisateur user) { int stop = user.Getlistdossier().Length - 1; int i = 0; if (stop == 0) { return; } else { while (stop > i) { Chargerlesfichierdsd(user, user.Getlistdossier()[i]); i++; } } }
public Dossier Creation_dossier(string name, DateTime d, Utulisateur user, int id) { if (Exists(name, user.Getlistdossier())) { return(null); } else { db.Insertdirectory(name, user.GetNom(), "RW", d, 0); Dossier newdirectory = new Dossier(name, d, user, null, db.lastindex()); user.AddtlistDossier(newdirectory); return(newdirectory); } }
public bool Exists(Utulisateur user, string name) { Dossier[] list = user.Getlistdossier(); int i = 0; int stop = list.Length; stop--; while (i <= stop) { while ((list[i] != null)) { if (list[i].GetNom().Equals(name)) { return(true); } i++; break; } } return(false); }
public void Showmyinfos(Utulisateur user) { int i = 0; int stop = Getlistdossier().Length; stop--; while (i <= stop) { while (user.Getlistdossier()[i] != null) { Console.WriteLine(i + 1 + "-" + user.Getlistdossier()[i].GetNom() + "-" + user.Getlistdossier()[i].GetProprietaire().GetNom() + "-" + user.Getlistdossier()[i].GetDroitacces() + "-" + user.Getlistdossier()[i].GetTaille() + "-" + user.Getlistdossier()[i].GetDatecreation()); i++; break; } } return; }