public ActionResult DeleteConfirmed(int id)
        {
            Contract_Position contract_Position = db.Contract_Positions.Find(id);

            db.Contract_Positions.Remove(contract_Position);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        // GET: Contract_Position/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Contract_Position contract_Position = db.Contract_Positions.Find(id);

            if (contract_Position == null)
            {
                return(HttpNotFound());
            }
            return(View(contract_Position));
        }
 public ActionResult Create([Bind(Include = "ID,Contract_ID,Role_ID,Contract_WBS_ID,Position__,Info_Risk_ID,LCAT_ID,DateNeeded,Requisition_Status_ID,Required_Security_Clearance_ID,Created_On,Created_By,Modified_On,Modified_By")] Contract_Position contract_Position)
 {
     if (ModelState.IsValid)
     {
         db.Contract_Positions.Add(contract_Position);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DateTime                       = DateTime.Now;
     ViewBag.Info_Risk_ID                   = new SelectList(db.Adm_Info_Risks, "ID", "Info_Risk", contract_Position.Info_Risk_ID);
     ViewBag.Requisition_Status_ID          = new SelectList(db.Adm_Requisition_Status, "ID", "Status", contract_Position.Requisition_Status_ID);
     ViewBag.Required_Security_Clearance_ID = new SelectList(db.Adm_Security_Clearances, "ID", "Security_Clearance", contract_Position.Required_Security_Clearance_ID);
     ViewBag.Contract_ID                    = new SelectList(db.Contracts, "ID", "Title", contract_Position.Contract_ID);
     ViewBag.Contract_WBS_ID                = new SelectList(db.Contract_WBS, "ID", "Area", contract_Position.Contract_WBS_ID);
     //ViewBag.Contract_ID = new SelectList(db.Contract_WBS, "ID", "Area", contract_Position.Contract_ID);
     ViewBag.LCAT_ID = new SelectList(db.Ref_Contract_LCATs, "ID", "ESF_LCAT", contract_Position.LCAT_ID);
     ViewBag.Role_ID = new SelectList(db.Ref_Roles, "ID", "Role", contract_Position.Role_ID);
     return(View(contract_Position));
 }
        // GET: Contract_Position/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Contract_Position contract_Position = db.Contract_Positions.Find(id);

            if (contract_Position == null)
            {
                return(HttpNotFound());
            }
            ViewBag.DateTime                       = DateTime.Now;
            ViewBag.Info_Risk_ID                   = new SelectList(db.Adm_Info_Risks, "ID", "Info_Risk", contract_Position.Info_Risk_ID);
            ViewBag.Requisition_Status_ID          = new SelectList(db.Adm_Requisition_Status, "ID", "Status", contract_Position.Requisition_Status_ID);
            ViewBag.Required_Security_Clearance_ID = new SelectList(db.Adm_Security_Clearances, "ID", "Security_Clearance", contract_Position.Required_Security_Clearance_ID);
            ViewBag.Contract_ID                    = new SelectList(db.Contracts, "ID", "Title", contract_Position.Contract_ID);
            //ViewBag.Contract_ID = new SelectList(db.Contract_WBS, "ID", "Area", contract_Position.Contract_ID);
            ViewBag.Contract_WBS_ID = new SelectList(db.Contract_WBS, "ID", "Area", contract_Position.Contract_WBS_ID);
            ViewBag.LCAT_ID         = new SelectList(db.Ref_Contract_LCATs, "ID", "ESF_LCAT", contract_Position.LCAT_ID);
            ViewBag.Role_ID         = new SelectList(db.Ref_Roles, "ID", "Role", contract_Position.Role_ID);
            return(View(contract_Position));
        }