Esempio n. 1
0
        public string Supprimer_dossier(Dossier directory, bool u)
        {
            string         ok = null, nok = null;
            List <Dossier> list = new List <Dossier>();

            if (!u)
            {
                list = directory.GetProprietaire().Getlistdirlist();
            }
            if (u)
            {
                list = directory.GetEmplacement().Getlistofdir();
            }

            ok  = "your directory was deleted  !";
            nok = "you can't !";


            int stop = list.Count;

            if (directory.GetDroitacces().Equals("RW"))
            {
                list.Remove(directory);
                db.deletedirectory(directory.Getid());
                return(ok);
            }
            else
            {
                return(nok + ", you don't have the right ");
            }
        }