Пример #1
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            tbl_tableType tbl_tableType = db.tbl_tableType.Find(id);

            db.tbl_tableType.Remove(tbl_tableType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "id,code,name")] tbl_tableType tbl_tableType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tbl_tableType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tbl_tableType));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "id,code,name")] tbl_tableType tbl_tableType)
        {
            if (ModelState.IsValid)
            {
                tbl_tableType.id = Guid.NewGuid();
                db.tbl_tableType.Add(tbl_tableType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tbl_tableType));
        }
Пример #4
0
        // GET: TableType/Delete/5
        public ActionResult Delete(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            tbl_tableType tbl_tableType = db.tbl_tableType.Find(id);

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