示例#1
0
文件: Program.cs 项目: benesy/projet4
        static void Main(string[] args)
        {
            ClearDb();

            projet4Entities ctx = new projet4Entities();
            MCaptor         mc  = new MCaptor();

            mc.Serial_number = "482";
            mc.Localisation  = "ici";
            mc.Description   = "plop";
            captor cpt = mc.ConvertToDao();

            ctx.captor.Add(cpt);
            ctx.SaveChanges();
            Console.WriteLine("capteur : id {0} ajouté !", cpt.captorId);
            Console.ReadLine();
        }
示例#2
0
文件: Manager.cs 项目: benesy/projet4
 public List <MStatement> GetAllStatement(MCaptor c)
 {
     return(MStatement.GetAllByCaptorId(ctx, c.CaptorId));
 }
示例#3
0
文件: Manager.cs 项目: benesy/projet4
 public List <MStatement> GetAllStatementByDate(MCaptor c, DateTime start, DateTime end)
 {
     return(MStatement.GetByDate(ctx, c.CaptorId, start, end));
 }
示例#4
0
文件: Manager.cs 项目: benesy/projet4
 public List <MCaptor> GetCaptorList()
 {
     return(MCaptor.GetAll(ctx));
 }