Exemple #1
0
        public GrilleDepartTO getTransfertObject(long id)
        {
            StreamReader sr = new StreamReader(this.cheminRepertoire + @"\" + id + ".json", Encoding.Default);

            string         json         = sr.ReadToEnd();
            GrilleDepartTO GrilleDepart = JsonConvert.DeserializeObject <GrilleDepartTO>(json);

            sr.Dispose();

            return(GrilleDepart);
        }
Exemple #2
0
        public List <GrilleDepartTO> getAllTransfertObject()
        {
            List <GrilleDepartTO> GrilleDeparts = new List <GrilleDepartTO>();

            string[] fichiers = Directory.GetFiles(this.cheminRepertoire);

            StreamReader sr;
            string       json;

            foreach (string f in fichiers)
            {
                sr   = new StreamReader(f, Encoding.Default);
                json = sr.ReadToEnd();

                GrilleDepartTO GrilleDepart = JsonConvert.DeserializeObject <GrilleDepartTO>(json);
                GrilleDeparts.Add(GrilleDepart);

                sr.Dispose();
            }

            return(GrilleDeparts);
        }
Exemple #3
0
 void IDAO <GrilleDepartTO> .updateTransfertObject(GrilleDepartTO to)
 {
     throw new NotImplementedException();
 }