예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Table_Rubrics table_Rubrics = db.Table_Rubrics.Find(id);

            db.Table_Rubrics.Remove(table_Rubrics);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "id_Rubric,rubName")] Table_Rubrics table_Rubrics)
 {
     if (ModelState.IsValid)
     {
         db.Entry(table_Rubrics).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(table_Rubrics));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "id_Rubric,rubName")] Table_Rubrics table_Rubrics)
        {
            if (ModelState.IsValid)
            {
                db.Table_Rubrics.Add(table_Rubrics);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(table_Rubrics));
        }
예제 #4
0
        // GET: Table_Rubrics/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Table_Rubrics table_Rubrics = db.Table_Rubrics.Find(id);

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