示例#1
0
        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"));
        }
示例#2
0
 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));
 }
示例#3
0
        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));
        }
示例#4
0
        // 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));
        }
示例#5
0
        // 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));
        }
示例#6
0
        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");
        }