Ejemplo n.º 1
0
 public ActionResult Edit(settingtype settingtype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(settingtype).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(settingtype));
 }
Ejemplo n.º 2
0
        public ActionResult Create(settingtype settingtype)
        {
            if (ModelState.IsValid)
            {
                db.settingtypes.Add(settingtype);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(settingtype));
        }
Ejemplo n.º 3
0
        // GET: /settingtype/Delete/5
        public ActionResult Delete(int?id)
        {
            settingtype settingtype = db.settingtypes.Find(id);

            if (settingtype != null)
            {
                settingtype.status          = 0;
                db.Entry(settingtype).State = EntityState.Modified;
                db.SaveChanges();
            }
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 4
0
        // GET: /settingtype/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            settingtype settingtype = db.settingtypes.Find(id);

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