public ActionResult DeleteConfirmed(string id) { Fotos_Marker fotos_Marker = db.Fotos_Marker.Find(id); db.Fotos_Marker.Remove(fotos_Marker); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "imagen,id_marker")] Fotos_Marker fotos_Marker) { if (ModelState.IsValid) { db.Entry(fotos_Marker).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.id_marker = new SelectList(db.Marker, "id_marker", "nombre", fotos_Marker.id_marker); return(View(fotos_Marker)); }
public ActionResult Create([Bind(Include = "imagen,id_marker")] Fotos_Marker fotos_Marker) { if (ModelState.IsValid) { db.Fotos_Marker.Add(fotos_Marker); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.id_marker = new SelectList(db.Marker, "id_marker", "nombre", fotos_Marker.id_marker); return(View(fotos_Marker)); }
// GET: Fotos_Marker/Details/5 public ActionResult Details(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Fotos_Marker fotos_Marker = db.Fotos_Marker.Find(id); if (fotos_Marker == null) { return(HttpNotFound()); } return(View(fotos_Marker)); }
// GET: Fotos_Marker/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Fotos_Marker fotos_Marker = db.Fotos_Marker.Find(id); if (fotos_Marker == null) { return(HttpNotFound()); } ViewBag.id_marker = new SelectList(db.Marker, "id_marker", "nombre", fotos_Marker.id_marker); return(View(fotos_Marker)); }
public string ImagenesMarkers(string pathRecibido, string nombreRecibido) { Fotos_Marker ft = new Fotos_Marker(); var num = Int32.Parse(nombreRecibido); var ur = "C:/Users/Adrian/Pictures/"; var pathCompleto = ur + "" + pathRecibido; ft.id_marker = num; ft.imagen = pathCompleto; db.Fotos_Marker.Add(ft); db.SaveChanges(); Session["imagePath"] = pathCompleto; return("OK"); }