Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "ServiceID,Nume,Adresa,Coordonate")] Service service)
 {
     if (ModelState.IsValid)
     {
         db.Entry(service).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(service));
 }
 public ActionResult Edit([Bind(Include = "MotorizareID,Nume,ProducatorID")] Motorizare motorizare)
 {
     if (ModelState.IsValid)
     {
         db.Entry(motorizare).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(motorizare));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "ProducatorID,Nume")] Producator producator)
 {
     if (ModelState.IsValid)
     {
         db.Entry(producator).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(producator));
 }
Exemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "RezolvareID,ModeRezolvare,MartorID")] ModRezolvare modrezolvare)
 {
     if (ModelState.IsValid)
     {
         db.Entry(modrezolvare).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MartorID = new SelectList(db.MartoriBords, "MartorID", "Nume", modrezolvare.MartorID);
     return(View(modrezolvare));
 }
Exemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "VehiculID,ModelID,MotorizareID,An")] Vehicul vehicul)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vehicul).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.An           = new SelectList(db.Ans, "AnID", "AnID", vehicul.An);
     ViewBag.ModelID      = new SelectList(db.Models, "ModelID", "Nume", vehicul.ModelID);
     ViewBag.MotorizareID = new SelectList(db.Motorizares, "MotorizareID", "Nume", vehicul.MotorizareID);
     return(View(vehicul));
 }