Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            MINORPADDY mINORPADDY = db.MINORPADDies.Find(id);

            db.MINORPADDies.Remove(mINORPADDY);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        // GET: MINORPADDies/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MINORPADDY mINORPADDY = db.MINORPADDies.Find(id);

            if (mINORPADDY == null)
            {
                return(HttpNotFound());
            }
            return(View(mINORPADDY));
        }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "id,aiid,yearid,monthid,varietyid,monthlytarget,monthlyprogress")] MINORPADDY mINORPADDY)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mINORPADDY).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.aiid      = new SelectList(db.AILISTs, "aiid", "airange", mINORPADDY.aiid);
     ViewBag.monthid   = new SelectList(db.MONTHS, "monthid", "monthname", mINORPADDY.monthid);
     ViewBag.varietyid = new SelectList(db.VARIETies, "varietyid", "varietyname", mINORPADDY.varietyid);
     ViewBag.yearid    = new SelectList(db.YEARS, "yearid", "yearid", mINORPADDY.yearid);
     return(View(mINORPADDY));
 }
Exemple #4
0
        // GET: MINORPADDies/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MINORPADDY mINORPADDY = db.MINORPADDies.Find(id);

            if (mINORPADDY == null)
            {
                return(HttpNotFound());
            }
            ViewBag.aiid      = new SelectList(db.AILISTs, "aiid", "airange", mINORPADDY.aiid);
            ViewBag.monthid   = new SelectList(db.MONTHS, "monthid", "monthname", mINORPADDY.monthid);
            ViewBag.varietyid = new SelectList(db.VARIETies, "varietyid", "varietyname", mINORPADDY.varietyid);
            ViewBag.yearid    = new SelectList(db.YEARS, "yearid", "yearid", mINORPADDY.yearid);
            return(View(mINORPADDY));
        }