public ActionResult DeleteConfirmed(int id) { MINORPADDY mINORPADDY = db.MINORPADDies.Find(id); db.MINORPADDies.Remove(mINORPADDY); db.SaveChanges(); return(RedirectToAction("Index")); }
// 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)); }
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)); }
// 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)); }