Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            FMonths fMonths = db.FMonths.Find(id);

            db.FMonths.Remove(fMonths);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,MonthName")] FMonths fMonths)
 {
     if (ModelState.IsValid)
     {
         db.Entry(fMonths).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(fMonths));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "Id,MonthName")] FMonths fMonths)
        {
            if (ModelState.IsValid)
            {
                db.FMonths.Add(fMonths);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(fMonths));
        }
Beispiel #4
0
        // GET: FMonths/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FMonths fMonths = db.FMonths.Find(id);

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