Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            blood_camp blood_camp = db.blood_camp.Find(id);

            db.blood_camp.Remove(blood_camp);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        // GET: BloodCamps/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            blood_camp blood_camp = db.blood_camp.Find(id);

            if (blood_camp == null)
            {
                return(HttpNotFound());
            }
            return(View(blood_camp));
        }
Exemplo n.º 3
0
        // GET: BloodCamps/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            blood_camp blood_camp = db.blood_camp.Find(id);

            if (blood_camp == null)
            {
                return(HttpNotFound());
            }
            ViewBag.hospital_id = new SelectList(db.hospitals, "hospital_id", "username", blood_camp.hospital_id);
            return(View(blood_camp));
        }