public ActionResult Edit([Bind(Include = "ClienteId,Nombres,Apellido,Direccion,Telefono,Email")] Clientes clientes) { if (ModelState.IsValid) { db.Entry(clientes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(clientes)); }
public ActionResult Edit([Bind(Include = "SeriesId,Titulo,Genero,Existencia,Duracion,Precio")] Series series) { if (ModelState.IsValid) { db.Entry(series).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(series)); }
public ActionResult Edit([Bind(Include = "Id,FacturaId,PeliculaId,Titulo,Cantidad,Precio")] FacturasDetalles facturasDetalles) { if (ModelState.IsValid) { db.Entry(facturasDetalles).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(facturasDetalles)); }
public ActionResult Edit([Bind(Include = "FacturaId,ClienteId,Fecha,CantidadPelicula,SubTotal,Total")] Facturas facturas) { if (ModelState.IsValid) { db.Entry(facturas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(facturas)); }
public static bool Eliminar(Clientes cliente) { using (var conexion = new RegistroDb()) { try { conexion.Entry(cliente).State = EntityState.Deleted; if (conexion.SaveChanges() > 0) { return(true); } } catch (Exception) { throw; } } return(false); }