Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "IdPublicite,Image,Titre,Description")] Publicite offre)
 {
     if (ModelState.IsValid)
     {
         db.Entry(offre).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("ListePublicitee"));
     }
     return(View(offre));
 }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "IdOffer,Description,DateDebut,DateFin")] Offre offre)
 {
     if (ModelState.IsValid)
     {
         db.Entry(offre).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(offre));
 }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "UserId,login,password")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
 public ActionResult Edit([Bind(Include = "IdNewslettre,IdUser,MailUser,PhoneUser,status")] Newslettre newslettre)
 {
     if (ModelState.IsValid)
     {
         db.Entry(newslettre).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IdUser = new SelectList(db.Users, "IdUser", "Nom", newslettre.IdUser);
     return(View(newslettre));
 }
Ejemplo n.º 5
0
 public virtual void Update(T entity)
 {
     dbset.Attach(entity);
     dataContext.Entry(entity).State = EntityState.Modified;
 }