コード例 #1
0
 public ActionResult Edit([Bind(Include = "ID_Dono,Nome_Dono,Conta_Corrente,CPF,email,usuario,senha,Tipo")] Locador locador)
 {
     if (ModelState.IsValid)
     {
         db.Entry(locador).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(locador));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "ID_Vagas,CPF,Status,Cidade,Bairro,Rua,Numero,CEP")] Vagas vagas)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vagas).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CPF = new SelectList(db.Locador, "CPF", "Nome_Dono", vagas.CPF);
     return(View(vagas));
 }