Example #1
0
        public static List <MStatement> GetAllByCaptorId(projet4Entities ctx, int captorId)
        {
            List <MStatement> ls = new List <MStatement>();
            List <statement>  l  = ctx.statement.Where(st => st.captorId == captorId).ToList();

            foreach (statement s in l)
            {
                MStatement ms = new MStatement();
                ms.LoadFromDao(s);
                ls.Add(ms);
            }

            return(ls);
        }
Example #2
0
        // get by date //rajouter by id
        public static List <MStatement> GetByDate(projet4Entities ctx, int id, DateTime debut, DateTime fin)
        {
            List <MStatement> ls = new List <MStatement>();
            List <statement>  l  = ctx.statement.Where(s => s.captorId == id && s.dateTime >= debut && s.dateTime <= fin).ToList();

            foreach (statement s in l)
            {
                MStatement ms = new MStatement();
                ms.LoadFromDao(s);
                ls.Add(ms);
            }

            return(ls);
        }
Example #3
0
        public static List <MStatement> GetAll(projet4Entities ctx)
        {
            List <MStatement> ls = new List <MStatement>();
            List <statement>  l  = ctx.statement.ToList();

            foreach (statement s in l)
            {
                MStatement ms = new MStatement();
                ms.LoadFromDao(s);
                ls.Add(ms);
            }

            return(ls);
        }