public ActionResult Edit([Bind(Include = "id_Usuario,nome_Usuario,senha_Usuario")] Usuario usuario) { if (ModelState.IsValid) { db.Entry(usuario).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("CadastroUsuario")); } return(View(usuario)); }
public ActionResult Edit([Bind(Include = "id_carro,nome_Carro")] Carro carro) { if (ModelState.IsValid) { db.Entry(carro).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(carro)); }
public ActionResult Edit([Bind(Include = "id_Tipo,descricao")] Tipo tipo) { if (ModelState.IsValid) { db.Entry(tipo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("IndexTipo")); } return(View(tipo)); }
public ActionResult Edit([Bind(Include = "id_Cliente,CPF,Nome,Sobrenome,Idade,Sexo,Endereco,Cidade,usuario")] Cliente cliente) { if (ModelState.IsValid) { db.Entry(cliente).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("IndexCliente")); } ViewBag.usuario = new SelectList(db.Usuario, "id_Usuario", "nome_Usuario", cliente.usuario); return(View(cliente)); }
public ActionResult Edit([Bind(Include = "id_Pecas,nome_Pecas,preco_Pecas,tipo")] Pecas pecas) { if (ModelState.IsValid) { db.Entry(pecas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("IndexPecas")); } ViewBag.tipo = new SelectList(db.Tipo, "id_Tipo", "descricao", pecas.tipo); return(View(pecas)); }
public ActionResult Edit([Bind(Include = "id_Catalogo,Carro")] Catalogo catalogo) { if (ModelState.IsValid) { db.Entry(catalogo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("IndexCatalogo")); } ViewBag.Carro = new SelectList(db.Carro, "id_carro", "nome_Carro", catalogo.Carro); return(View(catalogo)); }
public ActionResult Edit([Bind(Include = "id_Tipo,descricao,carro")] Tipo tipo) { if (ModelState.IsValid) { db.Entry(tipo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.carro = new SelectList(db.Carro, "id_carro", "nome_Carro", tipo.carro); return(View(tipo)); }
public ActionResult Edit([Bind(Include = "id_carro,nome_Carro,cor_Carro,cliente")] Carro carro) { if (ModelState.IsValid) { db.Entry(carro).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("IndexCarro")); } ViewBag.cliente = new SelectList(db.Cliente, "id_Cliente", "CPF", carro.cliente); return(View(carro)); }