public CV GetTableauBord(long intId) { using (var db = new Database()) { return db.cvTable.Find(intId); } }
public static List<Formation> List(long intId) { using (var db = new Database()) { return db.formationTable.ToList(); } }
public static int GetPourcent(long intId) { using (var db = new Database()) { CV cv = db.cvTable.Find(intId); return cv.GetCuvPourcentFormation(); } }
public void InsertFormation(CV cv) { using (var db = new Database()) { db.cvTable.Add(cv); db.SaveChanges(); } logger.Info("inserting CV :" + cv.ToString()); }
public static void Insert(Formation formation) { using (var db = new Database()) { db.formationTable.Add(formation); db.SaveChanges(); } logger.Info("inserting Formation :" + formation.ToString()); }
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()); }