public ActionResult DeleteConfirmed(long id) { VendaServicoFormaDePagamento vendaServicoFormaDePagamento = db.VendaServicoFormaDePagamento.Find(id); db.VendaServicoFormaDePagamento.Remove(vendaServicoFormaDePagamento); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdVendaServicoFormaDePagamento,IdVendaServico,IdFormaDePagamento")] VendaServicoFormaDePagamento vendaServicoFormaDePagamento) { if (ModelState.IsValid) { db.Entry(vendaServicoFormaDePagamento).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdFormaDePagamento = new SelectList(db.FormaDePagamento, "Id", "Descricao", vendaServicoFormaDePagamento.IdFormaDePagamento); ViewBag.IdVendaServico = new SelectList(db.VendaServico, "Id", "Descricao", vendaServicoFormaDePagamento.IdVendaServico); return(View(vendaServicoFormaDePagamento)); }
// GET: VendaServicoFormaDePagamento/Details/5 public ActionResult Details(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VendaServicoFormaDePagamento vendaServicoFormaDePagamento = db.VendaServicoFormaDePagamento.Find(id); if (vendaServicoFormaDePagamento == null) { return(HttpNotFound()); } return(View(vendaServicoFormaDePagamento)); }
// GET: VendaServicoFormaDePagamento/Edit/5 public ActionResult Edit(long?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } VendaServicoFormaDePagamento vendaServicoFormaDePagamento = db.VendaServicoFormaDePagamento.Find(id); if (vendaServicoFormaDePagamento == null) { return(HttpNotFound()); } ViewBag.IdFormaDePagamento = new SelectList(db.FormaDePagamento, "Id", "Descricao", vendaServicoFormaDePagamento.IdFormaDePagamento); ViewBag.IdVendaServico = new SelectList(db.VendaServico, "Id", "Descricao", vendaServicoFormaDePagamento.IdVendaServico); return(View(vendaServicoFormaDePagamento)); }