コード例 #1
0
 public ActionResult Edit([Bind(Include = "CodeP,NomP")] Projet projet)
 {
     if (ModelState.IsValid)
     {
         db.Entry(projet).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(projet));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "UserID,UserName,UserEmail,UserPassowrd,UserAddress,UserBalance,UserType")] UserInfo userInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(userInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(userInfo));
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "Code,ItemName,ItemDescription,ItemPrice,Department,logo")] Item item)
 {
     if (ModelState.IsValid)
     {
         db.Entry(item).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(item));
 }
コード例 #4
0
 public ActionResult Edit([Bind(Include = "NumDep,NomDep,Lieu")] Departement departement)
 {
     if (ModelState.IsValid)
     {
         db.Entry(departement).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(departement));
 }
コード例 #5
0
 public ActionResult Edit([Bind(Include = "Id,UserId,FromAccount,ToAccount,Amount,Date,Recipient")] Transaction transaction)
 {
     if (ModelState.IsValid)
     {
         db.Entry(transaction).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(transaction));
 }
コード例 #6
0
 public ActionResult Edit([Bind(Include = "Matr,NomE,Post,DateEmb,Sup,Salaire,Comm,NumDep")] Employe employe)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employe).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.NumDep = new SelectList(db.Departements, "NumDep", "NomDep", employe.NumDep);
     return(View(employe));
 }
コード例 #7
0
 public ActionResult Edit([Bind(Include = "Cedula,SiglaExam,Descripcion")] Aplica_Transacciones aplica_Transacciones)
 {
     if (ModelState.IsValid)
     {
         db.Entry(aplica_Transacciones).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Cedula    = new SelectList(db.Profesor_Transacciones, "Cedula", "Cedula", aplica_Transacciones.Cedula);
     ViewBag.SiglaExam = new SelectList(db.Examen_Transacciones, "SiglaExam", "SiglaExam", aplica_Transacciones.SiglaExam);
     return(View(aplica_Transacciones));
 }
コード例 #8
0
 public ActionResult Edit([Bind(Include = "Matr,CodeP,Fonction")] Participation participation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(participation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Matr  = new SelectList(db.Employes, "Matr", "NomE", participation.Matr);
     ViewBag.CodeP = new SelectList(db.Projets, "CodeP", "NomP", participation.CodeP);
     return(View(participation));
 }