Esempio n. 1
0
        public ActionResult DeleteConfirmed(short id)
        {
            Adm_Security_Clearance adm_Security_Clearance = db.Adm_Security_Clearances.Find(id);

            db.Adm_Security_Clearances.Remove(adm_Security_Clearance);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "ID,Security_Clearance,Security_Clearance_Abbreviation")] Adm_Security_Clearance adm_Security_Clearance)
 {
     if (ModelState.IsValid)
     {
         db.Entry(adm_Security_Clearance).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(adm_Security_Clearance));
 }
Esempio n. 3
0
        // GET: Adm_Security_Clearance/Edit/5
        public ActionResult Edit(short?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Adm_Security_Clearance adm_Security_Clearance = db.Adm_Security_Clearances.Find(id);

            if (adm_Security_Clearance == null)
            {
                return(HttpNotFound());
            }
            return(View(adm_Security_Clearance));
        }
Esempio n. 4
0
        public ActionResult Create([Bind(Include = "ID,Security_Clearance,Security_Clearance_Abbreviation")] Adm_Security_Clearance adm_Security_Clearance)
        {
            if (ModelState.IsValid)
            {
                db.Adm_Security_Clearances.Add(adm_Security_Clearance);
                try
                {
                    db.SaveChanges();
                }
                catch (Exception e)
                {
                    System.Diagnostics.Debug.WriteLine(e.Message);
                }

                return(RedirectToAction("Index"));
            }

            return(View(adm_Security_Clearance));
        }