Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            dtb_master dtb_master = db.dtb_master.Find(id);

            db.dtb_master.Remove(dtb_master);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "dtb_id,dtb_status,dtb_descr")] dtb_master dtb_master)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dtb_master).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dtb_master));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "dtb_id,dtb_status,dtb_descr")] dtb_master dtb_master)
        {
            if (ModelState.IsValid)
            {
                db.dtb_master.Add(dtb_master);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dtb_master));
        }
Esempio n. 4
0
        // GET: Table/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            dtb_master dtb_master = db.dtb_master.Find(id);

            if (dtb_master == null)
            {
                return(HttpNotFound());
            }
            return(View(dtb_master));
        }