public ActionResult DeleteConfirmed(int id) { PlansCliente plansCliente = db.PlansCliente.Find(id); db.PlansCliente.Remove(plansCliente); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IdPlansClie,IdClie,IdPlans,FechaPlansCliente,NumPersonasPlansClie,ValorPlansClie")] PlansCliente plansCliente) { if (ModelState.IsValid) { db.Entry(plansCliente).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdClie = new SelectList(db.Cliente, "IdClie", "NombreClie", plansCliente.IdClie); ViewBag.IdPlans = new SelectList(db.Plans, "IdPlans", "ZonaPlans", plansCliente.IdPlans); return(View(plansCliente)); }
// GET: PlansCliente/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PlansCliente plansCliente = db.PlansCliente.Find(id); if (plansCliente == null) { return(HttpNotFound()); } return(View(plansCliente)); }
// GET: PlansCliente/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PlansCliente plansCliente = db.PlansCliente.Find(id); if (plansCliente == null) { return(HttpNotFound()); } ViewBag.IdClie = new SelectList(db.Cliente, "IdClie", "NombreClie", plansCliente.IdClie); ViewBag.IdPlans = new SelectList(db.Plans, "IdPlans", "ZonaPlans", plansCliente.IdPlans); return(View(plansCliente)); }