Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Table_Size table_size = db.Table_Size.Find(id);

            db.Table_Size.Remove(table_size);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "s_id,s_size,category_id")] Table_Size table_size)
 {
     if (ModelState.IsValid)
     {
         db.Entry(table_size).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.category_id = new SelectList(db.Table_Category, "category_id", "category_name", table_size.category_id);
     return(View(table_size));
 }
Exemple #3
0
        // GET: /Sizes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Table_Size table_size = db.Table_Size.Find(id);

            if (table_size == null)
            {
                return(HttpNotFound());
            }
            return(View(table_size));
        }
Exemple #4
0
        // GET: /Sizes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Table_Size table_size = db.Table_Size.Find(id);

            if (table_size == null)
            {
                return(HttpNotFound());
            }
            ViewBag.category_id = new SelectList(db.Table_Category, "category_id", "category_name", table_size.category_id);
            return(View(table_size));
        }