示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Stand_Type stand_Type = db.Tb_Stand_Type.Find(id);

            db.Tb_Stand_Type.Remove(stand_Type);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "StandType,StandName,StandDescription,ResourceQuantity")] Stand_Type stand_Type)
 {
     if (ModelState.IsValid)
     {
         db.Entry(stand_Type).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(stand_Type));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "StandType,StandName,StandDescription,ResourceQuantity")] Stand_Type stand_Type)
        {
            if (ModelState.IsValid)
            {
                db.Tb_Stand_Type.Add(stand_Type);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(stand_Type));
        }
示例#4
0
        // GET: Stand_Type/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Stand_Type stand_Type = db.Tb_Stand_Type.Find(id);

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