Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Adopter_Relative adopter_Relative = db.Adopter_Relative.Find(id);

            db.Adopter_Relative.Remove(adopter_Relative);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        public ActionResult Create([Bind(Include = "Relative_ID,Relative_Name,Relative_Surname,Relative_Email,Relative_Address,Relative_PostalAddress,Relative_Home_Tel,Relative_Work_Tel,Relative_Cell,Relationship,Adopter_ID")] Adopter_Relative adopter_Relative)
        {
            if (ModelState.IsValid)
            {
                db.Adopter_Relative.Add(adopter_Relative);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.Adopter_ID = new SelectList(db.Adopters, "Adopter_ID", "Adopter_Name", adopter_Relative.Adopter_ID);
            return(View(adopter_Relative));
        }
Ejemplo n.º 3
0
        public ActionResult Edit([Bind(Include = "Relative_ID,Relative_Name,Relative_Surname,Relative_Email,Relative_Address,Relative_PostalAddress,Relative_Home_Tel,Relative_Work_Tel,Relative_Cell,Relationship,Adopter_ID")] Adopter_Relative adopter_Relative)
        {
            if (ModelState.IsValid)
            {
                db.Entry(adopter_Relative).State = EntityState.Modified;
                db.SaveChanges();

                //TempData["AdopterRelativeMessage"] = "Adopter Relative Successfully Created";
                return(RedirectToAction("Index"));
            }
            ViewBag.Adopter_ID = new SelectList(db.Adopters, "Adopter_ID", "Adopter_Name", adopter_Relative.Adopter_ID);
            return(View(adopter_Relative));
        }
Ejemplo n.º 4
0
        // GET: Adopter_Relative/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Adopter_Relative adopter_Relative = db.Adopter_Relative.Find(id);

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

            if (adopter_Relative == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Adopter_ID = new SelectList(db.Adopters, "Adopter_ID", "Adopter_Name", adopter_Relative.Adopter_ID);
            return(View(adopter_Relative));
        }