public ActionResult DeleteConfirmed(long id) { ProdutoServicoAgendamentoConsultas produtoServicoAgendamentoConsultas = db.ProdutoServicoAgendamentoConsultas.Find(id); db.ProdutoServicoAgendamentoConsultas.Remove(produtoServicoAgendamentoConsultas); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdProdutoServicoAgendamentoConsulta,IdProdutoServico,IdAgendamentoConsulta")] ProdutoServicoAgendamentoConsultas produtoServicoAgendamentoConsultas) { if (ModelState.IsValid) { db.Entry(produtoServicoAgendamentoConsultas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdAgendamentoConsulta = new SelectList(db.AgendamentoConsulta, "Id", "Descricao", produtoServicoAgendamentoConsultas.IdAgendamentoConsulta); ViewBag.IdProdutoServico = new SelectList(db.ProdutoServico, "Id", "Nome", produtoServicoAgendamentoConsultas.IdProdutoServico); return(View(produtoServicoAgendamentoConsultas)); }
// GET: ProdutoServicoAgendamentoConsulta/Details/5 public ActionResult Details(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProdutoServicoAgendamentoConsultas produtoServicoAgendamentoConsultas = db.ProdutoServicoAgendamentoConsultas.Find(id); if (produtoServicoAgendamentoConsultas == null) { return(HttpNotFound()); } return(View(produtoServicoAgendamentoConsultas)); }
// GET: ProdutoServicoAgendamentoConsulta/Edit/5 public ActionResult Edit(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProdutoServicoAgendamentoConsultas produtoServicoAgendamentoConsultas = db.ProdutoServicoAgendamentoConsultas.Find(id); if (produtoServicoAgendamentoConsultas == null) { return(HttpNotFound()); } ViewBag.IdAgendamentoConsulta = new SelectList(db.AgendamentoConsulta, "Id", "Descricao", produtoServicoAgendamentoConsultas.IdAgendamentoConsulta); ViewBag.IdProdutoServico = new SelectList(db.ProdutoServico, "Id", "Nome", produtoServicoAgendamentoConsultas.IdProdutoServico); return(View(produtoServicoAgendamentoConsultas)); }