コード例 #1
0
 public ActionResult Edit([Bind(Include = "Id,Nombre,Apellido,Rtn")] Clientes clientes)
 {
     if (ModelState.IsValid)
     {
         db.Entry(clientes).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(clientes));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Id,Descripcion,ClienteId")] Documentos documentos)
 {
     if (ModelState.IsValid)
     {
         db.Entry(documentos).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ClienteId = new SelectList(db.Clientes, "Id", "Nombre", documentos.ClienteId);
     return(View(documentos));
 }