Example #1
0
        public void EditType(int id, string name)
        {
            TECHNIQUE_TYPE slctd_t = db.TECHNIQUE_TYPE.Find(id);

            slctd_t.NAME = name;
            db.SaveChanges();
        }
Example #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            TECHNIQUE_TYPE tECHNIQUE_TYPE = db.TECHNIQUE_TYPE.Find(id);

            db.TECHNIQUE_TYPE.Remove(tECHNIQUE_TYPE);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #3
0
 public ActionResult Edit([Bind(Include = "OBJECTID,NAME")] TECHNIQUE_TYPE tECHNIQUE_TYPE)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tECHNIQUE_TYPE).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tECHNIQUE_TYPE));
 }
Example #4
0
        public void AddType(string name)
        {
            TECHNIQUE_TYPE new_type = new TECHNIQUE_TYPE
            {
                NAME = name
            };

            db.TECHNIQUE_TYPE.Add(new_type);
            db.SaveChanges();
        }
Example #5
0
        public ActionResult Create([Bind(Include = "OBJECTID,NAME")] TECHNIQUE_TYPE tECHNIQUE_TYPE)
        {
            if (ModelState.IsValid)
            {
                db.TECHNIQUE_TYPE.Add(tECHNIQUE_TYPE);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tECHNIQUE_TYPE));
        }
Example #6
0
        // GET: AgroPark/TECHNIQUE_TYPE/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TECHNIQUE_TYPE tECHNIQUE_TYPE = db.TECHNIQUE_TYPE.Find(id);

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