public static void addVersion(tblVersion v) { db.tblVersion.Add(v); try { db.SaveChanges(); } catch (Exception e) { Console.WriteLine(e); } }
public version(tblVersion v) { idJeu = v.IdJeu; codeVersion = v.CodeVersion; nomVersion = v.NomVersion; stadeVersion = v.StadeDeveloppement; descVersion = v.DescVersion; dateVersion = v.DateVersion; if (v.DateSortiePrevue != null) { dateSortie = (DateTime)v.DateSortiePrevue; } else { dateSortie = DateTime.Now; } }
public void enregistrer(string te,version v) { tblVersion VersionAjout; if (te == "m") { RequeteSql.setVersion(v); } if (te == "a") { VersionAjout = new tblVersion(); VersionAjout.CodeVersion = v.codeVersion; VersionAjout.DateSortiePrevue = v.dateSortie; VersionAjout.DateVersion = v.dateVersion; VersionAjout.DescVersion = v.descVersion; VersionAjout.IdJeu = v.idJeu; VersionAjout.NomVersion = v.nomVersion; VersionAjout.StadeDeveloppement = v.stadeVersion; RequeteSql.addVersion(VersionAjout); } }
public static void addVersion(tblVersion v) { var db = new dbProjetE2ProdEntities(); db.tblVersion.Add(v); try { db.SaveChanges(); } catch (Exception e) { Console.WriteLine(e); } }