コード例 #1
0
 public CV GetTableauBord(long intId)
 {
     using (var db = new Database())
     {
         return db.cvTable.Find(intId);
     }
 }
コード例 #2
0
 public static List<Formation> List(long intId)
 {
     using (var db = new Database())
     {
         return db.formationTable.ToList();
     }
 }
コード例 #3
0
 public static int GetPourcent(long intId)
 {
     using (var db = new Database())
     {
         CV cv = db.cvTable.Find(intId);
         return cv.GetCuvPourcentFormation();
     }
 }
コード例 #4
0
 public void InsertFormation(CV cv)
 {
     using (var db = new Database())
     {
         db.cvTable.Add(cv);
         db.SaveChanges();
     }
     logger.Info("inserting CV :" + cv.ToString());
 }
コード例 #5
0
 public static void Insert(Formation formation)
 {
     using (var db = new Database())
     {
         db.formationTable.Add(formation);
         db.SaveChanges();
     }
     logger.Info("inserting Formation :" + formation.ToString());
 }
コード例 #6
0
 public static void Update(Formation formation)
 {
     using (var db = new Database())
     {
         var f = db.formationTable.Find(formation.frmId);
         if (f == null)
         {
             throw new Exception("No ROW in table FORMATION with given Identifier : " + formation.frmId);
         }
         db.formationTable.Attach(formation);
         db.SaveChanges();
     }
     logger.Info("Updating Formation :" + formation.ToString());
 }