Esempio n. 1
0
        protected void ValidateMatch(object sender, EventArgs e)
        {
            db = new ClubFootEntities();
            Matchs m              = new Matchs();
            string date           = datematch.Text;
            string heure          = heurematch.Text;
            string dateHeureMatch = date + " " + heure;

            m.date = Convert.ToDateTime(dateHeureMatch);
            db.Matchs.Add(m); //ajout dans la table Matchs
            db.SaveChanges();
        }
Esempio n. 2
0
        protected void ValidateUser(object sender, EventArgs e)
        {
            db = new ClubFootEntities();
            Users u = new Users();

            u.id_Club     = 1;
            u.id_Statut   = 1;
            u.identifiant = identifiant.Text;
            u.password    = password.Text;
            db.Users.Add(u);
            db.SaveChanges();
        }