public ActionResult Edit([Bind(Include = "VeterinarioID,Nome,Rua,NumPorta,Andar,CodPostal,NIF,DataEntradaClinica,NumCedulaProf,DataInscOrdem,Faculdade")] Veterinarios veterinarios) { if (ModelState.IsValid) { db.Entry(veterinarios).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(veterinarios)); }
public ActionResult Edit([Bind(Include = "DonoID,Nome,NIF")] Donos donos) { if (ModelState.IsValid) { db.Entry(donos).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(donos)); }
public ActionResult Edit([Bind(Include = "AnimalID,Nome,Especie,Raca,Peso,Altura,DonosFK")] Animais animais) { if (ModelState.IsValid) { db.Entry(animais).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DonosFK = new SelectList(db.Donos, "DonoID", "Nome", animais.DonosFK); return(View(animais)); }
public ActionResult Edit([Bind(Include = "ConsultaID,DataConsulta,VeterinarioFK,AnimalFK")] Consultas consultas) { if (ModelState.IsValid) { db.Entry(consultas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AnimalFK = new SelectList(db.Animais, "AnimalID", "Nome", consultas.AnimalFK); ViewBag.VeterinarioFK = new SelectList(db.Veterinarios, "VeterinarioID", "Nome", consultas.VeterinarioFK); return(View(consultas)); }