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

            db.tableCs.Remove(tableC);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public ActionResult updateList3(string temp)
        {
            tableC TC = new tableC();

            TC.name = temp;
            db.tableCs.Add(TC);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
 public ActionResult Edit([Bind(Include = "id,name")] tableC tableC)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tableC).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tableC));
 }
Esempio n. 4
0
        public ActionResult Create([Bind(Include = "id,name")] tableC tableC)
        {
            if (ModelState.IsValid)
            {
                db.tableCs.Add(tableC);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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