public ActionResult DeleteConfirmed(int id)
        {
            ResourceHierachyDetails resourceHierachyDetails = db.Details.Find(id);

            db.Details.Remove(resourceHierachyDetails);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,RID,PRID,ResourceHierachyID")] ResourceHierachyDetails resourceHierachyDetails)
 {
     if (ModelState.IsValid)
     {
         db.Entry(resourceHierachyDetails).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.RID  = new SelectList(db.Resorce, "ID", "DetailsXml", resourceHierachyDetails.RID);
     ViewBag.PRID = new SelectList(db.Resorce, "ID", "DetailsXml", resourceHierachyDetails.PRID);
     ViewBag.ResourceHierachyID = new SelectList(db.ResourceHierachy, "ID", "ID", resourceHierachyDetails.ResourceHierachyID);
     return(View(resourceHierachyDetails));
 }
        // GET: ResourceHierachyDetails/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ResourceHierachyDetails resourceHierachyDetails = db.Details.Find(id);

            if (resourceHierachyDetails == null)
            {
                return(HttpNotFound());
            }
            return(View(resourceHierachyDetails));
        }
        // GET: ResourceHierachyDetails/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ResourceHierachyDetails resourceHierachyDetails = db.Details.Find(id);

            if (resourceHierachyDetails == null)
            {
                return(HttpNotFound());
            }
            ViewBag.RID  = new SelectList(db.Resorce, "ID", "DetailsXml", resourceHierachyDetails.RID);
            ViewBag.PRID = new SelectList(db.Resorce, "ID", "DetailsXml", resourceHierachyDetails.PRID);
            ViewBag.ResourceHierachyID = new SelectList(db.ResourceHierachy, "ID", "ID", resourceHierachyDetails.ResourceHierachyID);
            return(View(resourceHierachyDetails));
        }