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

            db.TB_PARAMETERS.Remove(tB_PARAMETERS);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "ID_PARAM,DESCR_PARAM,VAL1,VAL2,VAL3")] TB_PARAMETERS tB_PARAMETERS)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tB_PARAMETERS).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tB_PARAMETERS));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "ID_PARAM,DESCR_PARAM,VAL1,VAL2,VAL3")] TB_PARAMETERS tB_PARAMETERS)
        {
            if (ModelState.IsValid)
            {
                db.TB_PARAMETERS.Add(tB_PARAMETERS);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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