Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            OPPORTUNITY oPPORTUNITY = db.OPPORTUNITies.Find(id);

            db.OPPORTUNITies.Remove(oPPORTUNITY);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "OPPORTUNITY_ID,OPPORTUNITY_TITLE,OPPORTUNITY_DESC,DEPT_ID,START_DATE,CONTACT_FN,CONTACT_LN,CONTACT_EMAIL")] OPPORTUNITY oPPORTUNITY)
 {
     if (ModelState.IsValid)
     {
         db.Entry(oPPORTUNITY).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DEPT_ID = new SelectList(db.departments, "dept_id", "dept_name", oPPORTUNITY.DEPT_ID);
     return(View(oPPORTUNITY));
 }
Beispiel #3
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OPPORTUNITY oPPORTUNITY = db.OPPORTUNITies.Find(id);

            if (oPPORTUNITY == null)
            {
                return(HttpNotFound());
            }
            return(View(oPPORTUNITY));
        }
Beispiel #4
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            OPPORTUNITY oPPORTUNITY = db.OPPORTUNITies.Find(id);

            if (oPPORTUNITY == null)
            {
                return(HttpNotFound());
            }
            ViewBag.DEPT_ID = new SelectList(db.departments, "dept_id", "dept_name", oPPORTUNITY.DEPT_ID);
            return(View(oPPORTUNITY));
        }