Example #1
0
        public ActionResult Create()
        {
            CurryTypes food = new CurryTypes();

            food.LastModified = DateTime.Now;
            return(View(food));
        }
Example #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            CurryTypes curryTypes = db.CurryTypes.Find(id);

            db.CurryTypes.Remove(curryTypes);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #3
0
 public ActionResult Edit([Bind(Include = "ID,CurryTypeName,LastModified,LastModifiedBy")] CurryTypes curryTypes)
 {
     if (ModelState.IsValid)
     {
         db.Entry(curryTypes).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(curryTypes));
 }
Example #4
0
        public ActionResult Create([Bind(Include = "ID,CurryTypeName,LastModified,LastModifiedBy")] CurryTypes curryTypes)
        {
            if (ModelState.IsValid)
            {
                db.CurryTypes.Add(curryTypes);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(curryTypes));
        }
Example #5
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CurryTypes curryTypes = db.CurryTypes.Find(id);

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